5package com.google.ortools.sat;
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
30 private DenseMatrixProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 entries_ = emptyIntList();
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
51 private int numRows_ = 0;
62 private int numCols_ = 0;
73 @SuppressWarnings(
"serial")
74 private com.google.protobuf.Internal.IntList entries_ =
81 public java.util.List<java.lang.Integer>
90 return entries_.size();
98 return entries_.getInt(index);
100 private int entriesMemoizedSerializedSize = -1;
102 private byte memoizedIsInitialized = -1;
109 memoizedIsInitialized = 1;
114 public void writeTo(com.google.protobuf.CodedOutputStream output)
115 throws java.io.IOException {
118 output.writeInt32(1, numRows_);
121 output.writeInt32(2, numCols_);
124 output.writeUInt32NoTag(26);
125 output.writeUInt32NoTag(entriesMemoizedSerializedSize);
127 for (
int i = 0; i < entries_.size(); i++) {
128 output.writeInt32NoTag(entries_.getInt(i));
130 getUnknownFields().writeTo(output);
135 int size = memoizedSize;
136 if (size != -1)
return size;
140 size += com.google.protobuf.CodedOutputStream
141 .computeInt32Size(1, numRows_);
144 size += com.google.protobuf.CodedOutputStream
145 .computeInt32Size(2, numCols_);
149 for (
int i = 0; i < entries_.size(); i++) {
150 dataSize += com.google.protobuf.CodedOutputStream
151 .computeInt32SizeNoTag(entries_.getInt(i));
156 size += com.google.protobuf.CodedOutputStream
157 .computeInt32SizeNoTag(dataSize);
159 entriesMemoizedSerializedSize = dataSize;
161 size += getUnknownFields().getSerializedSize();
167 public boolean equals(
final java.lang.Object obj) {
171 if (!(obj instanceof com.google.ortools.sat.DenseMatrixProto)) {
172 return super.equals(obj);
182 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
188 if (memoizedHashCode != 0) {
189 return memoizedHashCode;
201 hash = (29 * hash) + getUnknownFields().hashCode();
202 memoizedHashCode = hash;
207 java.nio.ByteBuffer data)
208 throws com.google.protobuf.InvalidProtocolBufferException {
209 return PARSER.parseFrom(data);
212 java.nio.ByteBuffer data,
213 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
214 throws com.google.protobuf.InvalidProtocolBufferException {
215 return PARSER.parseFrom(data, extensionRegistry);
218 com.google.protobuf.ByteString data)
219 throws com.google.protobuf.InvalidProtocolBufferException {
220 return PARSER.parseFrom(data);
223 com.google.protobuf.ByteString data,
224 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
225 throws com.google.protobuf.InvalidProtocolBufferException {
226 return PARSER.parseFrom(data, extensionRegistry);
229 throws com.google.protobuf.InvalidProtocolBufferException {
230 return PARSER.parseFrom(data);
234 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
235 throws com.google.protobuf.InvalidProtocolBufferException {
236 return PARSER.parseFrom(data, extensionRegistry);
239 throws java.io.IOException {
240 return com.google.protobuf.GeneratedMessage
241 .parseWithIOException(PARSER, input);
244 java.io.InputStream input,
245 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
246 throws java.io.IOException {
247 return com.google.protobuf.GeneratedMessage
248 .parseWithIOException(PARSER, input, extensionRegistry);
252 throws java.io.IOException {
253 return com.google.protobuf.GeneratedMessage
254 .parseDelimitedWithIOException(PARSER, input);
258 java.io.InputStream input,
259 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
260 throws java.io.IOException {
261 return com.google.protobuf.GeneratedMessage
262 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
265 com.google.protobuf.CodedInputStream input)
266 throws java.io.IOException {
267 return com.google.protobuf.GeneratedMessage
268 .parseWithIOException(PARSER, input);
271 com.google.protobuf.CodedInputStream input,
272 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
273 throws java.io.IOException {
274 return com.google.protobuf.GeneratedMessage
275 .parseWithIOException(PARSER, input, extensionRegistry);
288 return this == DEFAULT_INSTANCE
294 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
307 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
310 public static final com.google.protobuf.Descriptors.Descriptor
312 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
316 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
318 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_fieldAccessorTable
319 .ensureFieldAccessorsInitialized(
320 com.google.ortools.sat.DenseMatrixProto.class, com.google.ortools.sat.DenseMatrixProto.Builder.class);
329 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
339 entries_ = emptyIntList();
344 public com.google.protobuf.Descriptors.Descriptor
346 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_DenseMatrixProto_descriptor;
351 return com.google.ortools.sat.DenseMatrixProto.getDefaultInstance();
358 throw newUninitializedMessageException(result);
366 if (bitField0_ != 0) { buildPartial0(result); }
371 private void buildPartial0(com.google.ortools.sat.DenseMatrixProto result) {
372 int from_bitField0_ = bitField0_;
373 if (((from_bitField0_ & 0x00000001) != 0)) {
374 result.numRows_ = numRows_;
376 if (((from_bitField0_ & 0x00000002) != 0)) {
377 result.numCols_ = numCols_;
379 if (((from_bitField0_ & 0x00000004) != 0)) {
380 entries_.makeImmutable();
381 result.entries_ = entries_;
387 if (other instanceof com.google.ortools.sat.DenseMatrixProto) {
388 return mergeFrom((com.google.ortools.sat.DenseMatrixProto)other);
390 super.mergeFrom(other);
396 if (other == com.google.ortools.sat.DenseMatrixProto.getDefaultInstance())
return this;
397 if (other.getNumRows() != 0) {
400 if (other.getNumCols() != 0) {
403 if (!other.entries_.isEmpty()) {
404 if (entries_.isEmpty()) {
405 entries_ = other.entries_;
406 entries_.makeImmutable();
407 bitField0_ |= 0x00000004;
409 ensureEntriesIsMutable();
410 entries_.addAll(other.entries_);
414 this.mergeUnknownFields(other.getUnknownFields());
426 com.google.protobuf.CodedInputStream input,
427 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
428 throws java.io.IOException {
429 if (extensionRegistry ==
null) {
430 throw new java.lang.NullPointerException();
433 boolean done =
false;
435 int tag = input.readTag();
441 numRows_ = input.readInt32();
442 bitField0_ |= 0x00000001;
446 numCols_ = input.readInt32();
447 bitField0_ |= 0x00000002;
451 int v = input.readInt32();
452 ensureEntriesIsMutable();
457 int length = input.readRawVarint32();
458 int limit = input.pushLimit(length);
459 ensureEntriesIsMutable();
460 while (input.getBytesUntilLimit() > 0) {
461 entries_.addInt(input.readInt32());
463 input.popLimit(limit);
467 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
474 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
475 throw e.unwrapIOException();
481 private int bitField0_;
483 private int numRows_ ;
500 bitField0_ |= 0x00000001;
509 bitField0_ = (bitField0_ & ~0x00000001);
515 private int numCols_ ;
532 bitField0_ |= 0x00000002;
541 bitField0_ = (bitField0_ & ~0x00000002);
547 private com.google.protobuf.Internal.IntList entries_ = emptyIntList();
548 private void ensureEntriesIsMutable() {
549 if (!entries_.isModifiable()) {
550 entries_ = makeMutableCopy(entries_);
552 bitField0_ |= 0x00000004;
558 public java.util.List<java.lang.Integer>
560 entries_.makeImmutable();
568 return entries_.size();
576 return entries_.getInt(index);
585 int index,
int value) {
587 ensureEntriesIsMutable();
588 entries_.setInt(index, value);
589 bitField0_ |= 0x00000004;
600 ensureEntriesIsMutable();
601 entries_.addInt(value);
602 bitField0_ |= 0x00000004;
612 java.lang.Iterable<? extends java.lang.Integer> values) {
613 ensureEntriesIsMutable();
614 com.google.protobuf.AbstractMessageLite.Builder.addAll(
616 bitField0_ |= 0x00000004;
625 entries_ = emptyIntList();
626 bitField0_ = (bitField0_ & ~0x00000004);
637 DEFAULT_INSTANCE =
new com.google.ortools.sat.DenseMatrixProto();
641 return DEFAULT_INSTANCE;
648 com.google.protobuf.CodedInputStream input,
649 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
650 throws com.google.protobuf.InvalidProtocolBufferException {
653 builder.mergeFrom(input, extensionRegistry);
654 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
655 throw e.setUnfinishedMessage(builder.buildPartial());
656 }
catch (com.google.protobuf.UninitializedMessageException e) {
657 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
658 }
catch (java.io.IOException e) {
659 throw new com.google.protobuf.InvalidProtocolBufferException(e)
660 .setUnfinishedMessage(builder.buildPartial());
662 return builder.buildPartial();
677 return DEFAULT_INSTANCE;