5package com.google.ortools.sat;
26 com.google.protobuf.GeneratedMessageV3 implements
29private static final long serialVersionUID = 0L;
31 private SymmetryProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
35 permutations_ = java.util.Collections.emptyList();
36 orbitopes_ = java.util.Collections.emptyList();
40 @SuppressWarnings({
"unused"})
42 UnusedPrivateParameter unused) {
46 public static final com.google.protobuf.Descriptors.Descriptor
48 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
52 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
54 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_fieldAccessorTable
55 .ensureFieldAccessorsInitialized(
56 com.google.ortools.sat.SymmetryProto.class, com.google.ortools.sat.SymmetryProto.Builder.class);
60 @SuppressWarnings(
"serial")
85 public java.util.List<? extends com.google.ortools.sat.SparsePermutationProtoOrBuilder>
100 return permutations_.size();
113 return permutations_.get(index);
127 return permutations_.get(index);
131 @SuppressWarnings(
"serial")
168 public java.util.List<? extends com.google.ortools.sat.DenseMatrixProtoOrBuilder>
189 return orbitopes_.size();
208 return orbitopes_.get(index);
228 return orbitopes_.get(index);
231 private byte memoizedIsInitialized = -1;
238 memoizedIsInitialized = 1;
243 public void writeTo(com.google.protobuf.CodedOutputStream output)
244 throws java.io.IOException {
245 for (
int i = 0; i < permutations_.size(); i++) {
246 output.writeMessage(1, permutations_.get(i));
248 for (
int i = 0; i < orbitopes_.size(); i++) {
249 output.writeMessage(2, orbitopes_.get(i));
251 getUnknownFields().writeTo(output);
256 int size = memoizedSize;
257 if (size != -1)
return size;
260 for (
int i = 0; i < permutations_.size(); i++) {
261 size += com.google.protobuf.CodedOutputStream
262 .computeMessageSize(1, permutations_.get(i));
264 for (
int i = 0; i < orbitopes_.size(); i++) {
265 size += com.google.protobuf.CodedOutputStream
266 .computeMessageSize(2, orbitopes_.get(i));
268 size += getUnknownFields().getSerializedSize();
274 public boolean equals(
final java.lang.Object obj) {
278 if (!(obj instanceof com.google.ortools.sat.SymmetryProto)) {
279 return super.equals(obj);
287 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
293 if (memoizedHashCode != 0) {
294 return memoizedHashCode;
306 hash = (29 * hash) + getUnknownFields().hashCode();
307 memoizedHashCode = hash;
312 java.nio.ByteBuffer data)
313 throws com.google.protobuf.InvalidProtocolBufferException {
314 return PARSER.parseFrom(data);
317 java.nio.ByteBuffer data,
318 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
319 throws com.google.protobuf.InvalidProtocolBufferException {
320 return PARSER.parseFrom(data, extensionRegistry);
323 com.google.protobuf.ByteString data)
324 throws com.google.protobuf.InvalidProtocolBufferException {
325 return PARSER.parseFrom(data);
328 com.google.protobuf.ByteString data,
329 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
330 throws com.google.protobuf.InvalidProtocolBufferException {
331 return PARSER.parseFrom(data, extensionRegistry);
334 throws com.google.protobuf.InvalidProtocolBufferException {
335 return PARSER.parseFrom(data);
339 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
340 throws com.google.protobuf.InvalidProtocolBufferException {
341 return PARSER.parseFrom(data, extensionRegistry);
344 throws java.io.IOException {
345 return com.google.protobuf.GeneratedMessageV3
346 .parseWithIOException(PARSER, input);
349 java.io.InputStream input,
350 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
351 throws java.io.IOException {
352 return com.google.protobuf.GeneratedMessageV3
353 .parseWithIOException(PARSER, input, extensionRegistry);
357 throws java.io.IOException {
358 return com.google.protobuf.GeneratedMessageV3
359 .parseDelimitedWithIOException(PARSER, input);
363 java.io.InputStream input,
364 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
365 throws java.io.IOException {
366 return com.google.protobuf.GeneratedMessageV3
367 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
370 com.google.protobuf.CodedInputStream input)
371 throws java.io.IOException {
372 return com.google.protobuf.GeneratedMessageV3
373 .parseWithIOException(PARSER, input);
376 com.google.protobuf.CodedInputStream input,
377 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
378 throws java.io.IOException {
379 return com.google.protobuf.GeneratedMessageV3
380 .parseWithIOException(PARSER, input, extensionRegistry);
393 return this == DEFAULT_INSTANCE
399 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
422 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
425 public static final com.google.protobuf.Descriptors.Descriptor
427 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
431 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
433 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_fieldAccessorTable
434 .ensureFieldAccessorsInitialized(
435 com.google.ortools.sat.SymmetryProto.class, com.google.ortools.sat.SymmetryProto.Builder.class);
444 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
452 if (permutationsBuilder_ ==
null) {
453 permutations_ = java.util.Collections.emptyList();
455 permutations_ =
null;
456 permutationsBuilder_.clear();
458 bitField0_ = (bitField0_ & ~0x00000001);
459 if (orbitopesBuilder_ ==
null) {
460 orbitopes_ = java.util.Collections.emptyList();
463 orbitopesBuilder_.clear();
465 bitField0_ = (bitField0_ & ~0x00000002);
470 public com.google.protobuf.Descriptors.Descriptor
472 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
477 return com.google.ortools.sat.SymmetryProto.getDefaultInstance();
484 throw newUninitializedMessageException(result);
492 buildPartialRepeatedFields(result);
493 if (bitField0_ != 0) { buildPartial0(result); }
498 private void buildPartialRepeatedFields(com.google.ortools.sat.SymmetryProto result) {
499 if (permutationsBuilder_ ==
null) {
500 if (((bitField0_ & 0x00000001) != 0)) {
501 permutations_ = java.util.Collections.unmodifiableList(permutations_);
502 bitField0_ = (bitField0_ & ~0x00000001);
504 result.permutations_ = permutations_;
506 result.permutations_ = permutationsBuilder_.build();
508 if (orbitopesBuilder_ ==
null) {
509 if (((bitField0_ & 0x00000002) != 0)) {
510 orbitopes_ = java.util.Collections.unmodifiableList(orbitopes_);
511 bitField0_ = (bitField0_ & ~0x00000002);
513 result.orbitopes_ = orbitopes_;
515 result.orbitopes_ = orbitopesBuilder_.build();
519 private void buildPartial0(com.google.ortools.sat.SymmetryProto result) {
520 int from_bitField0_ = bitField0_;
525 return super.
clone();
529 com.google.protobuf.Descriptors.FieldDescriptor field,
530 java.lang.Object value) {
531 return super.
setField(field, value);
535 com.google.protobuf.Descriptors.FieldDescriptor field) {
540 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
545 com.google.protobuf.Descriptors.FieldDescriptor field,
546 int index, java.lang.Object value) {
551 com.google.protobuf.Descriptors.FieldDescriptor field,
552 java.lang.Object value) {
557 if (other instanceof com.google.ortools.sat.SymmetryProto) {
558 return mergeFrom((com.google.ortools.sat.SymmetryProto)other);
560 super.mergeFrom(other);
566 if (other == com.google.ortools.sat.SymmetryProto.getDefaultInstance())
return this;
567 if (permutationsBuilder_ ==
null) {
568 if (!other.permutations_.isEmpty()) {
569 if (permutations_.isEmpty()) {
570 permutations_ = other.permutations_;
571 bitField0_ = (bitField0_ & ~0x00000001);
573 ensurePermutationsIsMutable();
574 permutations_.addAll(other.permutations_);
579 if (!other.permutations_.isEmpty()) {
580 if (permutationsBuilder_.isEmpty()) {
581 permutationsBuilder_.dispose();
582 permutationsBuilder_ =
null;
583 permutations_ = other.permutations_;
584 bitField0_ = (bitField0_ & ~0x00000001);
585 permutationsBuilder_ =
586 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
587 getPermutationsFieldBuilder() :
null;
589 permutationsBuilder_.addAllMessages(other.permutations_);
593 if (orbitopesBuilder_ ==
null) {
594 if (!other.orbitopes_.isEmpty()) {
595 if (orbitopes_.isEmpty()) {
596 orbitopes_ = other.orbitopes_;
597 bitField0_ = (bitField0_ & ~0x00000002);
599 ensureOrbitopesIsMutable();
600 orbitopes_.addAll(other.orbitopes_);
605 if (!other.orbitopes_.isEmpty()) {
606 if (orbitopesBuilder_.isEmpty()) {
607 orbitopesBuilder_.dispose();
608 orbitopesBuilder_ =
null;
609 orbitopes_ = other.orbitopes_;
610 bitField0_ = (bitField0_ & ~0x00000002);
612 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
613 getOrbitopesFieldBuilder() :
null;
615 orbitopesBuilder_.addAllMessages(other.orbitopes_);
631 com.google.protobuf.CodedInputStream input,
632 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
633 throws java.io.IOException {
634 if (extensionRegistry ==
null) {
635 throw new java.lang.NullPointerException();
638 boolean done =
false;
640 int tag = input.readTag();
648 com.google.ortools.sat.SparsePermutationProto.parser(),
650 if (permutationsBuilder_ ==
null) {
651 ensurePermutationsIsMutable();
652 permutations_.add(m);
654 permutationsBuilder_.addMessage(m);
661 com.google.ortools.sat.DenseMatrixProto.parser(),
663 if (orbitopesBuilder_ ==
null) {
664 ensureOrbitopesIsMutable();
667 orbitopesBuilder_.addMessage(m);
672 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
679 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
680 throw e.unwrapIOException();
686 private int bitField0_;
688 private java.util.List<com.google.ortools.sat.SparsePermutationProto> permutations_ =
689 java.util.Collections.emptyList();
690 private void ensurePermutationsIsMutable() {
691 if (!((bitField0_ & 0x00000001) != 0)) {
692 permutations_ =
new java.util.ArrayList<com.google.ortools.sat.SparsePermutationProto>(permutations_);
693 bitField0_ |= 0x00000001;
697 private com.google.protobuf.RepeatedFieldBuilderV3<
698 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder> permutationsBuilder_;
710 if (permutationsBuilder_ ==
null) {
711 return java.util.Collections.unmodifiableList(permutations_);
713 return permutationsBuilder_.getMessageList();
726 if (permutationsBuilder_ ==
null) {
727 return permutations_.size();
729 return permutationsBuilder_.getCount();
742 if (permutationsBuilder_ ==
null) {
743 return permutations_.get(index);
745 return permutationsBuilder_.getMessage(index);
758 int index, com.google.ortools.sat.SparsePermutationProto value) {
759 if (permutationsBuilder_ ==
null) {
761 throw new NullPointerException();
763 ensurePermutationsIsMutable();
764 permutations_.set(index, value);
767 permutationsBuilder_.setMessage(index, value);
781 int index, com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
782 if (permutationsBuilder_ ==
null) {
783 ensurePermutationsIsMutable();
784 permutations_.set(index, builderForValue.build());
787 permutationsBuilder_.setMessage(index, builderForValue.build());
801 if (permutationsBuilder_ ==
null) {
803 throw new NullPointerException();
805 ensurePermutationsIsMutable();
806 permutations_.add(value);
809 permutationsBuilder_.addMessage(value);
823 int index, com.google.ortools.sat.SparsePermutationProto value) {
824 if (permutationsBuilder_ ==
null) {
826 throw new NullPointerException();
828 ensurePermutationsIsMutable();
829 permutations_.add(index, value);
832 permutationsBuilder_.addMessage(index, value);
846 com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
847 if (permutationsBuilder_ ==
null) {
848 ensurePermutationsIsMutable();
849 permutations_.add(builderForValue.build());
852 permutationsBuilder_.addMessage(builderForValue.build());
866 int index, com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
867 if (permutationsBuilder_ ==
null) {
868 ensurePermutationsIsMutable();
869 permutations_.add(index, builderForValue.build());
872 permutationsBuilder_.addMessage(index, builderForValue.build());
886 java.lang.Iterable<? extends com.google.ortools.sat.SparsePermutationProto> values) {
887 if (permutationsBuilder_ ==
null) {
888 ensurePermutationsIsMutable();
889 com.google.protobuf.AbstractMessageLite.Builder.addAll(
890 values, permutations_);
893 permutationsBuilder_.addAllMessages(values);
907 if (permutationsBuilder_ ==
null) {
908 permutations_ = java.util.Collections.emptyList();
909 bitField0_ = (bitField0_ & ~0x00000001);
912 permutationsBuilder_.clear();
926 if (permutationsBuilder_ ==
null) {
927 ensurePermutationsIsMutable();
928 permutations_.remove(index);
931 permutationsBuilder_.remove(index);
946 return getPermutationsFieldBuilder().getBuilder(index);
959 if (permutationsBuilder_ ==
null) {
960 return permutations_.get(index); }
else {
961 return permutationsBuilder_.getMessageOrBuilder(index);
973 public java.util.List<? extends com.google.ortools.sat.SparsePermutationProtoOrBuilder>
975 if (permutationsBuilder_ !=
null) {
976 return permutationsBuilder_.getMessageOrBuilderList();
978 return java.util.Collections.unmodifiableList(permutations_);
991 return getPermutationsFieldBuilder().addBuilder(
992 com.google.ortools.sat.SparsePermutationProto.getDefaultInstance());
1005 return getPermutationsFieldBuilder().addBuilder(
1006 index, com.google.ortools.sat.SparsePermutationProto.getDefaultInstance());
1017 public java.util.List<com.google.ortools.sat.SparsePermutationProto.Builder>
1019 return getPermutationsFieldBuilder().getBuilderList();
1021 private com.google.protobuf.RepeatedFieldBuilderV3<
1022 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder>
1023 getPermutationsFieldBuilder() {
1024 if (permutationsBuilder_ ==
null) {
1025 permutationsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
1026 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder>(
1028 ((bitField0_ & 0x00000001) != 0),
1029 getParentForChildren(),
1031 permutations_ =
null;
1033 return permutationsBuilder_;
1036 private java.util.List<com.google.ortools.sat.DenseMatrixProto> orbitopes_ =
1037 java.util.Collections.emptyList();
1038 private void ensureOrbitopesIsMutable() {
1039 if (!((bitField0_ & 0x00000002) != 0)) {
1040 orbitopes_ =
new java.util.ArrayList<com.google.ortools.sat.DenseMatrixProto>(orbitopes_);
1041 bitField0_ |= 0x00000002;
1045 private com.google.protobuf.RepeatedFieldBuilderV3<
1046 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder> orbitopesBuilder_;
1064 if (orbitopesBuilder_ ==
null) {
1065 return java.util.Collections.unmodifiableList(orbitopes_);
1067 return orbitopesBuilder_.getMessageList();
1086 if (orbitopesBuilder_ ==
null) {
1087 return orbitopes_.size();
1089 return orbitopesBuilder_.getCount();
1108 if (orbitopesBuilder_ ==
null) {
1109 return orbitopes_.get(index);
1111 return orbitopesBuilder_.getMessage(index);
1130 int index, com.google.ortools.sat.DenseMatrixProto value) {
1131 if (orbitopesBuilder_ ==
null) {
1132 if (value ==
null) {
1133 throw new NullPointerException();
1135 ensureOrbitopesIsMutable();
1136 orbitopes_.set(index, value);
1139 orbitopesBuilder_.setMessage(index, value);
1159 int index, com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1160 if (orbitopesBuilder_ ==
null) {
1161 ensureOrbitopesIsMutable();
1162 orbitopes_.set(index, builderForValue.build());
1165 orbitopesBuilder_.setMessage(index, builderForValue.build());
1185 if (orbitopesBuilder_ ==
null) {
1186 if (value ==
null) {
1187 throw new NullPointerException();
1189 ensureOrbitopesIsMutable();
1190 orbitopes_.add(value);
1193 orbitopesBuilder_.addMessage(value);
1213 int index, com.google.ortools.sat.DenseMatrixProto value) {
1214 if (orbitopesBuilder_ ==
null) {
1215 if (value ==
null) {
1216 throw new NullPointerException();
1218 ensureOrbitopesIsMutable();
1219 orbitopes_.add(index, value);
1222 orbitopesBuilder_.addMessage(index, value);
1242 com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1243 if (orbitopesBuilder_ ==
null) {
1244 ensureOrbitopesIsMutable();
1245 orbitopes_.add(builderForValue.build());
1248 orbitopesBuilder_.addMessage(builderForValue.build());
1268 int index, com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1269 if (orbitopesBuilder_ ==
null) {
1270 ensureOrbitopesIsMutable();
1271 orbitopes_.add(index, builderForValue.build());
1274 orbitopesBuilder_.addMessage(index, builderForValue.build());
1294 java.lang.Iterable<? extends com.google.ortools.sat.DenseMatrixProto> values) {
1295 if (orbitopesBuilder_ ==
null) {
1296 ensureOrbitopesIsMutable();
1297 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1298 values, orbitopes_);
1301 orbitopesBuilder_.addAllMessages(values);
1321 if (orbitopesBuilder_ ==
null) {
1322 orbitopes_ = java.util.Collections.emptyList();
1323 bitField0_ = (bitField0_ & ~0x00000002);
1326 orbitopesBuilder_.clear();
1346 if (orbitopesBuilder_ ==
null) {
1347 ensureOrbitopesIsMutable();
1348 orbitopes_.remove(index);
1351 orbitopesBuilder_.remove(index);
1372 return getOrbitopesFieldBuilder().getBuilder(index);
1391 if (orbitopesBuilder_ ==
null) {
1392 return orbitopes_.get(index); }
else {
1393 return orbitopesBuilder_.getMessageOrBuilder(index);
1411 public java.util.List<? extends com.google.ortools.sat.DenseMatrixProtoOrBuilder>
1413 if (orbitopesBuilder_ !=
null) {
1414 return orbitopesBuilder_.getMessageOrBuilderList();
1416 return java.util.Collections.unmodifiableList(orbitopes_);
1435 return getOrbitopesFieldBuilder().addBuilder(
1436 com.google.ortools.sat.DenseMatrixProto.getDefaultInstance());
1455 return getOrbitopesFieldBuilder().addBuilder(
1456 index, com.google.ortools.sat.DenseMatrixProto.getDefaultInstance());
1473 public java.util.List<com.google.ortools.sat.DenseMatrixProto.Builder>
1475 return getOrbitopesFieldBuilder().getBuilderList();
1477 private com.google.protobuf.RepeatedFieldBuilderV3<
1478 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder>
1479 getOrbitopesFieldBuilder() {
1480 if (orbitopesBuilder_ ==
null) {
1481 orbitopesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
1482 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder>(
1484 ((bitField0_ & 0x00000002) != 0),
1485 getParentForChildren(),
1489 return orbitopesBuilder_;
1493 final com.google.protobuf.UnknownFieldSet unknownFields) {
1499 final com.google.protobuf.UnknownFieldSet unknownFields) {
1510 DEFAULT_INSTANCE =
new com.google.ortools.sat.SymmetryProto();
1514 return DEFAULT_INSTANCE;
1517 private static final com.google.protobuf.Parser<
SymmetryProto>
1518 PARSER =
new com.google.protobuf.AbstractParser<
SymmetryProto>() {
1521 com.google.protobuf.CodedInputStream input,
1522 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1523 throws com.google.protobuf.InvalidProtocolBufferException {
1526 builder.mergeFrom(input, extensionRegistry);
1527 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1528 throw e.setUnfinishedMessage(builder.buildPartial());
1529 }
catch (com.google.protobuf.UninitializedMessageException e) {
1530 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1531 }
catch (java.io.IOException e) {
1532 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1533 .setUnfinishedMessage(builder.buildPartial());
1535 return builder.buildPartial();
1550 return DEFAULT_INSTANCE;