Class FloatObjectiveProto.Builder

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

public static final class FloatObjectiveProto.Builder extends com.google.protobuf.GeneratedMessage.Builder<FloatObjectiveProto.Builder> implements FloatObjectiveProtoOrBuilder
 A linear floating point objective: sum coeffs[i] * vars[i] + offset.
 Note that the variable can only still take integer value.
 
Protobuf type operations_research.sat.FloatObjectiveProto
  • 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<FloatObjectiveProto.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<FloatObjectiveProto.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<FloatObjectiveProto.Builder>
    • getDefaultInstanceForType

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

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

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

      public FloatObjectiveProto.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<FloatObjectiveProto.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<FloatObjectiveProto.Builder>
    • mergeFrom

      public FloatObjectiveProto.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<FloatObjectiveProto.Builder>
      Throws:
      IOException
    • getVarsList

      public List<Integer> getVarsList()
      repeated int32 vars = 1;
      Specified by:
      getVarsList in interface FloatObjectiveProtoOrBuilder
      Returns:
      A list containing the vars.
    • getVarsCount

      public int getVarsCount()
      repeated int32 vars = 1;
      Specified by:
      getVarsCount in interface FloatObjectiveProtoOrBuilder
      Returns:
      The count of vars.
    • getVars

      public int getVars(int index)
      repeated int32 vars = 1;
      Specified by:
      getVars in interface FloatObjectiveProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The vars at the given index.
    • setVars

      public FloatObjectiveProto.Builder setVars(int index, int value)
      repeated int32 vars = 1;
      Parameters:
      index - The index to set the value at.
      value - The vars to set.
      Returns:
      This builder for chaining.
    • addVars

      public FloatObjectiveProto.Builder addVars(int value)
      repeated int32 vars = 1;
      Parameters:
      value - The vars to add.
      Returns:
      This builder for chaining.
    • addAllVars

      public FloatObjectiveProto.Builder addAllVars(Iterable<? extends Integer> values)
      repeated int32 vars = 1;
      Parameters:
      values - The vars to add.
      Returns:
      This builder for chaining.
    • clearVars

      public FloatObjectiveProto.Builder clearVars()
      repeated int32 vars = 1;
      Returns:
      This builder for chaining.
    • getCoeffsList

      public List<Double> getCoeffsList()
      repeated double coeffs = 2;
      Specified by:
      getCoeffsList in interface FloatObjectiveProtoOrBuilder
      Returns:
      A list containing the coeffs.
    • getCoeffsCount

      public int getCoeffsCount()
      repeated double coeffs = 2;
      Specified by:
      getCoeffsCount in interface FloatObjectiveProtoOrBuilder
      Returns:
      The count of coeffs.
    • getCoeffs

      public double getCoeffs(int index)
      repeated double coeffs = 2;
      Specified by:
      getCoeffs in interface FloatObjectiveProtoOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The coeffs at the given index.
    • setCoeffs

      public FloatObjectiveProto.Builder setCoeffs(int index, double value)
      repeated double coeffs = 2;
      Parameters:
      index - The index to set the value at.
      value - The coeffs to set.
      Returns:
      This builder for chaining.
    • addCoeffs

      public FloatObjectiveProto.Builder addCoeffs(double value)
      repeated double coeffs = 2;
      Parameters:
      value - The coeffs to add.
      Returns:
      This builder for chaining.
    • addAllCoeffs

      public FloatObjectiveProto.Builder addAllCoeffs(Iterable<? extends Double> values)
      repeated double coeffs = 2;
      Parameters:
      values - The coeffs to add.
      Returns:
      This builder for chaining.
    • clearCoeffs

      public FloatObjectiveProto.Builder clearCoeffs()
      repeated double coeffs = 2;
      Returns:
      This builder for chaining.
    • getOffset

      public double getOffset()
      double offset = 3;
      Specified by:
      getOffset in interface FloatObjectiveProtoOrBuilder
      Returns:
      The offset.
    • setOffset

      public FloatObjectiveProto.Builder setOffset(double value)
      double offset = 3;
      Parameters:
      value - The offset to set.
      Returns:
      This builder for chaining.
    • clearOffset

      public FloatObjectiveProto.Builder clearOffset()
      double offset = 3;
      Returns:
      This builder for chaining.
    • getMaximize

      public boolean getMaximize()
       The optimization direction. The default is to minimize
       
      bool maximize = 4;
      Specified by:
      getMaximize in interface FloatObjectiveProtoOrBuilder
      Returns:
      The maximize.
    • setMaximize

      public FloatObjectiveProto.Builder setMaximize(boolean value)
       The optimization direction. The default is to minimize
       
      bool maximize = 4;
      Parameters:
      value - The maximize to set.
      Returns:
      This builder for chaining.
    • clearMaximize

      public FloatObjectiveProto.Builder clearMaximize()
       The optimization direction. The default is to minimize
       
      bool maximize = 4;
      Returns:
      This builder for chaining.