private int setLastRow ( int position ) { if ( position < 0 ) throw new IllegalStateException ( ) ; decompose ( position , lastRow ) ; int expectedRowCount = 0 ; for ( int i = 0 ; i < lastRow . length ; i ++ ) { int l = lastRow [ i ] ; expectedRowCount += l * generator . clusteringDescendantAverages [ i ] ; } return expectedRowCount + 1 ; }
returns expected distance from zero