5package com.google.ortools.linearsolver;
19 com.google.protobuf.GeneratedMessageV3 implements
22private static final long serialVersionUID = 0L;
28 qvar1Index_ = emptyIntList();
29 qvar2Index_ = emptyIntList();
30 coefficient_ = emptyDoubleList();
34 @SuppressWarnings({
"unused"})
36 UnusedPrivateParameter unused) {
40 public static final com.google.protobuf.Descriptors.Descriptor
42 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPQuadraticObjective_descriptor;
46 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
48 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPQuadraticObjective_fieldAccessorTable
49 .ensureFieldAccessorsInitialized(
50 com.google.ortools.linearsolver.MPQuadraticObjective.class, com.google.ortools.linearsolver.MPQuadraticObjective.Builder.class);
54 @SuppressWarnings(
"serial")
55 private com.google.protobuf.Internal.IntList qvar1Index_ =
72 public java.util.List<java.lang.Integer>
91 return qvar1Index_.size();
109 return qvar1Index_.getInt(index);
113 @SuppressWarnings(
"serial")
114 private com.google.protobuf.Internal.IntList qvar2Index_ =
121 public java.util.List<java.lang.Integer>
130 return qvar2Index_.size();
138 return qvar2Index_.getInt(index);
142 @SuppressWarnings(
"serial")
143 private com.google.protobuf.Internal.DoubleList coefficient_ =
154 public java.util.List<java.lang.Double>
167 return coefficient_.size();
179 return coefficient_.getDouble(index);
182 private byte memoizedIsInitialized = -1;
189 memoizedIsInitialized = 1;
194 public void writeTo(com.google.protobuf.CodedOutputStream output)
195 throws java.io.IOException {
196 for (
int i = 0; i < qvar1Index_.size(); i++) {
197 output.writeInt32(1, qvar1Index_.getInt(i));
199 for (
int i = 0; i < qvar2Index_.size(); i++) {
200 output.writeInt32(2, qvar2Index_.getInt(i));
202 for (
int i = 0; i < coefficient_.size(); i++) {
203 output.writeDouble(3, coefficient_.getDouble(i));
205 getUnknownFields().writeTo(output);
210 int size = memoizedSize;
211 if (size != -1)
return size;
216 for (
int i = 0; i < qvar1Index_.size(); i++) {
217 dataSize += com.google.protobuf.CodedOutputStream
218 .computeInt32SizeNoTag(qvar1Index_.getInt(i));
225 for (
int i = 0; i < qvar2Index_.size(); i++) {
226 dataSize += com.google.protobuf.CodedOutputStream
227 .computeInt32SizeNoTag(qvar2Index_.getInt(i));
238 size += getUnknownFields().getSerializedSize();
244 public boolean equals(
final java.lang.Object obj) {
248 if (!(obj instanceof com.google.ortools.linearsolver.MPQuadraticObjective)) {
249 return super.equals(obj);
259 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
265 if (memoizedHashCode != 0) {
266 return memoizedHashCode;
282 hash = (29 * hash) + getUnknownFields().hashCode();
283 memoizedHashCode = hash;
288 java.nio.ByteBuffer data)
289 throws com.google.protobuf.InvalidProtocolBufferException {
293 java.nio.ByteBuffer data,
294 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
295 throws com.google.protobuf.InvalidProtocolBufferException {
299 com.google.protobuf.ByteString data)
300 throws com.google.protobuf.InvalidProtocolBufferException {
304 com.google.protobuf.ByteString data,
305 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
306 throws com.google.protobuf.InvalidProtocolBufferException {
310 throws com.google.protobuf.InvalidProtocolBufferException {
315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316 throws com.google.protobuf.InvalidProtocolBufferException {
320 throws java.io.IOException {
321 return com.google.protobuf.GeneratedMessageV3
322 .parseWithIOException(
PARSER, input);
325 java.io.InputStream input,
326 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
327 throws java.io.IOException {
328 return com.google.protobuf.GeneratedMessageV3
329 .parseWithIOException(
PARSER, input, extensionRegistry);
333 throws java.io.IOException {
334 return com.google.protobuf.GeneratedMessageV3
335 .parseDelimitedWithIOException(
PARSER, input);
339 java.io.InputStream input,
340 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
341 throws java.io.IOException {
342 return com.google.protobuf.GeneratedMessageV3
343 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
346 com.google.protobuf.CodedInputStream input)
347 throws java.io.IOException {
348 return com.google.protobuf.GeneratedMessageV3
349 .parseWithIOException(
PARSER, input);
352 com.google.protobuf.CodedInputStream input,
353 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
354 throws java.io.IOException {
355 return com.google.protobuf.GeneratedMessageV3
356 .parseWithIOException(
PARSER, input, extensionRegistry);
364 public static Builder newBuilder(com.google.ortools.linearsolver.MPQuadraticObjective prototype) {
369 return this == DEFAULT_INSTANCE
375 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
391 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
394 public static final com.google.protobuf.Descriptors.Descriptor
396 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPQuadraticObjective_descriptor;
400 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
402 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPQuadraticObjective_fieldAccessorTable
403 .ensureFieldAccessorsInitialized(
404 com.google.ortools.linearsolver.MPQuadraticObjective.class, com.google.ortools.linearsolver.MPQuadraticObjective.Builder.class);
413 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
421 qvar1Index_ = emptyIntList();
422 qvar2Index_ = emptyIntList();
423 coefficient_ = emptyDoubleList();
428 public com.google.protobuf.Descriptors.Descriptor
430 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPQuadraticObjective_descriptor;
435 return com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance();
442 throw newUninitializedMessageException(result);
450 if (bitField0_ != 0) { buildPartial0(result); }
455 private void buildPartial0(com.google.ortools.linearsolver.MPQuadraticObjective result) {
456 int from_bitField0_ = bitField0_;
457 if (((from_bitField0_ & 0x00000001) != 0)) {
458 qvar1Index_.makeImmutable();
459 result.qvar1Index_ = qvar1Index_;
461 if (((from_bitField0_ & 0x00000002) != 0)) {
462 qvar2Index_.makeImmutable();
463 result.qvar2Index_ = qvar2Index_;
465 if (((from_bitField0_ & 0x00000004) != 0)) {
466 coefficient_.makeImmutable();
467 result.coefficient_ = coefficient_;
473 return super.
clone();
477 com.google.protobuf.Descriptors.FieldDescriptor field,
478 java.lang.Object value) {
479 return super.
setField(field, value);
483 com.google.protobuf.Descriptors.FieldDescriptor field) {
488 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
493 com.google.protobuf.Descriptors.FieldDescriptor field,
494 int index, java.lang.Object value) {
499 com.google.protobuf.Descriptors.FieldDescriptor field,
500 java.lang.Object value) {
505 if (other instanceof com.google.ortools.linearsolver.MPQuadraticObjective) {
506 return mergeFrom((com.google.ortools.linearsolver.MPQuadraticObjective)other);
508 super.mergeFrom(other);
514 if (other == com.google.ortools.linearsolver.MPQuadraticObjective.getDefaultInstance())
return this;
515 if (!other.qvar1Index_.isEmpty()) {
516 if (qvar1Index_.isEmpty()) {
517 qvar1Index_ = other.qvar1Index_;
518 qvar1Index_.makeImmutable();
519 bitField0_ |= 0x00000001;
521 ensureQvar1IndexIsMutable();
522 qvar1Index_.addAll(other.qvar1Index_);
526 if (!other.qvar2Index_.isEmpty()) {
527 if (qvar2Index_.isEmpty()) {
528 qvar2Index_ = other.qvar2Index_;
529 qvar2Index_.makeImmutable();
530 bitField0_ |= 0x00000002;
532 ensureQvar2IndexIsMutable();
533 qvar2Index_.addAll(other.qvar2Index_);
537 if (!other.coefficient_.isEmpty()) {
538 if (coefficient_.isEmpty()) {
539 coefficient_ = other.coefficient_;
540 coefficient_.makeImmutable();
541 bitField0_ |= 0x00000004;
543 ensureCoefficientIsMutable();
544 coefficient_.addAll(other.coefficient_);
560 com.google.protobuf.CodedInputStream input,
561 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
562 throws java.io.IOException {
563 if (extensionRegistry ==
null) {
564 throw new java.lang.NullPointerException();
567 boolean done =
false;
569 int tag = input.readTag();
575 int v = input.readInt32();
576 ensureQvar1IndexIsMutable();
577 qvar1Index_.addInt(v);
581 int length = input.readRawVarint32();
582 int limit = input.pushLimit(length);
583 ensureQvar1IndexIsMutable();
584 while (input.getBytesUntilLimit() > 0) {
585 qvar1Index_.addInt(input.readInt32());
587 input.popLimit(limit);
591 int v = input.readInt32();
592 ensureQvar2IndexIsMutable();
593 qvar2Index_.addInt(v);
597 int length = input.readRawVarint32();
598 int limit = input.pushLimit(length);
599 ensureQvar2IndexIsMutable();
600 while (input.getBytesUntilLimit() > 0) {
601 qvar2Index_.addInt(input.readInt32());
603 input.popLimit(limit);
607 double v = input.readDouble();
608 ensureCoefficientIsMutable();
609 coefficient_.addDouble(v);
613 int length = input.readRawVarint32();
614 int limit = input.pushLimit(length);
615 int alloc = length > 4096 ? 4096 : length;
616 ensureCoefficientIsMutable(alloc / 8);
617 while (input.getBytesUntilLimit() > 0) {
618 coefficient_.addDouble(input.readDouble());
620 input.popLimit(limit);
624 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
631 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
632 throw e.unwrapIOException();
638 private int bitField0_;
640 private com.google.protobuf.Internal.IntList qvar1Index_ = emptyIntList();
641 private void ensureQvar1IndexIsMutable() {
642 if (!qvar1Index_.isModifiable()) {
643 qvar1Index_ = makeMutableCopy(qvar1Index_);
645 bitField0_ |= 0x00000001;
661 public java.util.List<java.lang.Integer>
663 qvar1Index_.makeImmutable();
681 return qvar1Index_.size();
699 return qvar1Index_.getInt(index);
718 int index,
int value) {
720 ensureQvar1IndexIsMutable();
721 qvar1Index_.setInt(index, value);
722 bitField0_ |= 0x00000001;
743 ensureQvar1IndexIsMutable();
744 qvar1Index_.addInt(value);
745 bitField0_ |= 0x00000001;
765 java.lang.Iterable<? extends java.lang.Integer> values) {
766 ensureQvar1IndexIsMutable();
767 com.google.protobuf.AbstractMessageLite.Builder.addAll(
768 values, qvar1Index_);
769 bitField0_ |= 0x00000001;
788 qvar1Index_ = emptyIntList();
789 bitField0_ = (bitField0_ & ~0x00000001);
794 private com.google.protobuf.Internal.IntList qvar2Index_ = emptyIntList();
795 private void ensureQvar2IndexIsMutable() {
796 if (!qvar2Index_.isModifiable()) {
797 qvar2Index_ = makeMutableCopy(qvar2Index_);
799 bitField0_ |= 0x00000002;
805 public java.util.List<java.lang.Integer>
807 qvar2Index_.makeImmutable();
815 return qvar2Index_.size();
823 return qvar2Index_.getInt(index);
832 int index,
int value) {
834 ensureQvar2IndexIsMutable();
835 qvar2Index_.setInt(index, value);
836 bitField0_ |= 0x00000002;
847 ensureQvar2IndexIsMutable();
848 qvar2Index_.addInt(value);
849 bitField0_ |= 0x00000002;
859 java.lang.Iterable<? extends java.lang.Integer> values) {
860 ensureQvar2IndexIsMutable();
861 com.google.protobuf.AbstractMessageLite.Builder.addAll(
862 values, qvar2Index_);
863 bitField0_ |= 0x00000002;
872 qvar2Index_ = emptyIntList();
873 bitField0_ = (bitField0_ & ~0x00000002);
878 private com.google.protobuf.Internal.DoubleList coefficient_ = emptyDoubleList();
879 private void ensureCoefficientIsMutable() {
880 if (!coefficient_.isModifiable()) {
881 coefficient_ = makeMutableCopy(coefficient_);
883 bitField0_ |= 0x00000004;
885 private void ensureCoefficientIsMutable(
int capacity) {
886 if (!coefficient_.isModifiable()) {
887 coefficient_ = makeMutableCopy(coefficient_, capacity);
889 bitField0_ |= 0x00000004;
899 public java.util.List<java.lang.Double>
901 coefficient_.makeImmutable();
913 return coefficient_.size();
925 return coefficient_.getDouble(index);
938 int index,
double value) {
940 ensureCoefficientIsMutable();
941 coefficient_.setDouble(index, value);
942 bitField0_ |= 0x00000004;
957 ensureCoefficientIsMutable();
958 coefficient_.addDouble(value);
959 bitField0_ |= 0x00000004;
973 java.lang.Iterable<? extends java.lang.Double> values) {
974 ensureCoefficientIsMutable();
975 com.google.protobuf.AbstractMessageLite.Builder.addAll(
976 values, coefficient_);
977 bitField0_ |= 0x00000004;
990 coefficient_ = emptyDoubleList();
991 bitField0_ = (bitField0_ & ~0x00000004);
997 final com.google.protobuf.UnknownFieldSet unknownFields) {
1003 final com.google.protobuf.UnknownFieldSet unknownFields) {
1014 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPQuadraticObjective();
1018 return DEFAULT_INSTANCE;
1025 com.google.protobuf.CodedInputStream input,
1026 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1027 throws com.google.protobuf.InvalidProtocolBufferException {
1030 builder.
mergeFrom(input, extensionRegistry);
1031 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1033 }
catch (com.google.protobuf.UninitializedMessageException e) {
1034 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
1035 }
catch (java.io.IOException e) {
1036 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1054 return DEFAULT_INSTANCE;