4 package com.google.ortools.linearsolver;
16 com.google.protobuf.GeneratedMessageV3 implements
19 private static final long serialVersionUID = 0L;
26 varIndex_ = emptyIntList();
27 weight_ = emptyDoubleList();
31 @SuppressWarnings({
"unused"})
33 UnusedPrivateParameter unused) {
38 public final com.
google.protobuf.UnknownFieldSet
40 return this.unknownFields;
43 com.
google.protobuf.CodedInputStream input,
44 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
45 throws com.
google.protobuf.InvalidProtocolBufferException {
47 if (extensionRegistry ==
null) {
48 throw new java.lang.NullPointerException();
50 int mutable_bitField0_ = 0;
51 com.
google.protobuf.UnknownFieldSet.Builder unknownFields =
52 com.
google.protobuf.UnknownFieldSet.newBuilder();
56 int tag = input.readTag();
62 int rawValue = input.readEnum();
63 @SuppressWarnings(
"deprecation")
64 com.google.ortools.linearsolver.MPSosConstraint.Type value =
com.google.ortools.linearsolver.MPSosConstraint.Type.valueOf(rawValue);
66 unknownFields.mergeVarintField(1, rawValue);
68 bitField0_ |= 0x00000001;
74 if (!((mutable_bitField0_ & 0x00000002) != 0)) {
75 varIndex_ = newIntList();
76 mutable_bitField0_ |= 0x00000002;
78 varIndex_.addInt(input.readInt32());
82 int length = input.readRawVarint32();
83 int limit = input.pushLimit(length);
84 if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
85 varIndex_ = newIntList();
86 mutable_bitField0_ |= 0x00000002;
88 while (input.getBytesUntilLimit() > 0) {
89 varIndex_.addInt(input.readInt32());
91 input.popLimit(limit);
95 if (!((mutable_bitField0_ & 0x00000004) != 0)) {
96 weight_ = newDoubleList();
97 mutable_bitField0_ |= 0x00000004;
99 weight_.addDouble(input.readDouble());
103 int length = input.readRawVarint32();
104 int limit = input.pushLimit(length);
105 if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
106 weight_ = newDoubleList();
107 mutable_bitField0_ |= 0x00000004;
109 while (input.getBytesUntilLimit() > 0) {
110 weight_.addDouble(input.readDouble());
112 input.popLimit(limit);
116 if (!parseUnknownField(
117 input, unknownFields, extensionRegistry, tag)) {
124 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
125 throw e.setUnfinishedMessage(
this);
126 }
catch (java.io.IOException e) {
127 throw new com.
google.protobuf.InvalidProtocolBufferException(
128 e).setUnfinishedMessage(
this);
130 if (((mutable_bitField0_ & 0x00000002) != 0)) {
131 varIndex_.makeImmutable();
133 if (((mutable_bitField0_ & 0x00000004) != 0)) {
134 weight_.makeImmutable();
136 this.unknownFields = unknownFields.build();
137 makeExtensionsImmutable();
140 public static final com.
google.protobuf.Descriptors.Descriptor
146 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
149 .ensureFieldAccessorsInitialized(
157 implements
com.
google.protobuf.ProtocolMessageEnum {
185 public static final int SOS1_DEFAULT_VALUE = 0;
195 public static final int SOS2_VALUE = 1;
205 @java.lang.Deprecated
207 return forNumber(value);
212 case 0:
return SOS1_DEFAULT;
214 default:
return null;
220 return internalValueMap;
222 private static final com.
google.protobuf.Internal.EnumLiteMap<
223 Type> internalValueMap =
225 public Type findValueByNumber(
int number) {
230 public final com.
google.protobuf.Descriptors.EnumValueDescriptor
234 public final com.
google.protobuf.Descriptors.EnumDescriptor
238 public static final com.
google.protobuf.Descriptors.EnumDescriptor
243 private static final Type[] VALUES = values();
246 com.
google.protobuf.Descriptors.EnumValueDescriptor desc) {
248 throw new java.lang.IllegalArgumentException(
249 "EnumValueDescriptor is not for this type.");
251 return VALUES[desc.getIndex()];
254 private final int value;
256 private Type(
int value) {
263 private int bitField0_;
270 return ((bitField0_ & 0x00000001) != 0);
276 @SuppressWarnings(
"deprecation")
282 private com.
google.protobuf.Internal.IntList varIndex_;
291 public java.util.List<java.lang.Integer>
304 return varIndex_.size();
315 return varIndex_.getInt(index);
319 private com.
google.protobuf.Internal.DoubleList weight_;
335 public java.util.List<java.lang.Double>
355 return weight_.size();
373 return weight_.getDouble(index);
376 private byte memoizedIsInitialized = -1;
383 memoizedIsInitialized = 1;
389 throws java.io.IOException {
390 if (((bitField0_ & 0x00000001) != 0)) {
391 output.writeEnum(1, type_);
393 for (
int i = 0; i < varIndex_.size(); i++) {
394 output.writeInt32(2, varIndex_.getInt(i));
396 for (
int i = 0; i < weight_.size(); i++) {
397 output.writeDouble(3, weight_.getDouble(i));
399 unknownFields.writeTo(output);
404 int size = memoizedSize;
405 if (size != -1)
return size;
408 if (((bitField0_ & 0x00000001) != 0)) {
409 size +=
com.
google.protobuf.CodedOutputStream
410 .computeEnumSize(1, type_);
414 for (
int i = 0; i < varIndex_.size(); i++) {
415 dataSize +=
com.
google.protobuf.CodedOutputStream
416 .computeInt32SizeNoTag(varIndex_.getInt(i));
427 size += unknownFields.getSerializedSize();
433 public boolean equals(
final java.lang.Object obj) {
438 return super.equals(obj);
442 if (
hasType() != other.hasType())
return false;
444 if (type_ != other.type_)
return false;
447 .equals(other.getVarIndexList()))
return false;
449 .equals(other.getWeightList()))
return false;
450 if (!unknownFields.equals(other.unknownFields))
return false;
456 if (memoizedHashCode != 0) {
457 return memoizedHashCode;
463 hash = (53 * hash) + type_;
473 hash = (29 * hash) + unknownFields.hashCode();
474 memoizedHashCode = hash;
479 java.nio.ByteBuffer data)
480 throws com.
google.protobuf.InvalidProtocolBufferException {
481 return PARSER.parseFrom(data);
484 java.nio.ByteBuffer data,
485 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
486 throws com.
google.protobuf.InvalidProtocolBufferException {
487 return PARSER.parseFrom(data, extensionRegistry);
491 throws com.
google.protobuf.InvalidProtocolBufferException {
492 return PARSER.parseFrom(data);
496 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
497 throws com.
google.protobuf.InvalidProtocolBufferException {
498 return PARSER.parseFrom(data, extensionRegistry);
501 throws com.
google.protobuf.InvalidProtocolBufferException {
502 return PARSER.parseFrom(data);
506 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
507 throws com.
google.protobuf.InvalidProtocolBufferException {
508 return PARSER.parseFrom(data, extensionRegistry);
511 throws java.io.IOException {
512 return com.
google.protobuf.GeneratedMessageV3
513 .parseWithIOException(
PARSER, input);
516 java.io.InputStream input,
517 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
518 throws java.io.IOException {
519 return com.
google.protobuf.GeneratedMessageV3
520 .parseWithIOException(
PARSER, input, extensionRegistry);
523 throws java.io.IOException {
524 return com.
google.protobuf.GeneratedMessageV3
525 .parseDelimitedWithIOException(
PARSER, input);
528 java.io.InputStream input,
529 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
530 throws java.io.IOException {
531 return com.
google.protobuf.GeneratedMessageV3
532 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
535 com.
google.protobuf.CodedInputStream input)
536 throws java.io.IOException {
537 return com.
google.protobuf.GeneratedMessageV3
538 .parseWithIOException(
PARSER, input);
541 com.
google.protobuf.CodedInputStream input,
542 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
543 throws java.io.IOException {
544 return com.
google.protobuf.GeneratedMessageV3
545 .parseWithIOException(
PARSER, input, extensionRegistry);
558 return this == DEFAULT_INSTANCE
564 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
578 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
581 public static final com.
google.protobuf.Descriptors.Descriptor
587 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
590 .ensureFieldAccessorsInitialized(
596 maybeForceBuilderInitialization();
600 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
602 maybeForceBuilderInitialization();
604 private void maybeForceBuilderInitialization() {
605 if (
com.
google.protobuf.GeneratedMessageV3
606 .alwaysUseFieldBuilders) {
613 bitField0_ = (bitField0_ & ~0x00000001);
614 varIndex_ = emptyIntList();
615 bitField0_ = (bitField0_ & ~0x00000002);
616 weight_ = emptyDoubleList();
617 bitField0_ = (bitField0_ & ~0x00000004);
622 public com.
google.protobuf.Descriptors.Descriptor
635 if (!result.isInitialized()) {
636 throw newUninitializedMessageException(result);
644 int from_bitField0_ = bitField0_;
645 int to_bitField0_ = 0;
646 if (((from_bitField0_ & 0x00000001) != 0)) {
647 to_bitField0_ |= 0x00000001;
649 result.type_ = type_;
650 if (((bitField0_ & 0x00000002) != 0)) {
651 varIndex_.makeImmutable();
652 bitField0_ = (bitField0_ & ~0x00000002);
654 result.varIndex_ = varIndex_;
655 if (((bitField0_ & 0x00000004) != 0)) {
656 weight_.makeImmutable();
657 bitField0_ = (bitField0_ & ~0x00000004);
659 result.weight_ = weight_;
660 result.bitField0_ = to_bitField0_;
667 return super.
clone();
671 com.
google.protobuf.Descriptors.FieldDescriptor field,
672 java.lang.Object value) {
673 return super.
setField(field, value);
677 com.
google.protobuf.Descriptors.FieldDescriptor field) {
682 com.
google.protobuf.Descriptors.OneofDescriptor oneof) {
687 com.
google.protobuf.Descriptors.FieldDescriptor field,
688 int index, java.lang.Object value) {
693 com.
google.protobuf.Descriptors.FieldDescriptor field,
694 java.lang.Object value) {
702 super.mergeFrom(other);
709 if (other.hasType()) {
712 if (!other.varIndex_.isEmpty()) {
713 if (varIndex_.isEmpty()) {
714 varIndex_ = other.varIndex_;
715 bitField0_ = (bitField0_ & ~0x00000002);
717 ensureVarIndexIsMutable();
718 varIndex_.addAll(other.varIndex_);
722 if (!other.weight_.isEmpty()) {
723 if (weight_.isEmpty()) {
724 weight_ = other.weight_;
725 bitField0_ = (bitField0_ & ~0x00000004);
727 ensureWeightIsMutable();
728 weight_.addAll(other.weight_);
744 com.
google.protobuf.CodedInputStream input,
745 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
746 throws java.io.IOException {
749 parsedMessage =
PARSER.parsePartialFrom(input, extensionRegistry);
750 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
752 throw e.unwrapIOException();
754 if (parsedMessage !=
null) {
760 private int bitField0_;
762 private int type_ = 0;
767 return ((bitField0_ & 0x00000001) != 0);
773 @SuppressWarnings(
"deprecation")
782 throw new NullPointerException();
784 bitField0_ |= 0x00000001;
785 type_ = value.getNumber();
793 bitField0_ = (bitField0_ & ~0x00000001);
799 private com.
google.protobuf.Internal.IntList varIndex_ = emptyIntList();
800 private void ensureVarIndexIsMutable() {
801 if (!((bitField0_ & 0x00000002) != 0)) {
802 varIndex_ = mutableCopy(varIndex_);
803 bitField0_ |= 0x00000002;
814 public java.util.List<java.lang.Integer>
816 return ((bitField0_ & 0x00000002) != 0) ?
817 java.util.Collections.unmodifiableList(varIndex_) : varIndex_;
828 return varIndex_.size();
839 return varIndex_.getInt(index);
850 int index,
int value) {
851 ensureVarIndexIsMutable();
852 varIndex_.setInt(index, value);
865 ensureVarIndexIsMutable();
866 varIndex_.addInt(value);
879 java.lang.Iterable<? extends java.lang.Integer> values) {
880 ensureVarIndexIsMutable();
881 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
895 varIndex_ = emptyIntList();
896 bitField0_ = (bitField0_ & ~0x00000002);
901 private com.
google.protobuf.Internal.DoubleList weight_ = emptyDoubleList();
902 private void ensureWeightIsMutable() {
903 if (!((bitField0_ & 0x00000004) != 0)) {
904 weight_ = mutableCopy(weight_);
905 bitField0_ |= 0x00000004;
923 public java.util.List<java.lang.Double>
925 return ((bitField0_ & 0x00000004) != 0) ?
926 java.util.Collections.unmodifiableList(weight_) : weight_;
944 return weight_.size();
962 return weight_.getDouble(index);
980 int index,
double value) {
981 ensureWeightIsMutable();
982 weight_.setDouble(index, value);
1002 ensureWeightIsMutable();
1003 weight_.addDouble(value);
1023 java.lang.Iterable<? extends java.lang.Double> values) {
1024 ensureWeightIsMutable();
1025 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
1046 weight_ = emptyDoubleList();
1047 bitField0_ = (bitField0_ & ~0x00000004);
1053 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1059 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1074 return DEFAULT_INSTANCE;
1081 com.
google.protobuf.CodedInputStream input,
1082 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
1083 throws com.
google.protobuf.InvalidProtocolBufferException {
1099 return DEFAULT_INSTANCE;