4 package com.google.ortools.linearsolver;
10 com.google.protobuf.GeneratedMessageV3 implements
13 private static final long serialVersionUID = 0L;
20 variableValue_ = emptyDoubleList();
21 dualValue_ = emptyDoubleList();
22 reducedCost_ = emptyDoubleList();
26 @SuppressWarnings({
"unused"})
28 UnusedPrivateParameter unused) {
33 public final com.
google.protobuf.UnknownFieldSet
35 return this.unknownFields;
38 com.
google.protobuf.CodedInputStream input,
39 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
40 throws com.
google.protobuf.InvalidProtocolBufferException {
42 if (extensionRegistry ==
null) {
43 throw new java.lang.NullPointerException();
45 int mutable_bitField0_ = 0;
46 com.
google.protobuf.UnknownFieldSet.Builder unknownFields =
47 com.
google.protobuf.UnknownFieldSet.newBuilder();
51 int tag = input.readTag();
57 int rawValue = input.readEnum();
58 @SuppressWarnings(
"deprecation")
59 com.google.ortools.linearsolver.MPSolverResponseStatus value =
com.google.ortools.linearsolver.MPSolverResponseStatus.valueOf(rawValue);
61 unknownFields.mergeVarintField(1, rawValue);
63 bitField0_ |= 0x00000001;
69 bitField0_ |= 0x00000002;
70 objectiveValue_ = input.readDouble();
74 if (!((mutable_bitField0_ & 0x00000008) != 0)) {
75 variableValue_ = newDoubleList();
76 mutable_bitField0_ |= 0x00000008;
78 variableValue_.addDouble(input.readDouble());
82 int length = input.readRawVarint32();
83 int limit = input.pushLimit(length);
84 if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
85 variableValue_ = newDoubleList();
86 mutable_bitField0_ |= 0x00000008;
88 while (input.getBytesUntilLimit() > 0) {
89 variableValue_.addDouble(input.readDouble());
91 input.popLimit(limit);
95 if (!((mutable_bitField0_ & 0x00000010) != 0)) {
96 dualValue_ = newDoubleList();
97 mutable_bitField0_ |= 0x00000010;
99 dualValue_.addDouble(input.readDouble());
103 int length = input.readRawVarint32();
104 int limit = input.pushLimit(length);
105 if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
106 dualValue_ = newDoubleList();
107 mutable_bitField0_ |= 0x00000010;
109 while (input.getBytesUntilLimit() > 0) {
110 dualValue_.addDouble(input.readDouble());
112 input.popLimit(limit);
116 bitField0_ |= 0x00000004;
117 bestObjectiveBound_ = input.readDouble();
121 if (!((mutable_bitField0_ & 0x00000020) != 0)) {
122 reducedCost_ = newDoubleList();
123 mutable_bitField0_ |= 0x00000020;
125 reducedCost_.addDouble(input.readDouble());
129 int length = input.readRawVarint32();
130 int limit = input.pushLimit(length);
131 if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
132 reducedCost_ = newDoubleList();
133 mutable_bitField0_ |= 0x00000020;
135 while (input.getBytesUntilLimit() > 0) {
136 reducedCost_.addDouble(input.readDouble());
138 input.popLimit(limit);
142 if (!parseUnknownField(
143 input, unknownFields, extensionRegistry, tag)) {
150 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
151 throw e.setUnfinishedMessage(
this);
152 }
catch (java.io.IOException e) {
153 throw new com.
google.protobuf.InvalidProtocolBufferException(
154 e).setUnfinishedMessage(
this);
156 if (((mutable_bitField0_ & 0x00000008) != 0)) {
157 variableValue_.makeImmutable();
159 if (((mutable_bitField0_ & 0x00000010) != 0)) {
160 dualValue_.makeImmutable();
162 if (((mutable_bitField0_ & 0x00000020) != 0)) {
163 reducedCost_.makeImmutable();
165 this.unknownFields = unknownFields.build();
166 makeExtensionsImmutable();
169 public static final com.
google.protobuf.Descriptors.Descriptor
175 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
178 .ensureFieldAccessorsInitialized(
182 private int bitField0_;
193 return ((bitField0_ & 0x00000001) != 0);
203 @SuppressWarnings(
"deprecation")
209 private double objectiveValue_;
220 return ((bitField0_ & 0x00000002) != 0);
232 return objectiveValue_;
236 private double bestObjectiveBound_;
249 return ((bitField0_ & 0x00000004) != 0);
263 return bestObjectiveBound_;
267 private com.
google.protobuf.Internal.DoubleList variableValue_;
277 public java.util.List<java.lang.Double>
279 return variableValue_;
291 return variableValue_.size();
303 return variableValue_.getDouble(index);
305 private int variableValueMemoizedSerializedSize = -1;
308 private com.
google.protobuf.Internal.DoubleList dualValue_;
321 public java.util.List<java.lang.Double>
338 return dualValue_.size();
353 return dualValue_.getDouble(index);
355 private int dualValueMemoizedSerializedSize = -1;
358 private com.
google.protobuf.Internal.DoubleList reducedCost_;
371 public java.util.List<java.lang.Double>
388 return reducedCost_.size();
403 return reducedCost_.getDouble(index);
405 private int reducedCostMemoizedSerializedSize = -1;
407 private byte memoizedIsInitialized = -1;
414 memoizedIsInitialized = 1;
420 throws java.io.IOException {
422 if (((bitField0_ & 0x00000001) != 0)) {
423 output.writeEnum(1, status_);
425 if (((bitField0_ & 0x00000002) != 0)) {
426 output.writeDouble(2, objectiveValue_);
429 output.writeUInt32NoTag(26);
430 output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
432 for (
int i = 0; i < variableValue_.size(); i++) {
433 output.writeDoubleNoTag(variableValue_.getDouble(i));
436 output.writeUInt32NoTag(34);
437 output.writeUInt32NoTag(dualValueMemoizedSerializedSize);
439 for (
int i = 0; i < dualValue_.size(); i++) {
440 output.writeDoubleNoTag(dualValue_.getDouble(i));
442 if (((bitField0_ & 0x00000004) != 0)) {
443 output.writeDouble(5, bestObjectiveBound_);
446 output.writeUInt32NoTag(50);
447 output.writeUInt32NoTag(reducedCostMemoizedSerializedSize);
449 for (
int i = 0; i < reducedCost_.size(); i++) {
450 output.writeDoubleNoTag(reducedCost_.getDouble(i));
452 unknownFields.writeTo(output);
457 int size = memoizedSize;
458 if (size != -1)
return size;
461 if (((bitField0_ & 0x00000001) != 0)) {
462 size +=
com.
google.protobuf.CodedOutputStream
463 .computeEnumSize(1, status_);
465 if (((bitField0_ & 0x00000002) != 0)) {
466 size +=
com.
google.protobuf.CodedOutputStream
467 .computeDoubleSize(2, objectiveValue_);
475 size +=
com.
google.protobuf.CodedOutputStream
476 .computeInt32SizeNoTag(dataSize);
478 variableValueMemoizedSerializedSize = dataSize;
486 size +=
com.
google.protobuf.CodedOutputStream
487 .computeInt32SizeNoTag(dataSize);
489 dualValueMemoizedSerializedSize = dataSize;
491 if (((bitField0_ & 0x00000004) != 0)) {
492 size +=
com.
google.protobuf.CodedOutputStream
493 .computeDoubleSize(5, bestObjectiveBound_);
501 size +=
com.
google.protobuf.CodedOutputStream
502 .computeInt32SizeNoTag(dataSize);
504 reducedCostMemoizedSerializedSize = dataSize;
506 size += unknownFields.getSerializedSize();
512 public boolean equals(
final java.lang.Object obj) {
517 return super.equals(obj);
521 if (
hasStatus() != other.hasStatus())
return false;
523 if (status_ != other.status_)
return false;
528 != java.lang.Double.doubleToLongBits(
529 other.getObjectiveValue()))
return false;
534 != java.lang.Double.doubleToLongBits(
535 other.getBestObjectiveBound()))
return false;
538 .equals(other.getVariableValueList()))
return false;
540 .equals(other.getDualValueList()))
return false;
542 .equals(other.getReducedCostList()))
return false;
543 if (!unknownFields.equals(other.unknownFields))
return false;
549 if (memoizedHashCode != 0) {
550 return memoizedHashCode;
556 hash = (53 * hash) + status_;
560 hash = (53 * hash) +
com.
google.protobuf.Internal.hashLong(
565 hash = (53 * hash) +
com.
google.protobuf.Internal.hashLong(
580 hash = (29 * hash) + unknownFields.hashCode();
581 memoizedHashCode = hash;
586 java.nio.ByteBuffer data)
587 throws com.
google.protobuf.InvalidProtocolBufferException {
588 return PARSER.parseFrom(data);
591 java.nio.ByteBuffer data,
592 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
593 throws com.
google.protobuf.InvalidProtocolBufferException {
594 return PARSER.parseFrom(data, extensionRegistry);
598 throws com.
google.protobuf.InvalidProtocolBufferException {
599 return PARSER.parseFrom(data);
603 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
604 throws com.
google.protobuf.InvalidProtocolBufferException {
605 return PARSER.parseFrom(data, extensionRegistry);
608 throws com.
google.protobuf.InvalidProtocolBufferException {
609 return PARSER.parseFrom(data);
613 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
614 throws com.
google.protobuf.InvalidProtocolBufferException {
615 return PARSER.parseFrom(data, extensionRegistry);
618 throws java.io.IOException {
619 return com.
google.protobuf.GeneratedMessageV3
620 .parseWithIOException(
PARSER, input);
623 java.io.InputStream input,
624 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
625 throws java.io.IOException {
626 return com.
google.protobuf.GeneratedMessageV3
627 .parseWithIOException(
PARSER, input, extensionRegistry);
630 throws java.io.IOException {
631 return com.
google.protobuf.GeneratedMessageV3
632 .parseDelimitedWithIOException(
PARSER, input);
635 java.io.InputStream input,
636 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
637 throws java.io.IOException {
638 return com.
google.protobuf.GeneratedMessageV3
639 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
642 com.
google.protobuf.CodedInputStream input)
643 throws java.io.IOException {
644 return com.
google.protobuf.GeneratedMessageV3
645 .parseWithIOException(
PARSER, input);
648 com.
google.protobuf.CodedInputStream input,
649 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
650 throws java.io.IOException {
651 return com.
google.protobuf.GeneratedMessageV3
652 .parseWithIOException(
PARSER, input, extensionRegistry);
665 return this == DEFAULT_INSTANCE
671 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
679 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
682 public static final com.
google.protobuf.Descriptors.Descriptor
688 protected com.
google.protobuf.GeneratedMessageV3.FieldAccessorTable
691 .ensureFieldAccessorsInitialized(
697 maybeForceBuilderInitialization();
701 com.
google.protobuf.GeneratedMessageV3.BuilderParent parent) {
703 maybeForceBuilderInitialization();
705 private void maybeForceBuilderInitialization() {
706 if (
com.
google.protobuf.GeneratedMessageV3
707 .alwaysUseFieldBuilders) {
714 bitField0_ = (bitField0_ & ~0x00000001);
715 objectiveValue_ = 0D;
716 bitField0_ = (bitField0_ & ~0x00000002);
717 bestObjectiveBound_ = 0D;
718 bitField0_ = (bitField0_ & ~0x00000004);
719 variableValue_ = emptyDoubleList();
720 bitField0_ = (bitField0_ & ~0x00000008);
721 dualValue_ = emptyDoubleList();
722 bitField0_ = (bitField0_ & ~0x00000010);
723 reducedCost_ = emptyDoubleList();
724 bitField0_ = (bitField0_ & ~0x00000020);
729 public com.
google.protobuf.Descriptors.Descriptor
742 if (!result.isInitialized()) {
743 throw newUninitializedMessageException(result);
751 int from_bitField0_ = bitField0_;
752 int to_bitField0_ = 0;
753 if (((from_bitField0_ & 0x00000001) != 0)) {
754 to_bitField0_ |= 0x00000001;
756 result.status_ = status_;
757 if (((from_bitField0_ & 0x00000002) != 0)) {
758 result.objectiveValue_ = objectiveValue_;
759 to_bitField0_ |= 0x00000002;
761 if (((from_bitField0_ & 0x00000004) != 0)) {
762 result.bestObjectiveBound_ = bestObjectiveBound_;
763 to_bitField0_ |= 0x00000004;
765 if (((bitField0_ & 0x00000008) != 0)) {
766 variableValue_.makeImmutable();
767 bitField0_ = (bitField0_ & ~0x00000008);
769 result.variableValue_ = variableValue_;
770 if (((bitField0_ & 0x00000010) != 0)) {
771 dualValue_.makeImmutable();
772 bitField0_ = (bitField0_ & ~0x00000010);
774 result.dualValue_ = dualValue_;
775 if (((bitField0_ & 0x00000020) != 0)) {
776 reducedCost_.makeImmutable();
777 bitField0_ = (bitField0_ & ~0x00000020);
779 result.reducedCost_ = reducedCost_;
780 result.bitField0_ = to_bitField0_;
787 return super.
clone();
791 com.
google.protobuf.Descriptors.FieldDescriptor field,
792 java.lang.Object value) {
793 return super.
setField(field, value);
797 com.
google.protobuf.Descriptors.FieldDescriptor field) {
802 com.
google.protobuf.Descriptors.OneofDescriptor oneof) {
807 com.
google.protobuf.Descriptors.FieldDescriptor field,
808 int index, java.lang.Object value) {
813 com.
google.protobuf.Descriptors.FieldDescriptor field,
814 java.lang.Object value) {
822 super.mergeFrom(other);
829 if (other.hasStatus()) {
832 if (other.hasObjectiveValue()) {
835 if (other.hasBestObjectiveBound()) {
838 if (!other.variableValue_.isEmpty()) {
839 if (variableValue_.isEmpty()) {
840 variableValue_ = other.variableValue_;
841 bitField0_ = (bitField0_ & ~0x00000008);
843 ensureVariableValueIsMutable();
844 variableValue_.addAll(other.variableValue_);
848 if (!other.dualValue_.isEmpty()) {
849 if (dualValue_.isEmpty()) {
850 dualValue_ = other.dualValue_;
851 bitField0_ = (bitField0_ & ~0x00000010);
853 ensureDualValueIsMutable();
854 dualValue_.addAll(other.dualValue_);
858 if (!other.reducedCost_.isEmpty()) {
859 if (reducedCost_.isEmpty()) {
860 reducedCost_ = other.reducedCost_;
861 bitField0_ = (bitField0_ & ~0x00000020);
863 ensureReducedCostIsMutable();
864 reducedCost_.addAll(other.reducedCost_);
880 com.
google.protobuf.CodedInputStream input,
881 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
882 throws java.io.IOException {
885 parsedMessage =
PARSER.parsePartialFrom(input, extensionRegistry);
886 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
888 throw e.unwrapIOException();
890 if (parsedMessage !=
null) {
896 private int bitField0_;
898 private int status_ = 99;
907 return ((bitField0_ & 0x00000001) != 0);
917 @SuppressWarnings(
"deprecation")
930 throw new NullPointerException();
932 bitField0_ |= 0x00000001;
933 status_ = value.getNumber();
945 bitField0_ = (bitField0_ & ~0x00000001);
951 private double objectiveValue_ ;
962 return ((bitField0_ & 0x00000002) != 0);
974 return objectiveValue_;
986 bitField0_ |= 0x00000002;
987 objectiveValue_ = value;
1001 bitField0_ = (bitField0_ & ~0x00000002);
1002 objectiveValue_ = 0D;
1007 private double bestObjectiveBound_ ;
1020 return ((bitField0_ & 0x00000004) != 0);
1034 return bestObjectiveBound_;
1048 bitField0_ |= 0x00000004;
1049 bestObjectiveBound_ = value;
1065 bitField0_ = (bitField0_ & ~0x00000004);
1066 bestObjectiveBound_ = 0D;
1071 private com.
google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
1072 private void ensureVariableValueIsMutable() {
1073 if (!((bitField0_ & 0x00000008) != 0)) {
1074 variableValue_ = mutableCopy(variableValue_);
1075 bitField0_ |= 0x00000008;
1087 public java.util.List<java.lang.Double>
1089 return ((bitField0_ & 0x00000008) != 0) ?
1090 java.util.Collections.unmodifiableList(variableValue_) : variableValue_;
1102 return variableValue_.size();
1114 return variableValue_.getDouble(index);
1126 int index,
double value) {
1127 ensureVariableValueIsMutable();
1128 variableValue_.setDouble(index, value);
1142 ensureVariableValueIsMutable();
1143 variableValue_.addDouble(value);
1157 java.lang.Iterable<? extends java.lang.Double> values) {
1158 ensureVariableValueIsMutable();
1159 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
1160 values, variableValue_);
1174 variableValue_ = emptyDoubleList();
1175 bitField0_ = (bitField0_ & ~0x00000008);
1180 private com.
google.protobuf.Internal.DoubleList dualValue_ = emptyDoubleList();
1181 private void ensureDualValueIsMutable() {
1182 if (!((bitField0_ & 0x00000010) != 0)) {
1183 dualValue_ = mutableCopy(dualValue_);
1184 bitField0_ |= 0x00000010;
1199 public java.util.List<java.lang.Double>
1201 return ((bitField0_ & 0x00000010) != 0) ?
1202 java.util.Collections.unmodifiableList(dualValue_) : dualValue_;
1217 return dualValue_.size();
1232 return dualValue_.getDouble(index);
1247 int index,
double value) {
1248 ensureDualValueIsMutable();
1249 dualValue_.setDouble(index, value);
1266 ensureDualValueIsMutable();
1267 dualValue_.addDouble(value);
1284 java.lang.Iterable<? extends java.lang.Double> values) {
1285 ensureDualValueIsMutable();
1286 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
1287 values, dualValue_);
1304 dualValue_ = emptyDoubleList();
1305 bitField0_ = (bitField0_ & ~0x00000010);
1310 private com.
google.protobuf.Internal.DoubleList reducedCost_ = emptyDoubleList();
1311 private void ensureReducedCostIsMutable() {
1312 if (!((bitField0_ & 0x00000020) != 0)) {
1313 reducedCost_ = mutableCopy(reducedCost_);
1314 bitField0_ |= 0x00000020;
1329 public java.util.List<java.lang.Double>
1331 return ((bitField0_ & 0x00000020) != 0) ?
1332 java.util.Collections.unmodifiableList(reducedCost_) : reducedCost_;
1347 return reducedCost_.size();
1362 return reducedCost_.getDouble(index);
1377 int index,
double value) {
1378 ensureReducedCostIsMutable();
1379 reducedCost_.setDouble(index, value);
1396 ensureReducedCostIsMutable();
1397 reducedCost_.addDouble(value);
1414 java.lang.Iterable<? extends java.lang.Double> values) {
1415 ensureReducedCostIsMutable();
1416 com.
google.protobuf.AbstractMessageLite.Builder.addAll(
1417 values, reducedCost_);
1434 reducedCost_ = emptyDoubleList();
1435 bitField0_ = (bitField0_ & ~0x00000020);
1441 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1447 final com.
google.protobuf.UnknownFieldSet unknownFields) {
1462 return DEFAULT_INSTANCE;
1469 com.
google.protobuf.CodedInputStream input,
1470 com.
google.protobuf.ExtensionRegistryLite extensionRegistry)
1471 throws com.
google.protobuf.InvalidProtocolBufferException {
1487 return DEFAULT_INSTANCE;