Package com.google.ortools.sat
Class CircuitConstraint
- java.lang.Object
-
- com.google.ortools.sat.Constraint
-
- com.google.ortools.sat.CircuitConstraint
-
public class CircuitConstraint extends Constraint
Specialized circuit constraint.This constraint allows adding arcs to the circuit constraint incrementally.
-
-
Constructor Summary
Constructors Constructor Description CircuitConstraint(CpModelProto.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CircuitConstraintaddArc(int tail, int head, Literal literal)Add an arc to the graph of the circuit constraint.-
Methods inherited from class com.google.ortools.sat.Constraint
getBuilder, getIndex, onlyEnforceIf, onlyEnforceIf
-
-
-
-
Constructor Detail
-
CircuitConstraint
public CircuitConstraint(CpModelProto.Builder builder)
-
-
Method Detail
-
addArc
public CircuitConstraint addArc(int tail, int head, Literal literal)
Add an arc to the graph of the circuit constraint.- Parameters:
tail- the index of the tail node.head- the index of the head node.literal- it will be set to true if the arc is selected.
-
-