fix categorical data bug

This commit is contained in:
benfry
2012-12-19 22:34:47 +00:00
parent 04db01552c
commit 7792e36fde
3 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -1801,7 +1801,8 @@ public class Table {
public int getInt(int row, int column) {
checkBounds(row, column);
if (columnTypes[column] == INT) {
if (columnTypes[column] == INT ||
columnTypes[column] == CATEGORICAL) {
int[] intData = (int[]) columns[column];
return intData[row];
}
+2 -1
View File
@@ -1801,7 +1801,8 @@ public class Table {
public int getInt(int row, int column) {
checkBounds(row, column);
if (columnTypes[column] == INT) {
if (columnTypes[column] == INT ||
columnTypes[column] == CATEGORICAL) {
int[] intData = (int[]) columns[column];
return intData[row];
}
+2
View File
@@ -139,6 +139,8 @@ _ getColumnType() - what should it return?
_ Integer.TYPE, String.class? still nothing for categorical
_ maybe it's Table.INT since it's for advanced users anyway
_ problem is loading types from file, no way to access it from code
_ getInt() on categorial to return index?
_ getCategories() and getCategory() methods to query names?
shape
_ major surgery to put loadShape() back into PApplet/PGraphics