mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
fix categorical data bug
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user