private WritableIntegerDataStore computeSubtreeSizes ( DBIDs order ) { WritableIntegerDataStore siz = DataStoreUtil . makeIntegerStorage ( ids , DataStoreFactory . HINT_HOT | DataStoreFactory . HINT_TEMP , 1 ) ; DBIDVar v1 = DBIDUtil . newVar ( ) ; for ( DBIDIter it = order . iter ( ) ; it . valid ( ) ; it . advance ( ) ) { if ( DBIDUtil . equal ( it , parent . assignVar ( it , v1 ) ) ) { continue ; } siz . increment ( v1 , siz . intValue ( it ) ) ; } return siz ; }
Compute the size of all subtrees .