gets the index of this r in a matrix with only one n value . concode_field_sep int[] values concode_elem_sep int sum concode_elem_sep int dims concode_elem_sep int n concode_field_sep double getProbabilityOfSelecting concode_elem_sep int getBoxIndex concode_elem_sep int getIndex concode_elem_sep R subtract concode_elem_sep R coalesce concode_elem_sep int getMatrixSize concode_elem_sep int calculateSum concode_elem_sep void main concode_elem_sep int calculateIndexedDimension concode_elem_sep int[] subtractValues concode_elem_sep R transition concode_elem_sep int getNumberOfTypes concode_elem_sep boolean isValidValues concode_elem_sep R split concode_elem_sep Iterable<R> loopOver concode_elem_sep int getType concode_elem_sep int getNum concode_elem_sep int transitionIndex concode_elem_sep String toString concode_elem_sep String getTypeName concode_elem_sep double getLikelihoodProduct concode_elem_sep int splitIndex concode_elem_sep int getMatrixSizeWithoutN
int function ( ) { int loc0 = 0 ; int loc1 = 0 ; for ( int loc2 = 0 ; loc2 < dims ; loc2 ++ ) { loc1 += values [ loc2 ] ; loc0 += calculateIndexedDimension ( loc1 - 1 , loc2 + 1 ) ; } return loc0 ; }