public int [ ] getSparseIndices ( int component ) { assert ( sparse [ component ] ) ; int [ ] indices = new int [ pointers [ component ] . length / 2 ] ; for ( int i = 0 ; i < pointers [ component ] . length / 2 ; i ++ ) { indices [ i ] = ( int ) pointers [ component ] [ i * 2 ] ; } return indices ; }
Gets you the indices of multi hot in a component assuming it is sparse . Throws an assert if it isn t .