Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ConstraintSolverStatistics.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/constraint_solver/search_stats.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.constraintsolver;
7
15@com.google.protobuf.Generated
16public final class ConstraintSolverStatistics extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.ConstraintSolverStatistics)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 31,
26 /* patch= */ 1,
27 /* suffix= */ "",
28 ConstraintSolverStatistics.class.getName());
29 }
30 // Use ConstraintSolverStatistics.newBuilder() to construct.
31 private ConstraintSolverStatistics(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private ConstraintSolverStatistics() {
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.SearchStats.internal_static_operations_research_ConstraintSolverStatistics_descriptor;
40 }
41
42 @java.lang.Override
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.constraintsolver.SearchStats.internal_static_operations_research_ConstraintSolverStatistics_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.constraintsolver.ConstraintSolverStatistics.class, com.google.ortools.constraintsolver.ConstraintSolverStatistics.Builder.class);
48 }
49
50 public static final int NUM_BRANCHES_FIELD_NUMBER = 1;
51 private long numBranches_ = 0L;
60 @java.lang.Override
61 public long getNumBranches() {
62 return numBranches_;
63 }
64
65 public static final int NUM_FAILURES_FIELD_NUMBER = 2;
66 private long numFailures_ = 0L;
75 @java.lang.Override
76 public long getNumFailures() {
77 return numFailures_;
78 }
79
80 public static final int NUM_SOLUTIONS_FIELD_NUMBER = 3;
81 private long numSolutions_ = 0L;
90 @java.lang.Override
91 public long getNumSolutions() {
92 return numSolutions_;
93 }
94
95 public static final int BYTES_USED_FIELD_NUMBER = 4;
96 private long bytesUsed_ = 0L;
105 @java.lang.Override
106 public long getBytesUsed() {
107 return bytesUsed_;
108 }
109
110 public static final int DURATION_SECONDS_FIELD_NUMBER = 5;
111 private double durationSeconds_ = 0D;
120 @java.lang.Override
121 public double getDurationSeconds() {
122 return durationSeconds_;
123 }
124
125 private byte memoizedIsInitialized = -1;
126 @java.lang.Override
127 public final boolean isInitialized() {
128 byte isInitialized = memoizedIsInitialized;
129 if (isInitialized == 1) return true;
130 if (isInitialized == 0) return false;
131
132 memoizedIsInitialized = 1;
133 return true;
134 }
135
136 @java.lang.Override
137 public void writeTo(com.google.protobuf.CodedOutputStream output)
138 throws java.io.IOException {
139 if (numBranches_ != 0L) {
140 output.writeInt64(1, numBranches_);
141 }
142 if (numFailures_ != 0L) {
143 output.writeInt64(2, numFailures_);
144 }
145 if (numSolutions_ != 0L) {
146 output.writeInt64(3, numSolutions_);
147 }
148 if (bytesUsed_ != 0L) {
149 output.writeInt64(4, bytesUsed_);
150 }
151 if (java.lang.Double.doubleToRawLongBits(durationSeconds_) != 0) {
152 output.writeDouble(5, durationSeconds_);
153 }
154 getUnknownFields().writeTo(output);
155 }
156
157 @java.lang.Override
158 public int getSerializedSize() {
159 int size = memoizedSize;
160 if (size != -1) return size;
161
162 size = 0;
163 if (numBranches_ != 0L) {
164 size += com.google.protobuf.CodedOutputStream
165 .computeInt64Size(1, numBranches_);
166 }
167 if (numFailures_ != 0L) {
168 size += com.google.protobuf.CodedOutputStream
169 .computeInt64Size(2, numFailures_);
170 }
171 if (numSolutions_ != 0L) {
172 size += com.google.protobuf.CodedOutputStream
173 .computeInt64Size(3, numSolutions_);
174 }
175 if (bytesUsed_ != 0L) {
176 size += com.google.protobuf.CodedOutputStream
177 .computeInt64Size(4, bytesUsed_);
178 }
179 if (java.lang.Double.doubleToRawLongBits(durationSeconds_) != 0) {
180 size += com.google.protobuf.CodedOutputStream
181 .computeDoubleSize(5, durationSeconds_);
182 }
183 size += getUnknownFields().getSerializedSize();
184 memoizedSize = size;
185 return size;
186 }
187
188 @java.lang.Override
189 public boolean equals(final java.lang.Object obj) {
190 if (obj == this) {
191 return true;
192 }
193 if (!(obj instanceof com.google.ortools.constraintsolver.ConstraintSolverStatistics)) {
194 return super.equals(obj);
195 }
196 com.google.ortools.constraintsolver.ConstraintSolverStatistics other = (com.google.ortools.constraintsolver.ConstraintSolverStatistics) obj;
197
198 if (getNumBranches()
199 != other.getNumBranches()) return false;
200 if (getNumFailures()
201 != other.getNumFailures()) return false;
202 if (getNumSolutions()
203 != other.getNumSolutions()) return false;
204 if (getBytesUsed()
205 != other.getBytesUsed()) return false;
206 if (java.lang.Double.doubleToLongBits(getDurationSeconds())
207 != java.lang.Double.doubleToLongBits(
208 other.getDurationSeconds())) return false;
209 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
210 return true;
211 }
212
213 @java.lang.Override
214 public int hashCode() {
215 if (memoizedHashCode != 0) {
216 return memoizedHashCode;
217 }
218 int hash = 41;
219 hash = (19 * hash) + getDescriptor().hashCode();
220 hash = (37 * hash) + NUM_BRANCHES_FIELD_NUMBER;
221 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
223 hash = (37 * hash) + NUM_FAILURES_FIELD_NUMBER;
224 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
226 hash = (37 * hash) + NUM_SOLUTIONS_FIELD_NUMBER;
227 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
229 hash = (37 * hash) + BYTES_USED_FIELD_NUMBER;
230 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
231 getBytesUsed());
232 hash = (37 * hash) + DURATION_SECONDS_FIELD_NUMBER;
233 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
234 java.lang.Double.doubleToLongBits(getDurationSeconds()));
235 hash = (29 * hash) + getUnknownFields().hashCode();
236 memoizedHashCode = hash;
237 return hash;
238 }
239
241 java.nio.ByteBuffer data)
242 throws com.google.protobuf.InvalidProtocolBufferException {
243 return PARSER.parseFrom(data);
244 }
246 java.nio.ByteBuffer data,
247 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
248 throws com.google.protobuf.InvalidProtocolBufferException {
249 return PARSER.parseFrom(data, extensionRegistry);
250 }
252 com.google.protobuf.ByteString data)
253 throws com.google.protobuf.InvalidProtocolBufferException {
254 return PARSER.parseFrom(data);
255 }
257 com.google.protobuf.ByteString data,
258 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
259 throws com.google.protobuf.InvalidProtocolBufferException {
260 return PARSER.parseFrom(data, extensionRegistry);
261 }
263 throws com.google.protobuf.InvalidProtocolBufferException {
264 return PARSER.parseFrom(data);
265 }
267 byte[] data,
268 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
269 throws com.google.protobuf.InvalidProtocolBufferException {
270 return PARSER.parseFrom(data, extensionRegistry);
271 }
273 throws java.io.IOException {
274 return com.google.protobuf.GeneratedMessage
275 .parseWithIOException(PARSER, input);
276 }
278 java.io.InputStream input,
279 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
280 throws java.io.IOException {
281 return com.google.protobuf.GeneratedMessage
282 .parseWithIOException(PARSER, input, extensionRegistry);
283 }
284
286 throws java.io.IOException {
287 return com.google.protobuf.GeneratedMessage
288 .parseDelimitedWithIOException(PARSER, input);
289 }
290
292 java.io.InputStream input,
293 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
294 throws java.io.IOException {
295 return com.google.protobuf.GeneratedMessage
296 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
297 }
299 com.google.protobuf.CodedInputStream input)
300 throws java.io.IOException {
301 return com.google.protobuf.GeneratedMessage
302 .parseWithIOException(PARSER, input);
303 }
305 com.google.protobuf.CodedInputStream input,
306 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
307 throws java.io.IOException {
308 return com.google.protobuf.GeneratedMessage
309 .parseWithIOException(PARSER, input, extensionRegistry);
310 }
311
312 @java.lang.Override
313 public Builder newBuilderForType() { return newBuilder(); }
314 public static Builder newBuilder() {
315 return DEFAULT_INSTANCE.toBuilder();
316 }
317 public static Builder newBuilder(com.google.ortools.constraintsolver.ConstraintSolverStatistics prototype) {
318 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
319 }
320 @java.lang.Override
322 return this == DEFAULT_INSTANCE
323 ? new Builder() : new Builder().mergeFrom(this);
324 }
325
326 @java.lang.Override
328 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
329 Builder builder = new Builder(parent);
330 return builder;
331 }
332
339 public static final class Builder extends
340 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
341 // @@protoc_insertion_point(builder_implements:operations_research.ConstraintSolverStatistics)
343 public static final com.google.protobuf.Descriptors.Descriptor
345 return com.google.ortools.constraintsolver.SearchStats.internal_static_operations_research_ConstraintSolverStatistics_descriptor;
346 }
347
348 @java.lang.Override
349 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
351 return com.google.ortools.constraintsolver.SearchStats.internal_static_operations_research_ConstraintSolverStatistics_fieldAccessorTable
352 .ensureFieldAccessorsInitialized(
353 com.google.ortools.constraintsolver.ConstraintSolverStatistics.class, com.google.ortools.constraintsolver.ConstraintSolverStatistics.Builder.class);
354 }
355
356 // Construct using com.google.ortools.constraintsolver.ConstraintSolverStatistics.newBuilder()
357 private Builder() {
358
359 }
360
361 private Builder(
362 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
363 super(parent);
364
365 }
366 @java.lang.Override
367 public Builder clear() {
368 super.clear();
369 bitField0_ = 0;
370 numBranches_ = 0L;
371 numFailures_ = 0L;
372 numSolutions_ = 0L;
373 bytesUsed_ = 0L;
374 durationSeconds_ = 0D;
375 return this;
376 }
377
378 @java.lang.Override
379 public com.google.protobuf.Descriptors.Descriptor
381 return com.google.ortools.constraintsolver.SearchStats.internal_static_operations_research_ConstraintSolverStatistics_descriptor;
382 }
383
384 @java.lang.Override
386 return com.google.ortools.constraintsolver.ConstraintSolverStatistics.getDefaultInstance();
387 }
388
389 @java.lang.Override
392 if (!result.isInitialized()) {
393 throw newUninitializedMessageException(result);
394 }
395 return result;
396 }
397
398 @java.lang.Override
400 com.google.ortools.constraintsolver.ConstraintSolverStatistics result = new com.google.ortools.constraintsolver.ConstraintSolverStatistics(this);
401 if (bitField0_ != 0) { buildPartial0(result); }
402 onBuilt();
403 return result;
404 }
405
406 private void buildPartial0(com.google.ortools.constraintsolver.ConstraintSolverStatistics result) {
407 int from_bitField0_ = bitField0_;
408 if (((from_bitField0_ & 0x00000001) != 0)) {
409 result.numBranches_ = numBranches_;
410 }
411 if (((from_bitField0_ & 0x00000002) != 0)) {
412 result.numFailures_ = numFailures_;
413 }
414 if (((from_bitField0_ & 0x00000004) != 0)) {
415 result.numSolutions_ = numSolutions_;
416 }
417 if (((from_bitField0_ & 0x00000008) != 0)) {
418 result.bytesUsed_ = bytesUsed_;
419 }
420 if (((from_bitField0_ & 0x00000010) != 0)) {
421 result.durationSeconds_ = durationSeconds_;
422 }
423 }
424
425 @java.lang.Override
426 public Builder mergeFrom(com.google.protobuf.Message other) {
427 if (other instanceof com.google.ortools.constraintsolver.ConstraintSolverStatistics) {
428 return mergeFrom((com.google.ortools.constraintsolver.ConstraintSolverStatistics)other);
429 } else {
430 super.mergeFrom(other);
431 return this;
432 }
433 }
434
435 public Builder mergeFrom(com.google.ortools.constraintsolver.ConstraintSolverStatistics other) {
436 if (other == com.google.ortools.constraintsolver.ConstraintSolverStatistics.getDefaultInstance()) return this;
437 if (other.getNumBranches() != 0L) {
438 setNumBranches(other.getNumBranches());
439 }
440 if (other.getNumFailures() != 0L) {
441 setNumFailures(other.getNumFailures());
442 }
443 if (other.getNumSolutions() != 0L) {
444 setNumSolutions(other.getNumSolutions());
445 }
446 if (other.getBytesUsed() != 0L) {
447 setBytesUsed(other.getBytesUsed());
448 }
449 if (java.lang.Double.doubleToRawLongBits(other.getDurationSeconds()) != 0) {
450 setDurationSeconds(other.getDurationSeconds());
451 }
452 this.mergeUnknownFields(other.getUnknownFields());
453 onChanged();
454 return this;
455 }
456
457 @java.lang.Override
458 public final boolean isInitialized() {
459 return true;
460 }
461
462 @java.lang.Override
463 public Builder mergeFrom(
464 com.google.protobuf.CodedInputStream input,
465 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
466 throws java.io.IOException {
467 if (extensionRegistry == null) {
468 throw new java.lang.NullPointerException();
469 }
470 try {
471 boolean done = false;
472 while (!done) {
473 int tag = input.readTag();
474 switch (tag) {
475 case 0:
476 done = true;
477 break;
478 case 8: {
479 numBranches_ = input.readInt64();
480 bitField0_ |= 0x00000001;
481 break;
482 } // case 8
483 case 16: {
484 numFailures_ = input.readInt64();
485 bitField0_ |= 0x00000002;
486 break;
487 } // case 16
488 case 24: {
489 numSolutions_ = input.readInt64();
490 bitField0_ |= 0x00000004;
491 break;
492 } // case 24
493 case 32: {
494 bytesUsed_ = input.readInt64();
495 bitField0_ |= 0x00000008;
496 break;
497 } // case 32
498 case 41: {
499 durationSeconds_ = input.readDouble();
500 bitField0_ |= 0x00000010;
501 break;
502 } // case 41
503 default: {
504 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
505 done = true; // was an endgroup tag
506 }
507 break;
508 } // default:
509 } // switch (tag)
510 } // while (!done)
511 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
512 throw e.unwrapIOException();
513 } finally {
514 onChanged();
515 } // finally
516 return this;
517 }
518 private int bitField0_;
519
520 private long numBranches_ ;
529 @java.lang.Override
530 public long getNumBranches() {
531 return numBranches_;
532 }
533
542 public Builder setNumBranches(long value) {
543
544 numBranches_ = value;
545 bitField0_ |= 0x00000001;
546 onChanged();
547 return this;
548 }
549
557 public Builder clearNumBranches() {
558 bitField0_ = (bitField0_ & ~0x00000001);
559 numBranches_ = 0L;
560 onChanged();
561 return this;
562 }
563
564 private long numFailures_ ;
573 @java.lang.Override
574 public long getNumFailures() {
575 return numFailures_;
576 }
577
586 public Builder setNumFailures(long value) {
587
588 numFailures_ = value;
589 bitField0_ |= 0x00000002;
590 onChanged();
591 return this;
592 }
593
601 public Builder clearNumFailures() {
602 bitField0_ = (bitField0_ & ~0x00000002);
603 numFailures_ = 0L;
604 onChanged();
605 return this;
606 }
607
608 private long numSolutions_ ;
617 @java.lang.Override
618 public long getNumSolutions() {
619 return numSolutions_;
620 }
621
630 public Builder setNumSolutions(long value) {
631
632 numSolutions_ = value;
633 bitField0_ |= 0x00000004;
634 onChanged();
635 return this;
636 }
637
645 public Builder clearNumSolutions() {
646 bitField0_ = (bitField0_ & ~0x00000004);
647 numSolutions_ = 0L;
648 onChanged();
649 return this;
650 }
651
652 private long bytesUsed_ ;
661 @java.lang.Override
662 public long getBytesUsed() {
663 return bytesUsed_;
664 }
665
674 public Builder setBytesUsed(long value) {
675
676 bytesUsed_ = value;
677 bitField0_ |= 0x00000008;
678 onChanged();
679 return this;
680 }
681
689 public Builder clearBytesUsed() {
690 bitField0_ = (bitField0_ & ~0x00000008);
691 bytesUsed_ = 0L;
692 onChanged();
693 return this;
694 }
695
696 private double durationSeconds_ ;
705 @java.lang.Override
706 public double getDurationSeconds() {
707 return durationSeconds_;
708 }
709
718 public Builder setDurationSeconds(double value) {
719
720 durationSeconds_ = value;
721 bitField0_ |= 0x00000010;
722 onChanged();
723 return this;
724 }
725
733 public Builder clearDurationSeconds() {
734 bitField0_ = (bitField0_ & ~0x00000010);
735 durationSeconds_ = 0D;
736 onChanged();
737 return this;
738 }
739
740 // @@protoc_insertion_point(builder_scope:operations_research.ConstraintSolverStatistics)
741 }
742
743 // @@protoc_insertion_point(class_scope:operations_research.ConstraintSolverStatistics)
744 private static final com.google.ortools.constraintsolver.ConstraintSolverStatistics DEFAULT_INSTANCE;
745 static {
746 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.ConstraintSolverStatistics();
747 }
748
750 return DEFAULT_INSTANCE;
751 }
752
753 private static final com.google.protobuf.Parser<ConstraintSolverStatistics>
754 PARSER = new com.google.protobuf.AbstractParser<ConstraintSolverStatistics>() {
755 @java.lang.Override
756 public ConstraintSolverStatistics parsePartialFrom(
757 com.google.protobuf.CodedInputStream input,
758 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
759 throws com.google.protobuf.InvalidProtocolBufferException {
760 Builder builder = newBuilder();
761 try {
762 builder.mergeFrom(input, extensionRegistry);
763 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
764 throw e.setUnfinishedMessage(builder.buildPartial());
765 } catch (com.google.protobuf.UninitializedMessageException e) {
766 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
767 } catch (java.io.IOException e) {
768 throw new com.google.protobuf.InvalidProtocolBufferException(e)
769 .setUnfinishedMessage(builder.buildPartial());
770 }
771 return builder.buildPartial();
772 }
773 };
774
775 public static com.google.protobuf.Parser<ConstraintSolverStatistics> parser() {
776 return PARSER;
777 }
778
779 @java.lang.Override
780 public com.google.protobuf.Parser<ConstraintSolverStatistics> getParserForType() {
781 return PARSER;
782 }
783
784 @java.lang.Override
788
789}
790
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.constraintsolver.ConstraintSolverStatistics getDefaultInstanceForType()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.ConstraintSolverStatistics buildPartial()
Builder mergeFrom(com.google.ortools.constraintsolver.ConstraintSolverStatistics other)
com.google.ortools.constraintsolver.ConstraintSolverStatistics build()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(java.nio.ByteBuffer data)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(byte[] data)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.protobuf.Parser< ConstraintSolverStatistics > getParserForType()
com.google.ortools.constraintsolver.ConstraintSolverStatistics getDefaultInstanceForType()
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseDelimitedFrom(java.io.InputStream input)
static Builder newBuilder(com.google.ortools.constraintsolver.ConstraintSolverStatistics prototype)
static com.google.protobuf.Parser< ConstraintSolverStatistics > parser()
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.ConstraintSolverStatistics getDefaultInstance()