5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessageV3 implements
19private static final long serialVersionUID = 0L;
21 private DenseMatrixProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
25 entries_ = emptyIntList();
29 @SuppressWarnings({
"unused"})
31 UnusedPrivateParameter unused) {
35 public static final com.google.protobuf.Descriptors.Descriptor
37 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
41 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
43 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
44 .ensureFieldAccessorsInitialized(
45 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
49 private int numRows_ = 0;
60 private int numCols_ = 0;
71 @SuppressWarnings(
"serial")
72 private com.google.protobuf.Internal.IntList entries_ =
79 public java.util.List<java.lang.Integer>
88 return entries_.size();
96 return entries_.getInt(index);
98 private int entriesMemoizedSerializedSize = -1;
100 private byte memoizedIsInitialized = -1;
107 memoizedIsInitialized = 1;
112 public void writeTo(com.google.protobuf.CodedOutputStream output)
113 throws java.io.IOException {
116 output.writeInt32(1, numRows_);
119 output.writeInt32(2, numCols_);
122 output.writeUInt32NoTag(26);
123 output.writeUInt32NoTag(entriesMemoizedSerializedSize);
125 for (
int i = 0; i < entries_.size(); i++) {
126 output.writeInt32NoTag(entries_.getInt(i));
128 getUnknownFields().writeTo(output);
133 int size = memoizedSize;
134 if (size != -1)
return size;
138 size += com.google.protobuf.CodedOutputStream
139 .computeInt32Size(1, numRows_);
142 size += com.google.protobuf.CodedOutputStream
143 .computeInt32Size(2, numCols_);
147 for (
int i = 0; i < entries_.size(); i++) {
148 dataSize += com.google.protobuf.CodedOutputStream
149 .computeInt32SizeNoTag(entries_.getInt(i));
154 size += com.google.protobuf.CodedOutputStream
155 .computeInt32SizeNoTag(dataSize);
157 entriesMemoizedSerializedSize = dataSize;
159 size += getUnknownFields().getSerializedSize();
165 public boolean equals(
final java.lang.Object obj) {
169 if (!(obj instanceof com.google.ortools.sat.DenseMatrixProto)) {
170 return super.equals(obj);
180 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
186 if (memoizedHashCode != 0) {
187 return memoizedHashCode;
199 hash = (29 * hash) + getUnknownFields().hashCode();
200 memoizedHashCode = hash;
205 java.nio.ByteBuffer data)
206 throws com.google.protobuf.InvalidProtocolBufferException {
207 return PARSER.parseFrom(data);
210 java.nio.ByteBuffer data,
211 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
212 throws com.google.protobuf.InvalidProtocolBufferException {
213 return PARSER.parseFrom(data, extensionRegistry);
216 com.google.protobuf.ByteString data)
217 throws com.google.protobuf.InvalidProtocolBufferException {
218 return PARSER.parseFrom(data);
221 com.google.protobuf.ByteString data,
222 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
223 throws com.google.protobuf.InvalidProtocolBufferException {
224 return PARSER.parseFrom(data, extensionRegistry);
227 throws com.google.protobuf.InvalidProtocolBufferException {
228 return PARSER.parseFrom(data);
232 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
233 throws com.google.protobuf.InvalidProtocolBufferException {
234 return PARSER.parseFrom(data, extensionRegistry);
237 throws java.io.IOException {
238 return com.google.protobuf.GeneratedMessageV3
239 .parseWithIOException(PARSER, input);
242 java.io.InputStream input,
243 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
244 throws java.io.IOException {
245 return com.google.protobuf.GeneratedMessageV3
246 .parseWithIOException(PARSER, input, extensionRegistry);
250 throws java.io.IOException {
251 return com.google.protobuf.GeneratedMessageV3
252 .parseDelimitedWithIOException(PARSER, input);
256 java.io.InputStream input,
257 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
258 throws java.io.IOException {
259 return com.google.protobuf.GeneratedMessageV3
260 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
263 com.google.protobuf.CodedInputStream input)
264 throws java.io.IOException {
265 return com.google.protobuf.GeneratedMessageV3
266 .parseWithIOException(PARSER, input);
269 com.google.protobuf.CodedInputStream input,
270 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
271 throws java.io.IOException {
272 return com.google.protobuf.GeneratedMessageV3
273 .parseWithIOException(PARSER, input, extensionRegistry);
286 return this == DEFAULT_INSTANCE
292 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
305 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
308 public static final com.google.protobuf.Descriptors.Descriptor
310 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
314 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
316 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
317 .ensureFieldAccessorsInitialized(
318 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
327 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
337 entries_ = emptyIntList();
342 public com.google.protobuf.Descriptors.Descriptor
344 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
349 return com.google.ortools.sat.DenseMatrixProto.getDefaultInstance();
356 throw newUninitializedMessageException(result);
364 if (bitField0_ != 0) { buildPartial0(result); }
369 private void buildPartial0(com.google.ortools.sat.DenseMatrixProto result) {
370 int from_bitField0_ = bitField0_;
371 if (((from_bitField0_ & 0x00000001) != 0)) {
372 result.numRows_ = numRows_;
374 if (((from_bitField0_ & 0x00000002) != 0)) {
375 result.numCols_ = numCols_;
377 if (((from_bitField0_ & 0x00000004) != 0)) {
378 entries_.makeImmutable();
379 result.entries_ = entries_;
385 return super.
clone();
389 com.google.protobuf.Descriptors.FieldDescriptor field,
390 java.lang.Object value) {
391 return super.
setField(field, value);
395 com.google.protobuf.Descriptors.FieldDescriptor field) {
400 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
405 com.google.protobuf.Descriptors.FieldDescriptor field,
406 int index, java.lang.Object value) {
411 com.google.protobuf.Descriptors.FieldDescriptor field,
412 java.lang.Object value) {
417 if (other instanceof com.google.ortools.sat.DenseMatrixProto) {
418 return mergeFrom((com.google.ortools.sat.DenseMatrixProto)other);
420 super.mergeFrom(other);
426 if (other == com.google.ortools.sat.DenseMatrixProto.getDefaultInstance())
return this;
427 if (other.getNumRows() != 0) {
430 if (other.getNumCols() != 0) {
433 if (!other.entries_.isEmpty()) {
434 if (entries_.isEmpty()) {
435 entries_ = other.entries_;
436 entries_.makeImmutable();
437 bitField0_ |= 0x00000004;
439 ensureEntriesIsMutable();
440 entries_.addAll(other.entries_);
456 com.google.protobuf.CodedInputStream input,
457 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
458 throws java.io.IOException {
459 if (extensionRegistry ==
null) {
460 throw new java.lang.NullPointerException();
463 boolean done =
false;
465 int tag = input.readTag();
471 numRows_ = input.readInt32();
472 bitField0_ |= 0x00000001;
476 numCols_ = input.readInt32();
477 bitField0_ |= 0x00000002;
481 int v = input.readInt32();
482 ensureEntriesIsMutable();
487 int length = input.readRawVarint32();
488 int limit = input.pushLimit(length);
489 ensureEntriesIsMutable();
490 while (input.getBytesUntilLimit() > 0) {
491 entries_.addInt(input.readInt32());
493 input.popLimit(limit);
497 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
504 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
505 throw e.unwrapIOException();
511 private int bitField0_;
513 private int numRows_ ;
530 bitField0_ |= 0x00000001;
539 bitField0_ = (bitField0_ & ~0x00000001);
545 private int numCols_ ;
562 bitField0_ |= 0x00000002;
571 bitField0_ = (bitField0_ & ~0x00000002);
577 private com.google.protobuf.Internal.IntList entries_ = emptyIntList();
578 private void ensureEntriesIsMutable() {
579 if (!entries_.isModifiable()) {
580 entries_ = makeMutableCopy(entries_);
582 bitField0_ |= 0x00000004;
588 public java.util.List<java.lang.Integer>
590 entries_.makeImmutable();
598 return entries_.size();
606 return entries_.getInt(index);
615 int index,
int value) {
617 ensureEntriesIsMutable();
618 entries_.setInt(index, value);
619 bitField0_ |= 0x00000004;
630 ensureEntriesIsMutable();
631 entries_.addInt(value);
632 bitField0_ |= 0x00000004;
642 java.lang.Iterable<? extends java.lang.Integer> values) {
643 ensureEntriesIsMutable();
644 com.google.protobuf.AbstractMessageLite.Builder.addAll(
646 bitField0_ |= 0x00000004;
655 entries_ = emptyIntList();
656 bitField0_ = (bitField0_ & ~0x00000004);
662 final com.google.protobuf.UnknownFieldSet unknownFields) {
668 final com.google.protobuf.UnknownFieldSet unknownFields) {
679 DEFAULT_INSTANCE =
new com.google.ortools.sat.DenseMatrixProto();
683 return DEFAULT_INSTANCE;
690 com.google.protobuf.CodedInputStream input,
691 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
692 throws com.google.protobuf.InvalidProtocolBufferException {
695 builder.mergeFrom(input, extensionRegistry);
696 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
697 throw e.setUnfinishedMessage(builder.buildPartial());
698 }
catch (com.google.protobuf.UninitializedMessageException e) {
699 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
700 }
catch (java.io.IOException e) {
701 throw new com.google.protobuf.InvalidProtocolBufferException(e)
702 .setUnfinishedMessage(builder.buildPartial());
704 return builder.buildPartial();
719 return DEFAULT_INSTANCE;