void buildALK ( final EncodingResult result , final Variable [ ] vars , int rhs ) { final LNGVector < Variable > cardinalityOutvars = this . initializeConstraint ( result , vars ) ; this . incData = new CCIncrementalData ( result , CCConfig . ALK_ENCODER . TOTALIZER , rhs , vars . length , cardinalityOutvars ) ; this . toCNF ( cardinalityOutvars , rhs , Bound . LOWER ) ; assert this . cardinalityInvars . size ( ) == 0 ; for ( int i = 0 ; i < rhs ; i ++ ) this . result . addClause ( cardinalityOutvars . get ( i ) ) ; }
Builds an at - least - k constraint .