6package com.google.ortools.sat;
16public final class DenseMatrixProto
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 DenseMatrixProto.class.getName());
31 private DenseMatrixProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private DenseMatrixProto() {
35 entries_ = emptyIntList();
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
52 private int numRows_ = 0;
63 private int numCols_ = 0;
74 @SuppressWarnings(
"serial")
75 private com.google.protobuf.Internal.IntList entries_ =
82 public java.
util.List<java.lang.Integer>
91 return entries_.size();
99 return entries_.getInt(index);
101 private int entriesMemoizedSerializedSize = -1;
103 private byte memoizedIsInitialized = -1;
110 memoizedIsInitialized = 1;
115 public void writeTo(com.google.protobuf.CodedOutputStream output)
116 throws java.io.IOException {
119 output.writeInt32(1, numRows_);
122 output.writeInt32(2, numCols_);
125 output.writeUInt32NoTag(26);
126 output.writeUInt32NoTag(entriesMemoizedSerializedSize);
128 for (
int i = 0; i < entries_.size(); i++) {
129 output.writeInt32NoTag(entries_.getInt(i));
131 getUnknownFields().writeTo(output);
136 int size = memoizedSize;
137 if (size != -1)
return size;
141 size += com.google.protobuf.CodedOutputStream
142 .computeInt32Size(1, numRows_);
145 size += com.google.protobuf.CodedOutputStream
146 .computeInt32Size(2, numCols_);
150 for (
int i = 0; i < entries_.size(); i++) {
151 dataSize += com.google.protobuf.CodedOutputStream
152 .computeInt32SizeNoTag(entries_.getInt(i));
157 size += com.google.protobuf.CodedOutputStream
158 .computeInt32SizeNoTag(dataSize);
160 entriesMemoizedSerializedSize = dataSize;
162 size += getUnknownFields().getSerializedSize();
168 public boolean equals(
final java.lang.Object obj) {
172 if (!(obj instanceof com.google.ortools.sat.DenseMatrixProto)) {
173 return super.equals(obj);
183 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
189 if (memoizedHashCode != 0) {
190 return memoizedHashCode;
202 hash = (29 * hash) + getUnknownFields().hashCode();
203 memoizedHashCode = hash;
208 java.nio.ByteBuffer data)
209 throws com.google.protobuf.InvalidProtocolBufferException {
210 return PARSER.parseFrom(data);
213 java.nio.ByteBuffer data,
214 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
215 throws com.google.protobuf.InvalidProtocolBufferException {
216 return PARSER.parseFrom(data, extensionRegistry);
219 com.google.protobuf.ByteString data)
220 throws com.google.protobuf.InvalidProtocolBufferException {
221 return PARSER.parseFrom(data);
224 com.google.protobuf.ByteString data,
225 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
226 throws com.google.protobuf.InvalidProtocolBufferException {
227 return PARSER.parseFrom(data, extensionRegistry);
230 throws com.google.protobuf.InvalidProtocolBufferException {
231 return PARSER.parseFrom(data);
235 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
236 throws com.google.protobuf.InvalidProtocolBufferException {
237 return PARSER.parseFrom(data, extensionRegistry);
240 throws java.io.IOException {
241 return com.google.protobuf.GeneratedMessage
242 .parseWithIOException(PARSER, input);
245 java.io.InputStream input,
246 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
247 throws java.io.IOException {
248 return com.google.protobuf.GeneratedMessage
249 .parseWithIOException(PARSER, input, extensionRegistry);
253 throws java.io.IOException {
254 return com.google.protobuf.GeneratedMessage
255 .parseDelimitedWithIOException(PARSER, input);
259 java.io.InputStream input,
260 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
261 throws java.io.IOException {
262 return com.google.protobuf.GeneratedMessage
263 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
266 com.google.protobuf.CodedInputStream input)
267 throws java.io.IOException {
268 return com.google.protobuf.GeneratedMessage
269 .parseWithIOException(PARSER, input);
272 com.google.protobuf.CodedInputStream input,
273 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
274 throws java.io.IOException {
275 return com.google.protobuf.GeneratedMessage
276 .parseWithIOException(PARSER, input, extensionRegistry);
282 return DEFAULT_INSTANCE.toBuilder();
285 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
289 return this == DEFAULT_INSTANCE
295 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
307 public static final class Builder
extends
308 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
311 public static final com.google.protobuf.Descriptors.Descriptor
313 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
317 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
319 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
320 .ensureFieldAccessorsInitialized(
321 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
330 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
340 entries_ = emptyIntList();
345 public com.google.protobuf.Descriptors.Descriptor
347 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
352 return com.google.ortools.sat.DenseMatrixProto.getDefaultInstance();
359 throw newUninitializedMessageException(result);
367 if (bitField0_ != 0) { buildPartial0(result); }
372 private void buildPartial0(com.google.ortools.sat.DenseMatrixProto result) {
373 int from_bitField0_ = bitField0_;
374 if (((from_bitField0_ & 0x00000001) != 0)) {
375 result.numRows_ = numRows_;
377 if (((from_bitField0_ & 0x00000002) != 0)) {
378 result.numCols_ = numCols_;
380 if (((from_bitField0_ & 0x00000004) != 0)) {
381 entries_.makeImmutable();
382 result.entries_ = entries_;
387 public Builder
mergeFrom(com.google.protobuf.Message other) {
388 if (other instanceof com.google.ortools.sat.DenseMatrixProto) {
389 return mergeFrom((com.google.ortools.sat.DenseMatrixProto)other);
391 super.mergeFrom(other);
396 public Builder
mergeFrom(com.google.ortools.sat.DenseMatrixProto other) {
397 if (other == com.google.ortools.sat.DenseMatrixProto.getDefaultInstance())
return this;
398 if (other.getNumRows() != 0) {
401 if (other.getNumCols() != 0) {
404 if (!other.entries_.isEmpty()) {
405 if (entries_.isEmpty()) {
406 entries_ = other.entries_;
407 entries_.makeImmutable();
408 bitField0_ |= 0x00000004;
410 ensureEntriesIsMutable();
411 entries_.addAll(other.entries_);
415 this.mergeUnknownFields(other.getUnknownFields());
427 com.google.protobuf.CodedInputStream input,
428 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
429 throws java.io.IOException {
430 if (extensionRegistry ==
null) {
431 throw new java.lang.NullPointerException();
434 boolean done =
false;
436 int tag = input.readTag();
442 numRows_ = input.readInt32();
443 bitField0_ |= 0x00000001;
447 numCols_ = input.readInt32();
448 bitField0_ |= 0x00000002;
452 int v = input.readInt32();
453 ensureEntriesIsMutable();
458 int length = input.readRawVarint32();
459 int limit = input.pushLimit(length);
460 ensureEntriesIsMutable();
461 while (input.getBytesUntilLimit() > 0) {
462 entries_.addInt(input.readInt32());
464 input.popLimit(limit);
468 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
475 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
476 throw e.unwrapIOException();
482 private int bitField0_;
484 private int numRows_ ;
501 bitField0_ |= 0x00000001;
510 bitField0_ = (bitField0_ & ~0x00000001);
516 private int numCols_ ;
533 bitField0_ |= 0x00000002;
542 bitField0_ = (bitField0_ & ~0x00000002);
548 private com.google.protobuf.Internal.IntList entries_ = emptyIntList();
549 private void ensureEntriesIsMutable() {
550 if (!entries_.isModifiable()) {
551 entries_ = makeMutableCopy(entries_);
553 bitField0_ |= 0x00000004;
559 public java.util.List<java.lang.Integer>
561 entries_.makeImmutable();
569 return entries_.size();
577 return entries_.getInt(index);
586 int index,
int value) {
588 ensureEntriesIsMutable();
589 entries_.setInt(index, value);
590 bitField0_ |= 0x00000004;
601 ensureEntriesIsMutable();
602 entries_.addInt(value);
603 bitField0_ |= 0x00000004;
613 java.lang.Iterable<? extends java.lang.Integer> values) {
614 ensureEntriesIsMutable();
615 com.google.protobuf.AbstractMessageLite.Builder.addAll(
617 bitField0_ |= 0x00000004;
626 entries_ = emptyIntList();
627 bitField0_ = (bitField0_ & ~0x00000004);
638 DEFAULT_INSTANCE =
new com.google.ortools.sat.DenseMatrixProto();
642 return DEFAULT_INSTANCE;
649 com.google.protobuf.CodedInputStream input,
650 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
651 throws com.google.protobuf.InvalidProtocolBufferException {
654 builder.mergeFrom(input, extensionRegistry);
655 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
656 throw e.setUnfinishedMessage(builder.buildPartial());
657 }
catch (com.google.protobuf.UninitializedMessageException e) {
658 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
659 }
catch (java.io.IOException e) {
660 throw new com.google.protobuf.InvalidProtocolBufferException(e)
661 .setUnfinishedMessage(builder.buildPartial());
663 return builder.buildPartial();
667 public static com.google.protobuf.Parser<DenseMatrixProto>
parser() {
678 return DEFAULT_INSTANCE;