5package com.google.ortools.linearsolver;
11 com.google.protobuf.GeneratedMessageV3 implements
14private static final long serialVersionUID = 0L;
16 private MPSolution(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
20 variableValue_ = emptyDoubleList();
24 @SuppressWarnings({
"unused"})
26 UnusedPrivateParameter unused) {
30 public static final com.google.protobuf.Descriptors.Descriptor
32 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolution_descriptor;
36 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
38 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolution_fieldAccessorTable
39 .ensureFieldAccessorsInitialized(
40 com.google.ortools.linearsolver.MPSolution.class, com.google.ortools.linearsolver.MPSolution.Builder.class);
43 private int bitField0_;
45 private double objectiveValue_ = 0D;
52 return ((bitField0_ & 0x00000001) != 0);
60 return objectiveValue_;
64 @SuppressWarnings(
"serial")
65 private com.google.protobuf.Internal.DoubleList variableValue_ =
72 public java.util.List<java.lang.Double>
74 return variableValue_;
81 return variableValue_.size();
89 return variableValue_.getDouble(index);
91 private int variableValueMemoizedSerializedSize = -1;
93 private byte memoizedIsInitialized = -1;
100 memoizedIsInitialized = 1;
105 public void writeTo(com.google.protobuf.CodedOutputStream output)
106 throws java.io.IOException {
108 if (((bitField0_ & 0x00000001) != 0)) {
109 output.writeDouble(1, objectiveValue_);
112 output.writeUInt32NoTag(18);
113 output.writeUInt32NoTag(variableValueMemoizedSerializedSize);
115 for (
int i = 0; i < variableValue_.size(); i++) {
116 output.writeDoubleNoTag(variableValue_.getDouble(i));
118 getUnknownFields().writeTo(output);
123 int size = memoizedSize;
124 if (size != -1)
return size;
127 if (((bitField0_ & 0x00000001) != 0)) {
128 size += com.google.protobuf.CodedOutputStream
129 .computeDoubleSize(1, objectiveValue_);
137 size += com.google.protobuf.CodedOutputStream
138 .computeInt32SizeNoTag(dataSize);
140 variableValueMemoizedSerializedSize = dataSize;
142 size += getUnknownFields().getSerializedSize();
148 public boolean equals(
final java.lang.Object obj) {
152 if (!(obj instanceof com.google.ortools.linearsolver.MPSolution)) {
153 return super.equals(obj);
160 != java.lang.Double.doubleToLongBits(
165 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
171 if (memoizedHashCode != 0) {
172 return memoizedHashCode;
178 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
185 hash = (29 * hash) + getUnknownFields().hashCode();
186 memoizedHashCode = hash;
191 java.nio.ByteBuffer data)
192 throws com.google.protobuf.InvalidProtocolBufferException {
196 java.nio.ByteBuffer data,
197 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
198 throws com.google.protobuf.InvalidProtocolBufferException {
202 com.google.protobuf.ByteString data)
203 throws com.google.protobuf.InvalidProtocolBufferException {
207 com.google.protobuf.ByteString data,
208 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
209 throws com.google.protobuf.InvalidProtocolBufferException {
213 throws com.google.protobuf.InvalidProtocolBufferException {
218 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
219 throws com.google.protobuf.InvalidProtocolBufferException {
223 throws java.io.IOException {
224 return com.google.protobuf.GeneratedMessageV3
225 .parseWithIOException(
PARSER, input);
228 java.io.InputStream input,
229 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
230 throws java.io.IOException {
231 return com.google.protobuf.GeneratedMessageV3
232 .parseWithIOException(
PARSER, input, extensionRegistry);
236 throws java.io.IOException {
237 return com.google.protobuf.GeneratedMessageV3
238 .parseDelimitedWithIOException(
PARSER, input);
242 java.io.InputStream input,
243 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
244 throws java.io.IOException {
245 return com.google.protobuf.GeneratedMessageV3
246 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
249 com.google.protobuf.CodedInputStream input)
250 throws java.io.IOException {
251 return com.google.protobuf.GeneratedMessageV3
252 .parseWithIOException(
PARSER, input);
255 com.google.protobuf.CodedInputStream input,
256 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
257 throws java.io.IOException {
258 return com.google.protobuf.GeneratedMessageV3
259 .parseWithIOException(
PARSER, input, extensionRegistry);
272 return this == DEFAULT_INSTANCE
278 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
286 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
289 public static final com.google.protobuf.Descriptors.Descriptor
291 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolution_descriptor;
295 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
297 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolution_fieldAccessorTable
298 .ensureFieldAccessorsInitialized(
299 com.google.ortools.linearsolver.MPSolution.class, com.google.ortools.linearsolver.MPSolution.Builder.class);
308 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
316 objectiveValue_ = 0D;
317 variableValue_ = emptyDoubleList();
322 public com.google.protobuf.Descriptors.Descriptor
324 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPSolution_descriptor;
329 return com.google.ortools.linearsolver.MPSolution.getDefaultInstance();
336 throw newUninitializedMessageException(result);
344 if (bitField0_ != 0) { buildPartial0(result); }
349 private void buildPartial0(com.google.ortools.linearsolver.MPSolution result) {
350 int from_bitField0_ = bitField0_;
351 int to_bitField0_ = 0;
352 if (((from_bitField0_ & 0x00000001) != 0)) {
353 result.objectiveValue_ = objectiveValue_;
354 to_bitField0_ |= 0x00000001;
356 if (((from_bitField0_ & 0x00000002) != 0)) {
357 variableValue_.makeImmutable();
358 result.variableValue_ = variableValue_;
360 result.bitField0_ |= to_bitField0_;
365 return super.
clone();
369 com.google.protobuf.Descriptors.FieldDescriptor field,
370 java.lang.Object value) {
371 return super.
setField(field, value);
375 com.google.protobuf.Descriptors.FieldDescriptor field) {
380 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
385 com.google.protobuf.Descriptors.FieldDescriptor field,
386 int index, java.lang.Object value) {
391 com.google.protobuf.Descriptors.FieldDescriptor field,
392 java.lang.Object value) {
397 if (other instanceof com.google.ortools.linearsolver.MPSolution) {
398 return mergeFrom((com.google.ortools.linearsolver.MPSolution)other);
400 super.mergeFrom(other);
406 if (other == com.google.ortools.linearsolver.MPSolution.getDefaultInstance())
return this;
407 if (other.hasObjectiveValue()) {
410 if (!other.variableValue_.isEmpty()) {
411 if (variableValue_.isEmpty()) {
412 variableValue_ = other.variableValue_;
413 variableValue_.makeImmutable();
414 bitField0_ |= 0x00000002;
416 ensureVariableValueIsMutable();
417 variableValue_.addAll(other.variableValue_);
433 com.google.protobuf.CodedInputStream input,
434 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
435 throws java.io.IOException {
436 if (extensionRegistry ==
null) {
437 throw new java.lang.NullPointerException();
440 boolean done =
false;
442 int tag = input.readTag();
448 objectiveValue_ = input.readDouble();
449 bitField0_ |= 0x00000001;
453 double v = input.readDouble();
454 ensureVariableValueIsMutable();
455 variableValue_.addDouble(v);
459 int length = input.readRawVarint32();
460 int limit = input.pushLimit(length);
461 int alloc = length > 4096 ? 4096 : length;
462 ensureVariableValueIsMutable(alloc / 8);
463 while (input.getBytesUntilLimit() > 0) {
464 variableValue_.addDouble(input.readDouble());
466 input.popLimit(limit);
470 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
477 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
478 throw e.unwrapIOException();
484 private int bitField0_;
486 private double objectiveValue_ ;
493 return ((bitField0_ & 0x00000001) != 0);
501 return objectiveValue_;
510 objectiveValue_ = value;
511 bitField0_ |= 0x00000001;
520 bitField0_ = (bitField0_ & ~0x00000001);
521 objectiveValue_ = 0D;
526 private com.google.protobuf.Internal.DoubleList variableValue_ = emptyDoubleList();
527 private void ensureVariableValueIsMutable() {
528 if (!variableValue_.isModifiable()) {
529 variableValue_ = makeMutableCopy(variableValue_);
531 bitField0_ |= 0x00000002;
533 private void ensureVariableValueIsMutable(
int capacity) {
534 if (!variableValue_.isModifiable()) {
535 variableValue_ = makeMutableCopy(variableValue_, capacity);
537 bitField0_ |= 0x00000002;
543 public java.util.List<java.lang.Double>
545 variableValue_.makeImmutable();
546 return variableValue_;
553 return variableValue_.size();
561 return variableValue_.getDouble(index);
570 int index,
double value) {
572 ensureVariableValueIsMutable();
573 variableValue_.setDouble(index, value);
574 bitField0_ |= 0x00000002;
585 ensureVariableValueIsMutable();
586 variableValue_.addDouble(value);
587 bitField0_ |= 0x00000002;
597 java.lang.Iterable<? extends java.lang.Double> values) {
598 ensureVariableValueIsMutable();
599 com.google.protobuf.AbstractMessageLite.Builder.addAll(
600 values, variableValue_);
601 bitField0_ |= 0x00000002;
610 variableValue_ = emptyDoubleList();
611 bitField0_ = (bitField0_ & ~0x00000002);
617 final com.google.protobuf.UnknownFieldSet unknownFields) {
623 final com.google.protobuf.UnknownFieldSet unknownFields) {
634 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPSolution();
638 return DEFAULT_INSTANCE;
641 @java.lang.Deprecated
public static final com.google.protobuf.Parser<
MPSolution>
645 com.google.protobuf.CodedInputStream input,
646 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
647 throws com.google.protobuf.InvalidProtocolBufferException {
650 builder.
mergeFrom(input, extensionRegistry);
651 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
653 }
catch (com.google.protobuf.UninitializedMessageException e) {
654 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
655 }
catch (java.io.IOException e) {
656 throw new com.google.protobuf.InvalidProtocolBufferException(e)
674 return DEFAULT_INSTANCE;