The constructor for the ColumnDefinition class does not set the field index. Consequently, its value after construction is zero - a valid index but probably the wrong value.
If any code fails to call ColumnDefinition.setIndex() after construction, then VersatileDataSet.findIndex() happily returns that usually wrong value, instead of searching for the correct value with VersatileDataSource.columnIndex().
The default value of the field ColumnDefinition.index should be -1. This can be accomplished either with a field initialization:
private int index = -1;
Or an explicit initialization in the constructor, just like this.count:
Observed in Encog 3.3.0.
The constructor for the ColumnDefinition class does not set the field
index
. Consequently, its value after construction is zero - a valid index but probably the wrong value.If any code fails to call ColumnDefinition.setIndex() after construction, then VersatileDataSet.findIndex() happily returns that usually wrong value, instead of searching for the correct value with VersatileDataSource.columnIndex().
The default value of the field ColumnDefinition.index should be -1. This can be accomplished either with a field initialization:
Or an explicit initialization in the constructor, just like this.count: