14package com.google.ortools.sat;
16import com.google.ortools.sat.CpModelProto;
17import com.google.ortools.sat.IntegerVariableProto;
18import com.google.ortools.util.Domain;
21public class IntVar
implements LinearArgument {
22 IntVar(CpModelProto.Builder builder, Domain domain, String name) {
23 this.modelBuilder = builder;
27 for (
long b : domain.flattenedIntervals()) {
32 IntVar(CpModelProto.Builder builder,
int index) {
33 this.modelBuilder = builder;
34 this.variableIndex = index;
35 this.varBuilder =
modelBuilder.getVariablesBuilder(index);