@ Override public final float getLeafValue ( FVec feat , int root_id ) { int pid = root_id ; int pos = pid * NODE_SIZE + 4 ; int cleft_ = UnsafeUtils . get4 ( _nodes , pos ) ; while ( cleft_ != - 1 ) { final int sindex_ = UnsafeUtils . get4 ( _nodes , pos + 8 ) ; final float fvalue = feat . fvalue ( ( int ) ( sindex_ & ( ( 1L << 31 ) - 1L ) ) ) ; if ( Float . isNaN ( fvalue ) ) { pid = ( sindex_ >>> 31 ) != 0 ? cleft_ : UnsafeUtils . get4 ( _nodes , pos + 4 ) ; } else { final float value_ = UnsafeUtils . get4f ( _nodes , pos + 12 ) ; pid = ( fvalue < value_ ) ? cleft_ : UnsafeUtils . get4 ( _nodes , pos + 4 ) ; } pos = pid * NODE_SIZE + 4 ; cleft_ = UnsafeUtils . get4 ( _nodes , pos ) ; } return UnsafeUtils . get4f ( _nodes , pos + 12 ) ; }
Retrieves nodes from root to leaf and returns leaf value .