public PBConstraint cc ( final CType comparator , final int rhs , final Collection < Variable > variables ) { final int [ ] coefficients = new int [ variables . size ( ) ] ; Arrays . fill ( coefficients , 1 ) ; final Variable [ ] vars = new Variable [ variables . size ( ) ] ; int count = 0 ; for ( final Variable var : variables ) vars [ count ++ ] = var ; return this . constructPBC ( comparator , rhs , vars , coefficients ) ; }
Creates a new cardinality constraint .