public void updateRangesFirst ( Instance instance , int numAtt , double [ ] [ ] ranges ) { for ( int j = 0 ; j < numAtt ; j ++ ) { if ( ! instance . isMissing ( j ) ) { ranges [ j ] [ R_MIN ] = instance . value ( j ) ; ranges [ j ] [ R_MAX ] = instance . value ( j ) ; ranges [ j ] [ R_WIDTH ] = 0.0 ; } else { // if value was missing ranges [ j ] [ R_MIN ] = Double . POSITIVE_INFINITY ; ranges [ j ] [ R_MAX ] = - Double . POSITIVE_INFINITY ; ranges [ j ] [ R_WIDTH ] = Double . POSITIVE_INFINITY ; } } }
Used to initialize the ranges . For this the values of the first instance is used to save time . Sets low and high to the values of the first instance and width to zero .