5package com.google.ortools.sat;
26 com.google.protobuf.GeneratedMessage implements
29private static final long serialVersionUID = 0L;
31 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
32 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
40 private SymmetryProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
44 permutations_ = java.util.Collections.emptyList();
45 orbitopes_ = java.util.Collections.emptyList();
48 public static final com.google.protobuf.Descriptors.Descriptor
50 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
54 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
56 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_fieldAccessorTable
57 .ensureFieldAccessorsInitialized(
58 com.google.ortools.sat.SymmetryProto.class, com.google.ortools.sat.SymmetryProto.Builder.class);
62 @SuppressWarnings(
"serial")
87 public java.util.List<? extends com.google.ortools.sat.SparsePermutationProtoOrBuilder>
102 return permutations_.size();
115 return permutations_.get(index);
129 return permutations_.get(index);
133 @SuppressWarnings(
"serial")
170 public java.util.List<? extends com.google.ortools.sat.DenseMatrixProtoOrBuilder>
191 return orbitopes_.size();
210 return orbitopes_.get(index);
230 return orbitopes_.get(index);
233 private byte memoizedIsInitialized = -1;
240 memoizedIsInitialized = 1;
245 public void writeTo(com.google.protobuf.CodedOutputStream output)
246 throws java.io.IOException {
247 for (
int i = 0; i < permutations_.size(); i++) {
248 output.writeMessage(1, permutations_.get(i));
250 for (
int i = 0; i < orbitopes_.size(); i++) {
251 output.writeMessage(2, orbitopes_.get(i));
253 getUnknownFields().writeTo(output);
258 int size = memoizedSize;
259 if (size != -1)
return size;
262 for (
int i = 0; i < permutations_.size(); i++) {
263 size += com.google.protobuf.CodedOutputStream
264 .computeMessageSize(1, permutations_.get(i));
266 for (
int i = 0; i < orbitopes_.size(); i++) {
267 size += com.google.protobuf.CodedOutputStream
268 .computeMessageSize(2, orbitopes_.get(i));
270 size += getUnknownFields().getSerializedSize();
276 public boolean equals(
final java.lang.Object obj) {
280 if (!(obj instanceof com.google.ortools.sat.SymmetryProto)) {
281 return super.equals(obj);
289 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
295 if (memoizedHashCode != 0) {
296 return memoizedHashCode;
308 hash = (29 * hash) + getUnknownFields().hashCode();
309 memoizedHashCode = hash;
314 java.nio.ByteBuffer data)
315 throws com.google.protobuf.InvalidProtocolBufferException {
316 return PARSER.parseFrom(data);
319 java.nio.ByteBuffer data,
320 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
321 throws com.google.protobuf.InvalidProtocolBufferException {
322 return PARSER.parseFrom(data, extensionRegistry);
325 com.google.protobuf.ByteString data)
326 throws com.google.protobuf.InvalidProtocolBufferException {
327 return PARSER.parseFrom(data);
330 com.google.protobuf.ByteString data,
331 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
332 throws com.google.protobuf.InvalidProtocolBufferException {
333 return PARSER.parseFrom(data, extensionRegistry);
336 throws com.google.protobuf.InvalidProtocolBufferException {
337 return PARSER.parseFrom(data);
341 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
342 throws com.google.protobuf.InvalidProtocolBufferException {
343 return PARSER.parseFrom(data, extensionRegistry);
346 throws java.io.IOException {
347 return com.google.protobuf.GeneratedMessage
348 .parseWithIOException(PARSER, input);
351 java.io.InputStream input,
352 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
353 throws java.io.IOException {
354 return com.google.protobuf.GeneratedMessage
355 .parseWithIOException(PARSER, input, extensionRegistry);
359 throws java.io.IOException {
360 return com.google.protobuf.GeneratedMessage
361 .parseDelimitedWithIOException(PARSER, input);
365 java.io.InputStream input,
366 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
367 throws java.io.IOException {
368 return com.google.protobuf.GeneratedMessage
369 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
372 com.google.protobuf.CodedInputStream input)
373 throws java.io.IOException {
374 return com.google.protobuf.GeneratedMessage
375 .parseWithIOException(PARSER, input);
378 com.google.protobuf.CodedInputStream input,
379 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
380 throws java.io.IOException {
381 return com.google.protobuf.GeneratedMessage
382 .parseWithIOException(PARSER, input, extensionRegistry);
395 return this == DEFAULT_INSTANCE
401 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
424 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
427 public static final com.google.protobuf.Descriptors.Descriptor
429 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
433 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
435 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_fieldAccessorTable
436 .ensureFieldAccessorsInitialized(
437 com.google.ortools.sat.SymmetryProto.class, com.google.ortools.sat.SymmetryProto.Builder.class);
446 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
454 if (permutationsBuilder_ ==
null) {
455 permutations_ = java.util.Collections.emptyList();
457 permutations_ =
null;
458 permutationsBuilder_.clear();
460 bitField0_ = (bitField0_ & ~0x00000001);
461 if (orbitopesBuilder_ ==
null) {
462 orbitopes_ = java.util.Collections.emptyList();
465 orbitopesBuilder_.clear();
467 bitField0_ = (bitField0_ & ~0x00000002);
472 public com.google.protobuf.Descriptors.Descriptor
474 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
479 return com.google.ortools.sat.SymmetryProto.getDefaultInstance();
486 throw newUninitializedMessageException(result);
494 buildPartialRepeatedFields(result);
495 if (bitField0_ != 0) { buildPartial0(result); }
500 private void buildPartialRepeatedFields(com.google.ortools.sat.SymmetryProto result) {
501 if (permutationsBuilder_ ==
null) {
502 if (((bitField0_ & 0x00000001) != 0)) {
503 permutations_ = java.util.Collections.unmodifiableList(permutations_);
504 bitField0_ = (bitField0_ & ~0x00000001);
506 result.permutations_ = permutations_;
508 result.permutations_ = permutationsBuilder_.build();
510 if (orbitopesBuilder_ ==
null) {
511 if (((bitField0_ & 0x00000002) != 0)) {
512 orbitopes_ = java.util.Collections.unmodifiableList(orbitopes_);
513 bitField0_ = (bitField0_ & ~0x00000002);
515 result.orbitopes_ = orbitopes_;
517 result.orbitopes_ = orbitopesBuilder_.build();
521 private void buildPartial0(com.google.ortools.sat.SymmetryProto result) {
522 int from_bitField0_ = bitField0_;
527 if (other instanceof com.google.ortools.sat.SymmetryProto) {
528 return mergeFrom((com.google.ortools.sat.SymmetryProto)other);
530 super.mergeFrom(other);
536 if (other == com.google.ortools.sat.SymmetryProto.getDefaultInstance())
return this;
537 if (permutationsBuilder_ ==
null) {
538 if (!other.permutations_.isEmpty()) {
539 if (permutations_.isEmpty()) {
540 permutations_ = other.permutations_;
541 bitField0_ = (bitField0_ & ~0x00000001);
543 ensurePermutationsIsMutable();
544 permutations_.addAll(other.permutations_);
549 if (!other.permutations_.isEmpty()) {
550 if (permutationsBuilder_.isEmpty()) {
551 permutationsBuilder_.dispose();
552 permutationsBuilder_ =
null;
553 permutations_ = other.permutations_;
554 bitField0_ = (bitField0_ & ~0x00000001);
555 permutationsBuilder_ =
556 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
557 getPermutationsFieldBuilder() :
null;
559 permutationsBuilder_.addAllMessages(other.permutations_);
563 if (orbitopesBuilder_ ==
null) {
564 if (!other.orbitopes_.isEmpty()) {
565 if (orbitopes_.isEmpty()) {
566 orbitopes_ = other.orbitopes_;
567 bitField0_ = (bitField0_ & ~0x00000002);
569 ensureOrbitopesIsMutable();
570 orbitopes_.addAll(other.orbitopes_);
575 if (!other.orbitopes_.isEmpty()) {
576 if (orbitopesBuilder_.isEmpty()) {
577 orbitopesBuilder_.dispose();
578 orbitopesBuilder_ =
null;
579 orbitopes_ = other.orbitopes_;
580 bitField0_ = (bitField0_ & ~0x00000002);
582 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
583 getOrbitopesFieldBuilder() :
null;
585 orbitopesBuilder_.addAllMessages(other.orbitopes_);
589 this.mergeUnknownFields(other.getUnknownFields());
601 com.google.protobuf.CodedInputStream input,
602 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
603 throws java.io.IOException {
604 if (extensionRegistry ==
null) {
605 throw new java.lang.NullPointerException();
608 boolean done =
false;
610 int tag = input.readTag();
618 com.google.ortools.sat.SparsePermutationProto.parser(),
620 if (permutationsBuilder_ ==
null) {
621 ensurePermutationsIsMutable();
622 permutations_.add(m);
624 permutationsBuilder_.addMessage(m);
631 com.google.ortools.sat.DenseMatrixProto.parser(),
633 if (orbitopesBuilder_ ==
null) {
634 ensureOrbitopesIsMutable();
637 orbitopesBuilder_.addMessage(m);
642 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
649 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
650 throw e.unwrapIOException();
656 private int bitField0_;
658 private java.util.List<com.google.ortools.sat.SparsePermutationProto> permutations_ =
659 java.util.Collections.emptyList();
660 private void ensurePermutationsIsMutable() {
661 if (!((bitField0_ & 0x00000001) != 0)) {
662 permutations_ =
new java.util.ArrayList<com.google.ortools.sat.SparsePermutationProto>(permutations_);
663 bitField0_ |= 0x00000001;
667 private com.google.protobuf.RepeatedFieldBuilder<
668 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder> permutationsBuilder_;
680 if (permutationsBuilder_ ==
null) {
681 return java.util.Collections.unmodifiableList(permutations_);
683 return permutationsBuilder_.getMessageList();
696 if (permutationsBuilder_ ==
null) {
697 return permutations_.size();
699 return permutationsBuilder_.getCount();
712 if (permutationsBuilder_ ==
null) {
713 return permutations_.get(index);
715 return permutationsBuilder_.getMessage(index);
728 int index, com.google.ortools.sat.SparsePermutationProto value) {
729 if (permutationsBuilder_ ==
null) {
731 throw new NullPointerException();
733 ensurePermutationsIsMutable();
734 permutations_.set(index, value);
737 permutationsBuilder_.setMessage(index, value);
751 int index, com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
752 if (permutationsBuilder_ ==
null) {
753 ensurePermutationsIsMutable();
754 permutations_.set(index, builderForValue.build());
757 permutationsBuilder_.setMessage(index, builderForValue.build());
771 if (permutationsBuilder_ ==
null) {
773 throw new NullPointerException();
775 ensurePermutationsIsMutable();
776 permutations_.add(value);
779 permutationsBuilder_.addMessage(value);
793 int index, com.google.ortools.sat.SparsePermutationProto value) {
794 if (permutationsBuilder_ ==
null) {
796 throw new NullPointerException();
798 ensurePermutationsIsMutable();
799 permutations_.add(index, value);
802 permutationsBuilder_.addMessage(index, value);
816 com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
817 if (permutationsBuilder_ ==
null) {
818 ensurePermutationsIsMutable();
819 permutations_.add(builderForValue.build());
822 permutationsBuilder_.addMessage(builderForValue.build());
836 int index, com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
837 if (permutationsBuilder_ ==
null) {
838 ensurePermutationsIsMutable();
839 permutations_.add(index, builderForValue.build());
842 permutationsBuilder_.addMessage(index, builderForValue.build());
856 java.lang.Iterable<? extends com.google.ortools.sat.SparsePermutationProto> values) {
857 if (permutationsBuilder_ ==
null) {
858 ensurePermutationsIsMutable();
859 com.google.protobuf.AbstractMessageLite.Builder.addAll(
860 values, permutations_);
863 permutationsBuilder_.addAllMessages(values);
877 if (permutationsBuilder_ ==
null) {
878 permutations_ = java.util.Collections.emptyList();
879 bitField0_ = (bitField0_ & ~0x00000001);
882 permutationsBuilder_.clear();
896 if (permutationsBuilder_ ==
null) {
897 ensurePermutationsIsMutable();
898 permutations_.remove(index);
901 permutationsBuilder_.remove(index);
916 return getPermutationsFieldBuilder().getBuilder(index);
929 if (permutationsBuilder_ ==
null) {
930 return permutations_.get(index); }
else {
931 return permutationsBuilder_.getMessageOrBuilder(index);
943 public java.util.List<? extends com.google.ortools.sat.SparsePermutationProtoOrBuilder>
945 if (permutationsBuilder_ !=
null) {
946 return permutationsBuilder_.getMessageOrBuilderList();
948 return java.util.Collections.unmodifiableList(permutations_);
961 return getPermutationsFieldBuilder().addBuilder(
962 com.google.ortools.sat.SparsePermutationProto.getDefaultInstance());
975 return getPermutationsFieldBuilder().addBuilder(
976 index, com.google.ortools.sat.SparsePermutationProto.getDefaultInstance());
987 public java.util.List<com.google.ortools.sat.SparsePermutationProto.Builder>
989 return getPermutationsFieldBuilder().getBuilderList();
991 private com.google.protobuf.RepeatedFieldBuilder<
992 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder>
993 getPermutationsFieldBuilder() {
994 if (permutationsBuilder_ ==
null) {
995 permutationsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
996 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder>(
998 ((bitField0_ & 0x00000001) != 0),
999 getParentForChildren(),
1001 permutations_ =
null;
1003 return permutationsBuilder_;
1006 private java.util.List<com.google.ortools.sat.DenseMatrixProto> orbitopes_ =
1007 java.util.Collections.emptyList();
1008 private void ensureOrbitopesIsMutable() {
1009 if (!((bitField0_ & 0x00000002) != 0)) {
1010 orbitopes_ =
new java.util.ArrayList<com.google.ortools.sat.DenseMatrixProto>(orbitopes_);
1011 bitField0_ |= 0x00000002;
1015 private com.google.protobuf.RepeatedFieldBuilder<
1016 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder> orbitopesBuilder_;
1034 if (orbitopesBuilder_ ==
null) {
1035 return java.util.Collections.unmodifiableList(orbitopes_);
1037 return orbitopesBuilder_.getMessageList();
1056 if (orbitopesBuilder_ ==
null) {
1057 return orbitopes_.size();
1059 return orbitopesBuilder_.getCount();
1078 if (orbitopesBuilder_ ==
null) {
1079 return orbitopes_.get(index);
1081 return orbitopesBuilder_.getMessage(index);
1100 int index, com.google.ortools.sat.DenseMatrixProto value) {
1101 if (orbitopesBuilder_ ==
null) {
1102 if (value ==
null) {
1103 throw new NullPointerException();
1105 ensureOrbitopesIsMutable();
1106 orbitopes_.set(index, value);
1109 orbitopesBuilder_.setMessage(index, value);
1129 int index, com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1130 if (orbitopesBuilder_ ==
null) {
1131 ensureOrbitopesIsMutable();
1132 orbitopes_.set(index, builderForValue.build());
1135 orbitopesBuilder_.setMessage(index, builderForValue.build());
1155 if (orbitopesBuilder_ ==
null) {
1156 if (value ==
null) {
1157 throw new NullPointerException();
1159 ensureOrbitopesIsMutable();
1160 orbitopes_.add(value);
1163 orbitopesBuilder_.addMessage(value);
1183 int index, com.google.ortools.sat.DenseMatrixProto value) {
1184 if (orbitopesBuilder_ ==
null) {
1185 if (value ==
null) {
1186 throw new NullPointerException();
1188 ensureOrbitopesIsMutable();
1189 orbitopes_.add(index, value);
1192 orbitopesBuilder_.addMessage(index, value);
1212 com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1213 if (orbitopesBuilder_ ==
null) {
1214 ensureOrbitopesIsMutable();
1215 orbitopes_.add(builderForValue.build());
1218 orbitopesBuilder_.addMessage(builderForValue.build());
1238 int index, com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1239 if (orbitopesBuilder_ ==
null) {
1240 ensureOrbitopesIsMutable();
1241 orbitopes_.add(index, builderForValue.build());
1244 orbitopesBuilder_.addMessage(index, builderForValue.build());
1264 java.lang.Iterable<? extends com.google.ortools.sat.DenseMatrixProto> values) {
1265 if (orbitopesBuilder_ ==
null) {
1266 ensureOrbitopesIsMutable();
1267 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1268 values, orbitopes_);
1271 orbitopesBuilder_.addAllMessages(values);
1291 if (orbitopesBuilder_ ==
null) {
1292 orbitopes_ = java.util.Collections.emptyList();
1293 bitField0_ = (bitField0_ & ~0x00000002);
1296 orbitopesBuilder_.clear();
1316 if (orbitopesBuilder_ ==
null) {
1317 ensureOrbitopesIsMutable();
1318 orbitopes_.remove(index);
1321 orbitopesBuilder_.remove(index);
1342 return getOrbitopesFieldBuilder().getBuilder(index);
1361 if (orbitopesBuilder_ ==
null) {
1362 return orbitopes_.get(index); }
else {
1363 return orbitopesBuilder_.getMessageOrBuilder(index);
1381 public java.util.List<? extends com.google.ortools.sat.DenseMatrixProtoOrBuilder>
1383 if (orbitopesBuilder_ !=
null) {
1384 return orbitopesBuilder_.getMessageOrBuilderList();
1386 return java.util.Collections.unmodifiableList(orbitopes_);
1405 return getOrbitopesFieldBuilder().addBuilder(
1406 com.google.ortools.sat.DenseMatrixProto.getDefaultInstance());
1425 return getOrbitopesFieldBuilder().addBuilder(
1426 index, com.google.ortools.sat.DenseMatrixProto.getDefaultInstance());
1443 public java.util.List<com.google.ortools.sat.DenseMatrixProto.Builder>
1445 return getOrbitopesFieldBuilder().getBuilderList();
1447 private com.google.protobuf.RepeatedFieldBuilder<
1448 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder>
1449 getOrbitopesFieldBuilder() {
1450 if (orbitopesBuilder_ ==
null) {
1451 orbitopesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
1452 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder>(
1454 ((bitField0_ & 0x00000002) != 0),
1455 getParentForChildren(),
1459 return orbitopesBuilder_;
1468 DEFAULT_INSTANCE =
new com.google.ortools.sat.SymmetryProto();
1472 return DEFAULT_INSTANCE;
1475 private static final com.google.protobuf.Parser<
SymmetryProto>
1476 PARSER =
new com.google.protobuf.AbstractParser<
SymmetryProto>() {
1479 com.google.protobuf.CodedInputStream input,
1480 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1481 throws com.google.protobuf.InvalidProtocolBufferException {
1484 builder.mergeFrom(input, extensionRegistry);
1485 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1486 throw e.setUnfinishedMessage(builder.buildPartial());
1487 }
catch (com.google.protobuf.UninitializedMessageException e) {
1488 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1489 }
catch (java.io.IOException e) {
1490 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1491 .setUnfinishedMessage(builder.buildPartial());
1493 return builder.buildPartial();
1508 return DEFAULT_INSTANCE;