protected double norm ( double x , int i ) { if ( Double . isNaN ( m_Ranges [ i ] [ R_MIN ] ) || ( m_Ranges [ i ] [ R_MAX ] == m_Ranges [ i ] [ R_MIN ] ) ) return 0 ; else return ( x - m_Ranges [ i ] [ R_MIN ] ) / ( m_Ranges [ i ] [ R_WIDTH ] ) ; }
Normalizes a given value of a numeric attribute .