public boolean containedIn ( SparseNumberVector bv ) { int i1 = this . iter ( ) , i2 = bv . iter ( ) ; while ( this . iterValid ( i1 ) ) { if ( ! bv . iterValid ( i2 ) ) { return false ; } int d1 = this . iterDim ( i1 ) , d2 = bv . iterDim ( i2 ) ; if ( d1 < d2 ) { return false ; // Missing } if ( d1 == d2 ) { if ( bv . iterDoubleValue ( i2 ) == 0. ) { return false ; } i1 = this . iterAdvance ( i1 ) ; } i2 = bv . iterAdvance ( i2 ) ; } return true ; }
Test whether the itemset is contained in a bit vector .