Uses of Interface
com.google.ortools.sat.Literal
| Package | Description |
|---|---|
| com.google.ortools.sat |
-
Uses of Literal in com.google.ortools.sat
Classes in com.google.ortools.sat that implement Literal Modifier and Type Class Description classIntVarAn integer variable.classNotBooleanVariableThe negation of a boolean variable.Methods in com.google.ortools.sat that return Literal Modifier and Type Method Description LiteralCpModel. falseLiteral()Returns the false literal.LiteralIntVar. not()Returns the negation of a boolean variable.LiteralLiteral. not()Returns the Boolean negation of the current literal.LiteralNotBooleanVariable. not()Returns the negation of this literal.LiteralCpModel. trueLiteral()Returns the true literal.Methods in com.google.ortools.sat with parameters of type Literal Modifier and Type Method Description voidCpModel. addAssumption(Literal lit)Adds a literal to the model as assumptionvoidCpModel. addAssumptions(Literal[] literals)Adds multiple literals to the model as assumptionsConstraintCpModel. addBoolAnd(Literal[] literals)AddsAnd(literals) == true.ConstraintCpModel. addBoolOr(Literal[] literals)AddsOr(literals) == true.ConstraintCpModel. addBoolXor(Literal[] literals)AddsXOr(literals) == true.ConstraintCpModel. addCircuit(int[] tails, int[] heads, Literal[] literals)AddsCircuit(tails, heads, literals).ConstraintCpModel. addImplication(Literal a, Literal b)Addsa => b.voidCpModel. addMapDomain(IntVar var, Literal[] booleans, long offset)Addsvar == i + offset <=> booleans[i] == true for all i in [0, booleans.length).static LinearExprLinearExpr. booleanScalProd(Literal[] literals, int[] coefficients)Creates a scalar product.static LinearExprLinearExpr. booleanScalProd(Literal[] literals, long[] coefficients)Creates a scalar product.static LinearExprLinearExpr. booleanSum(Literal[] literals)Creates a sum expression.java.lang.BooleanCpSolver. booleanValue(Literal var)Returns the Boolean value of a literal in the last solution found.java.lang.BooleanCpSolverSolutionCallback. booleanValue(Literal literal)Returns the Boolean value of the literal in the current solution.IntervalVarCpModel. newOptionalFixedInterval(long start, long size, Literal isPresent, java.lang.String name)Creates an optional fixed interval from start and size.IntervalVarCpModel. newOptionalIntervalVar(long start, IntVar size, IntVar end, Literal isPresent, java.lang.String name)Creates an optional interval with a fixed start.IntervalVarCpModel. newOptionalIntervalVar(IntVar start, long size, IntVar end, Literal isPresent, java.lang.String name)Creates an optional interval with a fixed size.IntervalVarCpModel. newOptionalIntervalVar(IntVar start, IntVar size, long end, Literal isPresent, java.lang.String name)Creates an optional interval with a fixed end.IntervalVarCpModel. newOptionalIntervalVar(IntVar start, IntVar size, IntVar end, Literal isPresent, java.lang.String name)Creates an optional interval variable from start, size, end, and isPresent.voidConstraint. onlyEnforceIf(Literal lit)Adds a literal to the constraint.voidConstraint. onlyEnforceIf(Literal[] lits)Adds a list of literals to the constraint.