6package com.google.ortools.sat;
26@com.google.protobuf.Generated
27public final class SymmetryProto
extends
28 com.google.protobuf.GeneratedMessage implements
31private static final long serialVersionUID = 0L;
33 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
34 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
39 SymmetryProto.class.getName());
42 private SymmetryProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
45 private SymmetryProto() {
46 permutations_ = java.util.Collections.emptyList();
47 orbitopes_ = java.util.Collections.emptyList();
50 public static final com.google.protobuf.Descriptors.Descriptor
52 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
56 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
58 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_fieldAccessorTable
59 .ensureFieldAccessorsInitialized(
60 com.google.ortools.sat.SymmetryProto.class, com.google.ortools.sat.SymmetryProto.Builder.class);
64 @SuppressWarnings(
"serial")
89 public java.util.List<? extends com.google.ortools.sat.SparsePermutationProtoOrBuilder>
104 return permutations_.size();
117 return permutations_.get(index);
131 return permutations_.get(index);
135 @SuppressWarnings(
"serial")
172 public java.util.List<? extends com.google.ortools.sat.DenseMatrixProtoOrBuilder>
193 return orbitopes_.size();
212 return orbitopes_.get(index);
232 return orbitopes_.get(index);
235 private byte memoizedIsInitialized = -1;
242 memoizedIsInitialized = 1;
247 public void writeTo(com.google.protobuf.CodedOutputStream output)
248 throws java.io.IOException {
249 for (
int i = 0; i < permutations_.size(); i++) {
250 output.writeMessage(1, permutations_.get(i));
252 for (
int i = 0; i < orbitopes_.size(); i++) {
253 output.writeMessage(2, orbitopes_.get(i));
255 getUnknownFields().writeTo(output);
260 int size = memoizedSize;
261 if (size != -1)
return size;
264 for (
int i = 0; i < permutations_.size(); i++) {
265 size += com.google.protobuf.CodedOutputStream
266 .computeMessageSize(1, permutations_.get(i));
268 for (
int i = 0; i < orbitopes_.size(); i++) {
269 size += com.google.protobuf.CodedOutputStream
270 .computeMessageSize(2, orbitopes_.get(i));
272 size += getUnknownFields().getSerializedSize();
278 public boolean equals(
final java.lang.Object obj) {
282 if (!(obj instanceof com.google.ortools.sat.SymmetryProto)) {
283 return super.equals(obj);
291 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
297 if (memoizedHashCode != 0) {
298 return memoizedHashCode;
310 hash = (29 * hash) + getUnknownFields().hashCode();
311 memoizedHashCode = hash;
316 java.nio.ByteBuffer data)
317 throws com.google.protobuf.InvalidProtocolBufferException {
318 return PARSER.parseFrom(data);
321 java.nio.ByteBuffer data,
322 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
323 throws com.google.protobuf.InvalidProtocolBufferException {
324 return PARSER.parseFrom(data, extensionRegistry);
327 com.google.protobuf.ByteString data)
328 throws com.google.protobuf.InvalidProtocolBufferException {
329 return PARSER.parseFrom(data);
332 com.google.protobuf.ByteString data,
333 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
334 throws com.google.protobuf.InvalidProtocolBufferException {
335 return PARSER.parseFrom(data, extensionRegistry);
338 throws com.google.protobuf.InvalidProtocolBufferException {
339 return PARSER.parseFrom(data);
343 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
344 throws com.google.protobuf.InvalidProtocolBufferException {
345 return PARSER.parseFrom(data, extensionRegistry);
348 throws java.io.IOException {
349 return com.google.protobuf.GeneratedMessage
350 .parseWithIOException(PARSER, input);
353 java.io.InputStream input,
354 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
355 throws java.io.IOException {
356 return com.google.protobuf.GeneratedMessage
357 .parseWithIOException(PARSER, input, extensionRegistry);
361 throws java.io.IOException {
362 return com.google.protobuf.GeneratedMessage
363 .parseDelimitedWithIOException(PARSER, input);
367 java.io.InputStream input,
368 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
369 throws java.io.IOException {
370 return com.google.protobuf.GeneratedMessage
371 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
374 com.google.protobuf.CodedInputStream input)
375 throws java.io.IOException {
376 return com.google.protobuf.GeneratedMessage
377 .parseWithIOException(PARSER, input);
380 com.google.protobuf.CodedInputStream input,
381 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
382 throws java.io.IOException {
383 return com.google.protobuf.GeneratedMessage
384 .parseWithIOException(PARSER, input, extensionRegistry);
390 return DEFAULT_INSTANCE.toBuilder();
393 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
397 return this == DEFAULT_INSTANCE
403 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
425 public static final class Builder
extends
426 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
429 public static final com.google.protobuf.Descriptors.Descriptor
431 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
435 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
437 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_fieldAccessorTable
438 .ensureFieldAccessorsInitialized(
439 com.google.ortools.sat.SymmetryProto.class, com.google.ortools.sat.SymmetryProto.Builder.class);
448 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
456 if (permutationsBuilder_ ==
null) {
457 permutations_ = java.util.Collections.emptyList();
459 permutations_ =
null;
460 permutationsBuilder_.clear();
462 bitField0_ = (bitField0_ & ~0x00000001);
463 if (orbitopesBuilder_ ==
null) {
464 orbitopes_ = java.util.Collections.emptyList();
467 orbitopesBuilder_.clear();
469 bitField0_ = (bitField0_ & ~0x00000002);
474 public com.google.protobuf.Descriptors.Descriptor
476 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_SymmetryProto_descriptor;
481 return com.google.ortools.sat.SymmetryProto.getDefaultInstance();
488 throw newUninitializedMessageException(result);
496 buildPartialRepeatedFields(result);
497 if (bitField0_ != 0) { buildPartial0(result); }
502 private void buildPartialRepeatedFields(com.google.ortools.sat.SymmetryProto result) {
503 if (permutationsBuilder_ ==
null) {
504 if (((bitField0_ & 0x00000001) != 0)) {
505 permutations_ = java.util.Collections.unmodifiableList(permutations_);
506 bitField0_ = (bitField0_ & ~0x00000001);
508 result.permutations_ = permutations_;
510 result.permutations_ = permutationsBuilder_.build();
512 if (orbitopesBuilder_ ==
null) {
513 if (((bitField0_ & 0x00000002) != 0)) {
514 orbitopes_ = java.util.Collections.unmodifiableList(orbitopes_);
515 bitField0_ = (bitField0_ & ~0x00000002);
517 result.orbitopes_ = orbitopes_;
519 result.orbitopes_ = orbitopesBuilder_.build();
523 private void buildPartial0(com.google.ortools.sat.SymmetryProto result) {
524 int from_bitField0_ = bitField0_;
528 public Builder
mergeFrom(com.google.protobuf.Message other) {
529 if (other instanceof com.google.ortools.sat.SymmetryProto) {
530 return mergeFrom((com.google.ortools.sat.SymmetryProto)other);
532 super.mergeFrom(other);
537 public Builder
mergeFrom(com.google.ortools.sat.SymmetryProto other) {
538 if (other == com.google.ortools.sat.SymmetryProto.getDefaultInstance())
return this;
539 if (permutationsBuilder_ ==
null) {
540 if (!other.permutations_.isEmpty()) {
541 if (permutations_.isEmpty()) {
542 permutations_ = other.permutations_;
543 bitField0_ = (bitField0_ & ~0x00000001);
545 ensurePermutationsIsMutable();
546 permutations_.addAll(other.permutations_);
551 if (!other.permutations_.isEmpty()) {
552 if (permutationsBuilder_.isEmpty()) {
553 permutationsBuilder_.dispose();
554 permutationsBuilder_ =
null;
555 permutations_ = other.permutations_;
556 bitField0_ = (bitField0_ & ~0x00000001);
557 permutationsBuilder_ =
558 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
559 internalGetPermutationsFieldBuilder() :
null;
561 permutationsBuilder_.addAllMessages(other.permutations_);
565 if (orbitopesBuilder_ ==
null) {
566 if (!other.orbitopes_.isEmpty()) {
567 if (orbitopes_.isEmpty()) {
568 orbitopes_ = other.orbitopes_;
569 bitField0_ = (bitField0_ & ~0x00000002);
571 ensureOrbitopesIsMutable();
572 orbitopes_.addAll(other.orbitopes_);
577 if (!other.orbitopes_.isEmpty()) {
578 if (orbitopesBuilder_.isEmpty()) {
579 orbitopesBuilder_.dispose();
580 orbitopesBuilder_ =
null;
581 orbitopes_ = other.orbitopes_;
582 bitField0_ = (bitField0_ & ~0x00000002);
584 com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
585 internalGetOrbitopesFieldBuilder() :
null;
587 orbitopesBuilder_.addAllMessages(other.orbitopes_);
591 this.mergeUnknownFields(other.getUnknownFields());
603 com.google.protobuf.CodedInputStream input,
604 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
605 throws java.io.IOException {
606 if (extensionRegistry ==
null) {
607 throw new java.lang.NullPointerException();
610 boolean done =
false;
612 int tag = input.readTag();
620 com.google.ortools.sat.SparsePermutationProto.parser(),
622 if (permutationsBuilder_ ==
null) {
623 ensurePermutationsIsMutable();
624 permutations_.add(m);
626 permutationsBuilder_.addMessage(m);
633 com.google.ortools.sat.DenseMatrixProto.parser(),
635 if (orbitopesBuilder_ ==
null) {
636 ensureOrbitopesIsMutable();
639 orbitopesBuilder_.addMessage(m);
644 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
651 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
652 throw e.unwrapIOException();
658 private int bitField0_;
660 private java.util.List<com.google.ortools.sat.SparsePermutationProto> permutations_ =
661 java.util.Collections.emptyList();
662 private void ensurePermutationsIsMutable() {
663 if (!((bitField0_ & 0x00000001) != 0)) {
664 permutations_ =
new java.util.ArrayList<com.google.ortools.sat.SparsePermutationProto>(permutations_);
665 bitField0_ |= 0x00000001;
669 private com.google.protobuf.RepeatedFieldBuilder<
670 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder> permutationsBuilder_;
682 if (permutationsBuilder_ ==
null) {
683 return java.util.Collections.unmodifiableList(permutations_);
685 return permutationsBuilder_.getMessageList();
698 if (permutationsBuilder_ ==
null) {
699 return permutations_.size();
701 return permutationsBuilder_.getCount();
714 if (permutationsBuilder_ ==
null) {
715 return permutations_.get(index);
717 return permutationsBuilder_.getMessage(index);
730 int index, com.google.ortools.sat.SparsePermutationProto value) {
731 if (permutationsBuilder_ ==
null) {
733 throw new NullPointerException();
735 ensurePermutationsIsMutable();
736 permutations_.set(index, value);
739 permutationsBuilder_.setMessage(index, value);
753 int index, com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
754 if (permutationsBuilder_ ==
null) {
755 ensurePermutationsIsMutable();
756 permutations_.set(index, builderForValue.build());
759 permutationsBuilder_.setMessage(index, builderForValue.build());
773 if (permutationsBuilder_ ==
null) {
775 throw new NullPointerException();
777 ensurePermutationsIsMutable();
778 permutations_.add(value);
781 permutationsBuilder_.addMessage(value);
795 int index, com.google.ortools.sat.SparsePermutationProto value) {
796 if (permutationsBuilder_ ==
null) {
798 throw new NullPointerException();
800 ensurePermutationsIsMutable();
801 permutations_.add(index, value);
804 permutationsBuilder_.addMessage(index, value);
818 com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
819 if (permutationsBuilder_ ==
null) {
820 ensurePermutationsIsMutable();
821 permutations_.add(builderForValue.build());
824 permutationsBuilder_.addMessage(builderForValue.build());
838 int index, com.google.ortools.sat.SparsePermutationProto.Builder builderForValue) {
839 if (permutationsBuilder_ ==
null) {
840 ensurePermutationsIsMutable();
841 permutations_.add(index, builderForValue.build());
844 permutationsBuilder_.addMessage(index, builderForValue.build());
858 java.lang.Iterable<? extends com.google.ortools.sat.SparsePermutationProto> values) {
859 if (permutationsBuilder_ ==
null) {
860 ensurePermutationsIsMutable();
861 com.google.protobuf.AbstractMessageLite.Builder.addAll(
862 values, permutations_);
865 permutationsBuilder_.addAllMessages(values);
879 if (permutationsBuilder_ ==
null) {
880 permutations_ = java.util.Collections.emptyList();
881 bitField0_ = (bitField0_ & ~0x00000001);
884 permutationsBuilder_.clear();
898 if (permutationsBuilder_ ==
null) {
899 ensurePermutationsIsMutable();
900 permutations_.remove(index);
903 permutationsBuilder_.remove(index);
918 return internalGetPermutationsFieldBuilder().getBuilder(index);
931 if (permutationsBuilder_ ==
null) {
932 return permutations_.get(index); }
else {
933 return permutationsBuilder_.getMessageOrBuilder(index);
945 public java.util.List<? extends com.google.ortools.sat.SparsePermutationProtoOrBuilder>
947 if (permutationsBuilder_ !=
null) {
948 return permutationsBuilder_.getMessageOrBuilderList();
950 return java.util.Collections.unmodifiableList(permutations_);
963 return internalGetPermutationsFieldBuilder().addBuilder(
964 com.google.ortools.sat.SparsePermutationProto.getDefaultInstance());
977 return internalGetPermutationsFieldBuilder().addBuilder(
978 index, com.google.ortools.sat.SparsePermutationProto.getDefaultInstance());
989 public java.util.List<com.google.ortools.sat.SparsePermutationProto.Builder>
991 return internalGetPermutationsFieldBuilder().getBuilderList();
993 private com.google.protobuf.RepeatedFieldBuilder<
994 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder>
995 internalGetPermutationsFieldBuilder() {
996 if (permutationsBuilder_ ==
null) {
997 permutationsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
998 com.google.ortools.sat.SparsePermutationProto, com.google.ortools.sat.SparsePermutationProto.Builder, com.google.ortools.sat.SparsePermutationProtoOrBuilder>(
1000 ((bitField0_ & 0x00000001) != 0),
1001 getParentForChildren(),
1003 permutations_ =
null;
1005 return permutationsBuilder_;
1008 private java.util.List<com.google.ortools.sat.DenseMatrixProto> orbitopes_ =
1009 java.util.Collections.emptyList();
1010 private void ensureOrbitopesIsMutable() {
1011 if (!((bitField0_ & 0x00000002) != 0)) {
1012 orbitopes_ =
new java.util.ArrayList<com.google.ortools.sat.DenseMatrixProto>(orbitopes_);
1013 bitField0_ |= 0x00000002;
1017 private com.google.protobuf.RepeatedFieldBuilder<
1018 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder> orbitopesBuilder_;
1036 if (orbitopesBuilder_ ==
null) {
1037 return java.util.Collections.unmodifiableList(orbitopes_);
1039 return orbitopesBuilder_.getMessageList();
1058 if (orbitopesBuilder_ ==
null) {
1059 return orbitopes_.size();
1061 return orbitopesBuilder_.getCount();
1080 if (orbitopesBuilder_ ==
null) {
1081 return orbitopes_.get(index);
1083 return orbitopesBuilder_.getMessage(index);
1102 int index, com.google.ortools.sat.DenseMatrixProto value) {
1103 if (orbitopesBuilder_ ==
null) {
1104 if (value ==
null) {
1105 throw new NullPointerException();
1107 ensureOrbitopesIsMutable();
1108 orbitopes_.set(index, value);
1111 orbitopesBuilder_.setMessage(index, value);
1131 int index, com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1132 if (orbitopesBuilder_ ==
null) {
1133 ensureOrbitopesIsMutable();
1134 orbitopes_.set(index, builderForValue.build());
1137 orbitopesBuilder_.setMessage(index, builderForValue.build());
1156 public Builder
addOrbitopes(com.google.ortools.sat.DenseMatrixProto value) {
1157 if (orbitopesBuilder_ ==
null) {
1158 if (value ==
null) {
1159 throw new NullPointerException();
1161 ensureOrbitopesIsMutable();
1162 orbitopes_.add(value);
1165 orbitopesBuilder_.addMessage(value);
1185 int index, com.google.ortools.sat.DenseMatrixProto value) {
1186 if (orbitopesBuilder_ ==
null) {
1187 if (value ==
null) {
1188 throw new NullPointerException();
1190 ensureOrbitopesIsMutable();
1191 orbitopes_.add(index, value);
1194 orbitopesBuilder_.addMessage(index, value);
1214 com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1215 if (orbitopesBuilder_ ==
null) {
1216 ensureOrbitopesIsMutable();
1217 orbitopes_.add(builderForValue.build());
1220 orbitopesBuilder_.addMessage(builderForValue.build());
1240 int index, com.google.ortools.sat.DenseMatrixProto.Builder builderForValue) {
1241 if (orbitopesBuilder_ ==
null) {
1242 ensureOrbitopesIsMutable();
1243 orbitopes_.add(index, builderForValue.build());
1246 orbitopesBuilder_.addMessage(index, builderForValue.build());
1266 java.lang.Iterable<? extends com.google.ortools.sat.DenseMatrixProto> values) {
1267 if (orbitopesBuilder_ ==
null) {
1268 ensureOrbitopesIsMutable();
1269 com.google.protobuf.AbstractMessageLite.Builder.addAll(
1270 values, orbitopes_);
1273 orbitopesBuilder_.addAllMessages(values);
1293 if (orbitopesBuilder_ ==
null) {
1294 orbitopes_ = java.util.Collections.emptyList();
1295 bitField0_ = (bitField0_ & ~0x00000002);
1298 orbitopesBuilder_.clear();
1318 if (orbitopesBuilder_ ==
null) {
1319 ensureOrbitopesIsMutable();
1320 orbitopes_.remove(index);
1323 orbitopesBuilder_.remove(index);
1344 return internalGetOrbitopesFieldBuilder().getBuilder(index);
1363 if (orbitopesBuilder_ ==
null) {
1364 return orbitopes_.get(index); }
else {
1365 return orbitopesBuilder_.getMessageOrBuilder(index);
1383 public java.util.List<? extends com.google.ortools.sat.DenseMatrixProtoOrBuilder>
1385 if (orbitopesBuilder_ !=
null) {
1386 return orbitopesBuilder_.getMessageOrBuilderList();
1388 return java.util.Collections.unmodifiableList(orbitopes_);
1407 return internalGetOrbitopesFieldBuilder().addBuilder(
1408 com.google.ortools.sat.DenseMatrixProto.getDefaultInstance());
1427 return internalGetOrbitopesFieldBuilder().addBuilder(
1428 index, com.google.ortools.sat.DenseMatrixProto.getDefaultInstance());
1445 public java.util.List<com.google.ortools.sat.DenseMatrixProto.Builder>
1447 return internalGetOrbitopesFieldBuilder().getBuilderList();
1449 private com.google.protobuf.RepeatedFieldBuilder<
1450 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder>
1451 internalGetOrbitopesFieldBuilder() {
1452 if (orbitopesBuilder_ ==
null) {
1453 orbitopesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilder<
1454 com.google.ortools.sat.DenseMatrixProto, com.google.ortools.sat.DenseMatrixProto.Builder, com.google.ortools.sat.DenseMatrixProtoOrBuilder>(
1456 ((bitField0_ & 0x00000002) != 0),
1457 getParentForChildren(),
1461 return orbitopesBuilder_;
1470 DEFAULT_INSTANCE =
new com.google.ortools.sat.SymmetryProto();
1474 return DEFAULT_INSTANCE;
1477 private static final com.google.protobuf.Parser<
SymmetryProto>
1478 PARSER =
new com.google.protobuf.AbstractParser<
SymmetryProto>() {
1481 com.google.protobuf.CodedInputStream input,
1482 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1483 throws com.google.protobuf.InvalidProtocolBufferException {
1486 builder.mergeFrom(input, extensionRegistry);
1487 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1488 throw e.setUnfinishedMessage(builder.buildPartial());
1489 }
catch (com.google.protobuf.UninitializedMessageException e) {
1490 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1491 }
catch (java.io.IOException e) {
1492 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1493 .setUnfinishedMessage(builder.buildPartial());
1495 return builder.buildPartial();
1499 public static com.google.protobuf.Parser<SymmetryProto>
parser() {
1510 return DEFAULT_INSTANCE;