Class CircuitConstraintProto.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<CircuitConstraintProto.Builder>
com.google.protobuf.GeneratedMessage.Builder<CircuitConstraintProto.Builder>
com.google.ortools.sat.CircuitConstraintProto.Builder
All Implemented Interfaces:
CircuitConstraintProtoOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CircuitConstraintProto

public static final class CircuitConstraintProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<CircuitConstraintProto.Builder> implements CircuitConstraintProtoOrBuilder
 The circuit constraint is defined on a graph where the arc presence are
 controlled by literals. Each arc is given by an index in the
 tails/heads/literals lists that must have the same size.

 For now, we ignore node indices with no incident arc. All the other nodes
 must have exactly one incoming and one outgoing selected arc (i.e. literal at
 true). All the selected arcs that are not self-loops must form a single
 circuit. Note that multi-arcs are allowed, but only one of them will be true
 at the same time. Multi-self loop are disallowed though.
 
Protobuf type operations_research.sat.CircuitConstraintProto
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CircuitConstraintProto.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<CircuitConstraintProto.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<CircuitConstraintProto.Builder>
    • getDefaultInstanceForType

      public CircuitConstraintProto getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public CircuitConstraintProto build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CircuitConstraintProto buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public CircuitConstraintProto.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CircuitConstraintProto.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<CircuitConstraintProto.Builder>
    • mergeFrom

      public CircuitConstraintProto.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CircuitConstraintProto.Builder>
      Throws:
      IOException
    • getTailsList

      public List<Integer> getTailsList()
      repeated int32 tails = 3;
      Specified by:
      getTailsList in interface CircuitConstraintProtoOrBuilder
      Returns:
      A list containing the tails.
    • getTailsCount

      public int getTailsCount()
      repeated int32 tails = 3;
      Specified by:
      getTailsCount in interface CircuitConstraintProtoOrBuilder
      Returns:
      The count of tails.
    • getTails

      public int getTails(int index)
      repeated int32 tails = 3;
      Specified by:
      getTails in interface CircuitConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The tails at the given index.
    • setTails

      public CircuitConstraintProto.Builder setTails(int index, int value)
      repeated int32 tails = 3;
      Parameters:
      index - The index to set the value at.
      value - The tails to set.
      Returns:
      This builder for chaining.
    • addTails

      public CircuitConstraintProto.Builder addTails(int value)
      repeated int32 tails = 3;
      Parameters:
      value - The tails to add.
      Returns:
      This builder for chaining.
    • addAllTails

      public CircuitConstraintProto.Builder addAllTails(Iterable<? extends Integer> values)
      repeated int32 tails = 3;
      Parameters:
      values - The tails to add.
      Returns:
      This builder for chaining.
    • clearTails

      public CircuitConstraintProto.Builder clearTails()
      repeated int32 tails = 3;
      Returns:
      This builder for chaining.
    • getHeadsList

      public List<Integer> getHeadsList()
      repeated int32 heads = 4;
      Specified by:
      getHeadsList in interface CircuitConstraintProtoOrBuilder
      Returns:
      A list containing the heads.
    • getHeadsCount

      public int getHeadsCount()
      repeated int32 heads = 4;
      Specified by:
      getHeadsCount in interface CircuitConstraintProtoOrBuilder
      Returns:
      The count of heads.
    • getHeads

      public int getHeads(int index)
      repeated int32 heads = 4;
      Specified by:
      getHeads in interface CircuitConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The heads at the given index.
    • setHeads

      public CircuitConstraintProto.Builder setHeads(int index, int value)
      repeated int32 heads = 4;
      Parameters:
      index - The index to set the value at.
      value - The heads to set.
      Returns:
      This builder for chaining.
    • addHeads

      public CircuitConstraintProto.Builder addHeads(int value)
      repeated int32 heads = 4;
      Parameters:
      value - The heads to add.
      Returns:
      This builder for chaining.
    • addAllHeads

      public CircuitConstraintProto.Builder addAllHeads(Iterable<? extends Integer> values)
      repeated int32 heads = 4;
      Parameters:
      values - The heads to add.
      Returns:
      This builder for chaining.
    • clearHeads

      public CircuitConstraintProto.Builder clearHeads()
      repeated int32 heads = 4;
      Returns:
      This builder for chaining.
    • getLiteralsList

      public List<Integer> getLiteralsList()
      repeated int32 literals = 5;
      Specified by:
      getLiteralsList in interface CircuitConstraintProtoOrBuilder
      Returns:
      A list containing the literals.
    • getLiteralsCount

      public int getLiteralsCount()
      repeated int32 literals = 5;
      Specified by:
      getLiteralsCount in interface CircuitConstraintProtoOrBuilder
      Returns:
      The count of literals.
    • getLiterals

      public int getLiterals(int index)
      repeated int32 literals = 5;
      Specified by:
      getLiterals in interface CircuitConstraintProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The literals at the given index.
    • setLiterals

      public CircuitConstraintProto.Builder setLiterals(int index, int value)
      repeated int32 literals = 5;
      Parameters:
      index - The index to set the value at.
      value - The literals to set.
      Returns:
      This builder for chaining.
    • addLiterals

      public CircuitConstraintProto.Builder addLiterals(int value)
      repeated int32 literals = 5;
      Parameters:
      value - The literals to add.
      Returns:
      This builder for chaining.
    • addAllLiterals

      public CircuitConstraintProto.Builder addAllLiterals(Iterable<? extends Integer> values)
      repeated int32 literals = 5;
      Parameters:
      values - The literals to add.
      Returns:
      This builder for chaining.
    • clearLiterals

      public CircuitConstraintProto.Builder clearLiterals()
      repeated int32 literals = 5;
      Returns:
      This builder for chaining.