Uses of Interface
com.google.ortools.sat.Literal
Packages that use Literal
-
Uses of Literal in com.google.ortools.sat
Classes in com.google.ortools.sat that implement LiteralModifier and TypeClassDescriptionfinal classAn Boolean variable.final classThe negation of a boolean variable.Methods in com.google.ortools.sat that return LiteralModifier and TypeMethodDescriptionCpModel.falseLiteral()Returns the false literal.BoolVar.not()Returns the negation of a boolean variable.Literal.not()Returns the Boolean negation of the current literal.NotBoolVar.not()Returns the negation of this literal.CpModel.trueLiteral()Returns the true literal.Methods in com.google.ortools.sat with parameters of type LiteralModifier and TypeMethodDescriptionAdd an arc to the graph of the circuit constraint.Add an arc to the graph of the multiple circuit constraint.voidCpModel.addAssumption(Literal lit) Adds a literal to the model as assumptionvoidCpModel.addAssumptions(Literal[] literals) Adds multiple literals to the model as assumptionsCpModel.addAtLeastOne(Literal[] literals) Same as addBoolOr.CpModel.addAtMostOne(Literal[] literals) AddsAtMostOne(literals): Sum(literals) <= 1.CpModel.addBoolAnd(Literal[] literals) AddsAnd(literals) == true.AddsOr(literals) == true.CpModel.addBoolXor(Literal[] literals) AddsXOr(literals) == true.CpModel.addExactlyOne(Literal[] literals) AddsExactlyOne(literals): Sum(literals) == 1.voidAdds hinting to a literalCpModel.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).ReservoirConstraint.addOptionalEvent(long time, long levelChange, Literal isActive) Adds an optional event at a fixed timeReservoirConstraint.addOptionalEvent(LinearExpr time, long levelChange, Literal isActive) Adds an optional eventstatic DoubleLinearExprCreates an affine expression (lit * coefficient + offset).CpSolver.booleanValue(Literal var) Returns the Boolean value of a literal in the last solution found.CpSolverSolutionCallback.booleanValue(Literal literal) Returns the Boolean value of the literal in the current solution.booleanCpModel.isPositive(Literal lit) CpModel.newOptionalFixedInterval(long start, long size, Literal isPresent, String name) Creates an optional fixed interval from start and size, and an isPresent literal.CpModel.newOptionalFixedSizeIntervalVar(LinearArgument start, long size, Literal isPresent, String name) Creates an optional interval variable from an 1-var affine expression start, and a fixed size.CpModel.newOptionalIntervalVar(LinearArgument start, LinearArgument size, LinearArgument end, Literal isPresent, String name) Creates an optional interval variable from three 1-var affine expressions 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.static DoubleLinearExprCreates a sum expression.static DoubleLinearExprDoubleLinearExpr.sumWithOffset(Literal[] literals, double offset) Creates a sum expression with a double offset.static DoubleLinearExprCreates a linear term (lit * coefficient).static DoubleLinearExprDoubleLinearExpr.weightedSum(Literal[] literals, double[] coefficients) Creates a scalar product.static DoubleLinearExprDoubleLinearExpr.weightedSumWithOffset(Literal[] literals, double[] coefficients, double offset) Creates a scalar product with a double offset.Method parameters in com.google.ortools.sat with type arguments of type LiteralModifier and TypeMethodDescriptionCpModel.addAtLeastOne(Iterable<Literal> literals) Same as addBoolOr.CpModel.addAtMostOne(Iterable<Literal> literals) AddsAtMostOne(literals): Sum(literals) <= 1.CpModel.addBoolAnd(Iterable<Literal> literals) AddsAnd(literals) == true.AddsOr(literals) == true.CpModel.addBoolXor(Iterable<Literal> literals) AddsXOr(literals) == true.CpModel.addExactlyOne(Iterable<Literal> literals) AddsExactlyOne(literals): Sum(literals) == 1.Constructors in com.google.ortools.sat with parameters of type LiteralModifierConstructorDescriptionDoubleLinearExpr(Literal[] literals, double offset) DoubleLinearExpr(Literal[] literals, double[] coefficients, double offset) DoubleLinearExpr(Literal lit, double coefficient, double offset)