6package com.google.ortools.sat;
16@com.google.protobuf.Generated
17public final class DenseMatrixProto
extends
18 com.google.protobuf.GeneratedMessage implements
21private static final long serialVersionUID = 0L;
23 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
24 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 DenseMatrixProto.class.getName());
32 private DenseMatrixProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35 private DenseMatrixProto() {
36 entries_ = emptyIntList();
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
45 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
53 private int numRows_ = 0;
64 private int numCols_ = 0;
75 @SuppressWarnings(
"serial")
76 private com.google.protobuf.Internal.IntList entries_ =
83 public java.
util.List<java.lang.Integer>
92 return entries_.size();
100 return entries_.getInt(index);
102 private int entriesMemoizedSerializedSize = -1;
104 private byte memoizedIsInitialized = -1;
111 memoizedIsInitialized = 1;
116 public void writeTo(com.google.protobuf.CodedOutputStream output)
117 throws java.io.IOException {
120 output.writeInt32(1, numRows_);
123 output.writeInt32(2, numCols_);
126 output.writeUInt32NoTag(26);
127 output.writeUInt32NoTag(entriesMemoizedSerializedSize);
129 for (
int i = 0; i < entries_.size(); i++) {
130 output.writeInt32NoTag(entries_.getInt(i));
132 getUnknownFields().writeTo(output);
137 int size = memoizedSize;
138 if (size != -1)
return size;
142 size += com.google.protobuf.CodedOutputStream
143 .computeInt32Size(1, numRows_);
146 size += com.google.protobuf.CodedOutputStream
147 .computeInt32Size(2, numCols_);
151 for (
int i = 0; i < entries_.size(); i++) {
152 dataSize += com.google.protobuf.CodedOutputStream
153 .computeInt32SizeNoTag(entries_.getInt(i));
158 size += com.google.protobuf.CodedOutputStream
159 .computeInt32SizeNoTag(dataSize);
161 entriesMemoizedSerializedSize = dataSize;
163 size += getUnknownFields().getSerializedSize();
169 public boolean equals(
final java.lang.Object obj) {
173 if (!(obj instanceof com.google.ortools.sat.DenseMatrixProto)) {
174 return super.equals(obj);
184 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
190 if (memoizedHashCode != 0) {
191 return memoizedHashCode;
203 hash = (29 * hash) + getUnknownFields().hashCode();
204 memoizedHashCode = hash;
209 java.nio.ByteBuffer data)
210 throws com.google.protobuf.InvalidProtocolBufferException {
211 return PARSER.parseFrom(data);
214 java.nio.ByteBuffer data,
215 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
216 throws com.google.protobuf.InvalidProtocolBufferException {
217 return PARSER.parseFrom(data, extensionRegistry);
220 com.google.protobuf.ByteString data)
221 throws com.google.protobuf.InvalidProtocolBufferException {
222 return PARSER.parseFrom(data);
225 com.google.protobuf.ByteString data,
226 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
227 throws com.google.protobuf.InvalidProtocolBufferException {
228 return PARSER.parseFrom(data, extensionRegistry);
231 throws com.google.protobuf.InvalidProtocolBufferException {
232 return PARSER.parseFrom(data);
236 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
237 throws com.google.protobuf.InvalidProtocolBufferException {
238 return PARSER.parseFrom(data, extensionRegistry);
241 throws java.io.IOException {
242 return com.google.protobuf.GeneratedMessage
243 .parseWithIOException(PARSER, input);
246 java.io.InputStream input,
247 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
248 throws java.io.IOException {
249 return com.google.protobuf.GeneratedMessage
250 .parseWithIOException(PARSER, input, extensionRegistry);
254 throws java.io.IOException {
255 return com.google.protobuf.GeneratedMessage
256 .parseDelimitedWithIOException(PARSER, input);
260 java.io.InputStream input,
261 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
262 throws java.io.IOException {
263 return com.google.protobuf.GeneratedMessage
264 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
267 com.google.protobuf.CodedInputStream input)
268 throws java.io.IOException {
269 return com.google.protobuf.GeneratedMessage
270 .parseWithIOException(PARSER, input);
273 com.google.protobuf.CodedInputStream input,
274 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
275 throws java.io.IOException {
276 return com.google.protobuf.GeneratedMessage
277 .parseWithIOException(PARSER, input, extensionRegistry);
283 return DEFAULT_INSTANCE.toBuilder();
286 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
290 return this == DEFAULT_INSTANCE
296 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
308 public static final class Builder
extends
309 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
312 public static final com.google.protobuf.Descriptors.Descriptor
314 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
318 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
320 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
321 .ensureFieldAccessorsInitialized(
322 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
331 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
341 entries_ = emptyIntList();
346 public com.google.protobuf.Descriptors.Descriptor
348 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
353 return com.google.ortools.sat.DenseMatrixProto.getDefaultInstance();
360 throw newUninitializedMessageException(result);
368 if (bitField0_ != 0) { buildPartial0(result); }
373 private void buildPartial0(com.google.ortools.sat.DenseMatrixProto result) {
374 int from_bitField0_ = bitField0_;
375 if (((from_bitField0_ & 0x00000001) != 0)) {
376 result.numRows_ = numRows_;
378 if (((from_bitField0_ & 0x00000002) != 0)) {
379 result.numCols_ = numCols_;
381 if (((from_bitField0_ & 0x00000004) != 0)) {
382 entries_.makeImmutable();
383 result.entries_ = entries_;
388 public Builder
mergeFrom(com.google.protobuf.Message other) {
389 if (other instanceof com.google.ortools.sat.DenseMatrixProto) {
390 return mergeFrom((com.google.ortools.sat.DenseMatrixProto)other);
392 super.mergeFrom(other);
397 public Builder
mergeFrom(com.google.ortools.sat.DenseMatrixProto other) {
398 if (other == com.google.ortools.sat.DenseMatrixProto.getDefaultInstance())
return this;
399 if (other.getNumRows() != 0) {
402 if (other.getNumCols() != 0) {
405 if (!other.entries_.isEmpty()) {
406 if (entries_.isEmpty()) {
407 entries_ = other.entries_;
408 entries_.makeImmutable();
409 bitField0_ |= 0x00000004;
411 ensureEntriesIsMutable();
412 entries_.addAll(other.entries_);
416 this.mergeUnknownFields(other.getUnknownFields());
428 com.google.protobuf.CodedInputStream input,
429 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
430 throws java.io.IOException {
431 if (extensionRegistry ==
null) {
432 throw new java.lang.NullPointerException();
435 boolean done =
false;
437 int tag = input.readTag();
443 numRows_ = input.readInt32();
444 bitField0_ |= 0x00000001;
448 numCols_ = input.readInt32();
449 bitField0_ |= 0x00000002;
453 int v = input.readInt32();
454 ensureEntriesIsMutable();
459 int length = input.readRawVarint32();
460 int limit = input.pushLimit(length);
461 ensureEntriesIsMutable();
462 while (input.getBytesUntilLimit() > 0) {
463 entries_.addInt(input.readInt32());
465 input.popLimit(limit);
469 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
476 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
477 throw e.unwrapIOException();
483 private int bitField0_;
485 private int numRows_ ;
502 bitField0_ |= 0x00000001;
511 bitField0_ = (bitField0_ & ~0x00000001);
517 private int numCols_ ;
534 bitField0_ |= 0x00000002;
543 bitField0_ = (bitField0_ & ~0x00000002);
549 private com.google.protobuf.Internal.IntList entries_ = emptyIntList();
550 private void ensureEntriesIsMutable() {
551 if (!entries_.isModifiable()) {
552 entries_ = makeMutableCopy(entries_);
554 bitField0_ |= 0x00000004;
560 public java.util.List<java.lang.Integer>
562 entries_.makeImmutable();
570 return entries_.size();
578 return entries_.getInt(index);
587 int index,
int value) {
589 ensureEntriesIsMutable();
590 entries_.setInt(index, value);
591 bitField0_ |= 0x00000004;
602 ensureEntriesIsMutable();
603 entries_.addInt(value);
604 bitField0_ |= 0x00000004;
614 java.lang.Iterable<? extends java.lang.Integer> values) {
615 ensureEntriesIsMutable();
616 com.google.protobuf.AbstractMessageLite.Builder.addAll(
618 bitField0_ |= 0x00000004;
627 entries_ = emptyIntList();
628 bitField0_ = (bitField0_ & ~0x00000004);
639 DEFAULT_INSTANCE =
new com.google.ortools.sat.DenseMatrixProto();
643 return DEFAULT_INSTANCE;
650 com.google.protobuf.CodedInputStream input,
651 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
652 throws com.google.protobuf.InvalidProtocolBufferException {
655 builder.mergeFrom(input, extensionRegistry);
656 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
657 throw e.setUnfinishedMessage(builder.buildPartial());
658 }
catch (com.google.protobuf.UninitializedMessageException e) {
659 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
660 }
catch (java.io.IOException e) {
661 throw new com.google.protobuf.InvalidProtocolBufferException(e)
662 .setUnfinishedMessage(builder.buildPartial());
664 return builder.buildPartial();
668 public static com.google.protobuf.Parser<DenseMatrixProto>
parser() {
679 return DEFAULT_INSTANCE;