5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessageV3 implements
19private static final long serialVersionUID = 0L;
25 support_ = emptyIntList();
26 cycleSizes_ = emptyIntList();
30 @SuppressWarnings({
"unused"})
32 UnusedPrivateParameter unused) {
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SparsePermutationProto_descriptor;
42 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
44 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SparsePermutationProto_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.sat.SparsePermutationProto.class, com.google.ortools.sat.SparsePermutationProto.Builder.class);
50 @SuppressWarnings(
"serial")
51 private com.google.protobuf.Internal.IntList support_ =
63 public java.util.List<java.lang.Integer>
77 return support_.size();
90 return support_.getInt(index);
92 private int supportMemoizedSerializedSize = -1;
95 @SuppressWarnings(
"serial")
96 private com.google.protobuf.Internal.IntList cycleSizes_ =
103 public java.util.List<java.lang.Integer>
112 return cycleSizes_.size();
120 return cycleSizes_.getInt(index);
122 private int cycleSizesMemoizedSerializedSize = -1;
124 private byte memoizedIsInitialized = -1;
131 memoizedIsInitialized = 1;
136 public void writeTo(com.google.protobuf.CodedOutputStream output)
137 throws java.io.IOException {
140 output.writeUInt32NoTag(10);
141 output.writeUInt32NoTag(supportMemoizedSerializedSize);
143 for (
int i = 0; i < support_.size(); i++) {
144 output.writeInt32NoTag(support_.getInt(i));
147 output.writeUInt32NoTag(18);
148 output.writeUInt32NoTag(cycleSizesMemoizedSerializedSize);
150 for (
int i = 0; i < cycleSizes_.size(); i++) {
151 output.writeInt32NoTag(cycleSizes_.getInt(i));
153 getUnknownFields().writeTo(output);
158 int size = memoizedSize;
159 if (size != -1)
return size;
164 for (
int i = 0; i < support_.size(); i++) {
165 dataSize += com.google.protobuf.CodedOutputStream
166 .computeInt32SizeNoTag(support_.getInt(i));
171 size += com.google.protobuf.CodedOutputStream
172 .computeInt32SizeNoTag(dataSize);
174 supportMemoizedSerializedSize = dataSize;
178 for (
int i = 0; i < cycleSizes_.size(); i++) {
179 dataSize += com.google.protobuf.CodedOutputStream
180 .computeInt32SizeNoTag(cycleSizes_.getInt(i));
185 size += com.google.protobuf.CodedOutputStream
186 .computeInt32SizeNoTag(dataSize);
188 cycleSizesMemoizedSerializedSize = dataSize;
190 size += getUnknownFields().getSerializedSize();
196 public boolean equals(
final java.lang.Object obj) {
200 if (!(obj instanceof com.google.ortools.sat.SparsePermutationProto)) {
201 return super.equals(obj);
209 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
215 if (memoizedHashCode != 0) {
216 return memoizedHashCode;
228 hash = (29 * hash) + getUnknownFields().hashCode();
229 memoizedHashCode = hash;
234 java.nio.ByteBuffer data)
235 throws com.google.protobuf.InvalidProtocolBufferException {
236 return PARSER.parseFrom(data);
239 java.nio.ByteBuffer data,
240 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
241 throws com.google.protobuf.InvalidProtocolBufferException {
242 return PARSER.parseFrom(data, extensionRegistry);
245 com.google.protobuf.ByteString data)
246 throws com.google.protobuf.InvalidProtocolBufferException {
247 return PARSER.parseFrom(data);
250 com.google.protobuf.ByteString data,
251 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
252 throws com.google.protobuf.InvalidProtocolBufferException {
253 return PARSER.parseFrom(data, extensionRegistry);
256 throws com.google.protobuf.InvalidProtocolBufferException {
257 return PARSER.parseFrom(data);
261 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
262 throws com.google.protobuf.InvalidProtocolBufferException {
263 return PARSER.parseFrom(data, extensionRegistry);
266 throws java.io.IOException {
267 return com.google.protobuf.GeneratedMessageV3
268 .parseWithIOException(PARSER, input);
271 java.io.InputStream input,
272 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
273 throws java.io.IOException {
274 return com.google.protobuf.GeneratedMessageV3
275 .parseWithIOException(PARSER, input, extensionRegistry);
279 throws java.io.IOException {
280 return com.google.protobuf.GeneratedMessageV3
281 .parseDelimitedWithIOException(PARSER, input);
285 java.io.InputStream input,
286 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
287 throws java.io.IOException {
288 return com.google.protobuf.GeneratedMessageV3
289 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
292 com.google.protobuf.CodedInputStream input)
293 throws java.io.IOException {
294 return com.google.protobuf.GeneratedMessageV3
295 .parseWithIOException(PARSER, input);
298 com.google.protobuf.CodedInputStream input,
299 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
300 throws java.io.IOException {
301 return com.google.protobuf.GeneratedMessageV3
302 .parseWithIOException(PARSER, input, extensionRegistry);
315 return this == DEFAULT_INSTANCE
321 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
334 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
337 public static final com.google.protobuf.Descriptors.Descriptor
339 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SparsePermutationProto_descriptor;
343 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
345 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SparsePermutationProto_fieldAccessorTable
346 .ensureFieldAccessorsInitialized(
347 com.google.ortools.sat.SparsePermutationProto.class, com.google.ortools.sat.SparsePermutationProto.Builder.class);
356 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
364 support_ = emptyIntList();
365 cycleSizes_ = emptyIntList();
370 public com.google.protobuf.Descriptors.Descriptor
372 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SparsePermutationProto_descriptor;
377 return com.google.ortools.sat.SparsePermutationProto.getDefaultInstance();
384 throw newUninitializedMessageException(result);
392 if (bitField0_ != 0) { buildPartial0(result); }
397 private void buildPartial0(com.google.ortools.sat.SparsePermutationProto result) {
398 int from_bitField0_ = bitField0_;
399 if (((from_bitField0_ & 0x00000001) != 0)) {
400 support_.makeImmutable();
401 result.support_ = support_;
403 if (((from_bitField0_ & 0x00000002) != 0)) {
404 cycleSizes_.makeImmutable();
405 result.cycleSizes_ = cycleSizes_;
411 return super.
clone();
415 com.google.protobuf.Descriptors.FieldDescriptor field,
416 java.lang.Object value) {
417 return super.
setField(field, value);
421 com.google.protobuf.Descriptors.FieldDescriptor field) {
426 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
431 com.google.protobuf.Descriptors.FieldDescriptor field,
432 int index, java.lang.Object value) {
437 com.google.protobuf.Descriptors.FieldDescriptor field,
438 java.lang.Object value) {
443 if (other instanceof com.google.ortools.sat.SparsePermutationProto) {
444 return mergeFrom((com.google.ortools.sat.SparsePermutationProto)other);
446 super.mergeFrom(other);
452 if (other == com.google.ortools.sat.SparsePermutationProto.getDefaultInstance())
return this;
453 if (!other.support_.isEmpty()) {
454 if (support_.isEmpty()) {
455 support_ = other.support_;
456 support_.makeImmutable();
457 bitField0_ |= 0x00000001;
459 ensureSupportIsMutable();
460 support_.addAll(other.support_);
464 if (!other.cycleSizes_.isEmpty()) {
465 if (cycleSizes_.isEmpty()) {
466 cycleSizes_ = other.cycleSizes_;
467 cycleSizes_.makeImmutable();
468 bitField0_ |= 0x00000002;
470 ensureCycleSizesIsMutable();
471 cycleSizes_.addAll(other.cycleSizes_);
487 com.google.protobuf.CodedInputStream input,
488 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
489 throws java.io.IOException {
490 if (extensionRegistry ==
null) {
491 throw new java.lang.NullPointerException();
494 boolean done =
false;
496 int tag = input.readTag();
502 int v = input.readInt32();
503 ensureSupportIsMutable();
508 int length = input.readRawVarint32();
509 int limit = input.pushLimit(length);
510 ensureSupportIsMutable();
511 while (input.getBytesUntilLimit() > 0) {
512 support_.addInt(input.readInt32());
514 input.popLimit(limit);
518 int v = input.readInt32();
519 ensureCycleSizesIsMutable();
520 cycleSizes_.addInt(v);
524 int length = input.readRawVarint32();
525 int limit = input.pushLimit(length);
526 ensureCycleSizesIsMutable();
527 while (input.getBytesUntilLimit() > 0) {
528 cycleSizes_.addInt(input.readInt32());
530 input.popLimit(limit);
534 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
541 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
542 throw e.unwrapIOException();
548 private int bitField0_;
550 private com.google.protobuf.Internal.IntList support_ = emptyIntList();
551 private void ensureSupportIsMutable() {
552 if (!support_.isModifiable()) {
553 support_ = makeMutableCopy(support_);
555 bitField0_ |= 0x00000001;
566 public java.util.List<java.lang.Integer>
568 support_.makeImmutable();
581 return support_.size();
594 return support_.getInt(index);
608 int index,
int value) {
610 ensureSupportIsMutable();
611 support_.setInt(index, value);
612 bitField0_ |= 0x00000001;
628 ensureSupportIsMutable();
629 support_.addInt(value);
630 bitField0_ |= 0x00000001;
645 java.lang.Iterable<? extends java.lang.Integer> values) {
646 ensureSupportIsMutable();
647 com.google.protobuf.AbstractMessageLite.Builder.addAll(
649 bitField0_ |= 0x00000001;
663 support_ = emptyIntList();
664 bitField0_ = (bitField0_ & ~0x00000001);
669 private com.google.protobuf.Internal.IntList cycleSizes_ = emptyIntList();
670 private void ensureCycleSizesIsMutable() {
671 if (!cycleSizes_.isModifiable()) {
672 cycleSizes_ = makeMutableCopy(cycleSizes_);
674 bitField0_ |= 0x00000002;
680 public java.util.List<java.lang.Integer>
682 cycleSizes_.makeImmutable();
690 return cycleSizes_.size();
698 return cycleSizes_.getInt(index);
707 int index,
int value) {
709 ensureCycleSizesIsMutable();
710 cycleSizes_.setInt(index, value);
711 bitField0_ |= 0x00000002;
722 ensureCycleSizesIsMutable();
723 cycleSizes_.addInt(value);
724 bitField0_ |= 0x00000002;
734 java.lang.Iterable<? extends java.lang.Integer> values) {
735 ensureCycleSizesIsMutable();
736 com.google.protobuf.AbstractMessageLite.Builder.addAll(
737 values, cycleSizes_);
738 bitField0_ |= 0x00000002;
747 cycleSizes_ = emptyIntList();
748 bitField0_ = (bitField0_ & ~0x00000002);
754 final com.google.protobuf.UnknownFieldSet unknownFields) {
760 final com.google.protobuf.UnknownFieldSet unknownFields) {
771 DEFAULT_INSTANCE =
new com.google.ortools.sat.SparsePermutationProto();
775 return DEFAULT_INSTANCE;
782 com.google.protobuf.CodedInputStream input,
783 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
784 throws com.google.protobuf.InvalidProtocolBufferException {
787 builder.mergeFrom(input, extensionRegistry);
788 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
789 throw e.setUnfinishedMessage(builder.buildPartial());
790 }
catch (com.google.protobuf.UninitializedMessageException e) {
791 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
792 }
catch (java.io.IOException e) {
793 throw new com.google.protobuf.InvalidProtocolBufferException(e)
794 .setUnfinishedMessage(builder.buildPartial());
796 return builder.buildPartial();
811 return DEFAULT_INSTANCE;