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