Get next value from column of root 's value.  If the value stored at root was last value  in its column, then assign INFINITE as next value
nextval = mat [ hr . r + 1 ] [ hr . c ] NEW_LINE INDENT if ( hr . r < n - 1 ) else maxsize NEW_LINE DEDENT