Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
RandomWalkRuinStrategy.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/routing_ils.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.constraintsolver;
7
20@com.google.protobuf.Generated
21public final class RandomWalkRuinStrategy extends
22 com.google.protobuf.GeneratedMessage implements
23 // @@protoc_insertion_point(message_implements:operations_research.RandomWalkRuinStrategy)
25private static final long serialVersionUID = 0L;
26 static {
27 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
28 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 /* major= */ 4,
30 /* minor= */ 31,
31 /* patch= */ 1,
32 /* suffix= */ "",
33 RandomWalkRuinStrategy.class.getName());
34 }
35 // Use RandomWalkRuinStrategy.newBuilder() to construct.
36 private RandomWalkRuinStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
37 super(builder);
38 }
39 private RandomWalkRuinStrategy() {
40 }
41
42 public static final com.google.protobuf.Descriptors.Descriptor
44 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RandomWalkRuinStrategy_descriptor;
45 }
46
47 @java.lang.Override
48 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
50 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RandomWalkRuinStrategy_fieldAccessorTable
51 .ensureFieldAccessorsInitialized(
52 com.google.ortools.constraintsolver.RandomWalkRuinStrategy.class, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder.class);
53 }
54
55 private int bitField0_;
56 public static final int NUM_REMOVED_VISITS_FIELD_NUMBER = 7;
57 private int numRemovedVisits_ = 0;
70 @java.lang.Override
71 public boolean hasNumRemovedVisits() {
72 return ((bitField0_ & 0x00000001) != 0);
73 }
74
86 @java.lang.Override
87 public int getNumRemovedVisits() {
88 return numRemovedVisits_;
89 }
90
91 private byte memoizedIsInitialized = -1;
92 @java.lang.Override
93 public final boolean isInitialized() {
94 byte isInitialized = memoizedIsInitialized;
95 if (isInitialized == 1) return true;
96 if (isInitialized == 0) return false;
97
98 memoizedIsInitialized = 1;
99 return true;
100 }
101
102 @java.lang.Override
103 public void writeTo(com.google.protobuf.CodedOutputStream output)
104 throws java.io.IOException {
105 if (((bitField0_ & 0x00000001) != 0)) {
106 output.writeUInt32(7, numRemovedVisits_);
107 }
108 getUnknownFields().writeTo(output);
109 }
110
111 @java.lang.Override
112 public int getSerializedSize() {
113 int size = memoizedSize;
114 if (size != -1) return size;
115
116 size = 0;
117 if (((bitField0_ & 0x00000001) != 0)) {
118 size += com.google.protobuf.CodedOutputStream
119 .computeUInt32Size(7, numRemovedVisits_);
120 }
121 size += getUnknownFields().getSerializedSize();
122 memoizedSize = size;
123 return size;
124 }
125
126 @java.lang.Override
127 public boolean equals(final java.lang.Object obj) {
128 if (obj == this) {
129 return true;
130 }
131 if (!(obj instanceof com.google.ortools.constraintsolver.RandomWalkRuinStrategy)) {
132 return super.equals(obj);
133 }
134 com.google.ortools.constraintsolver.RandomWalkRuinStrategy other = (com.google.ortools.constraintsolver.RandomWalkRuinStrategy) obj;
135
136 if (hasNumRemovedVisits() != other.hasNumRemovedVisits()) return false;
137 if (hasNumRemovedVisits()) {
139 != other.getNumRemovedVisits()) return false;
140 }
141 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
142 return true;
143 }
144
145 @java.lang.Override
146 public int hashCode() {
147 if (memoizedHashCode != 0) {
148 return memoizedHashCode;
149 }
150 int hash = 41;
151 hash = (19 * hash) + getDescriptor().hashCode();
152 if (hasNumRemovedVisits()) {
153 hash = (37 * hash) + NUM_REMOVED_VISITS_FIELD_NUMBER;
154 hash = (53 * hash) + getNumRemovedVisits();
155 }
156 hash = (29 * hash) + getUnknownFields().hashCode();
157 memoizedHashCode = hash;
158 return hash;
159 }
160
162 java.nio.ByteBuffer data)
163 throws com.google.protobuf.InvalidProtocolBufferException {
164 return PARSER.parseFrom(data);
165 }
167 java.nio.ByteBuffer data,
168 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
169 throws com.google.protobuf.InvalidProtocolBufferException {
170 return PARSER.parseFrom(data, extensionRegistry);
171 }
173 com.google.protobuf.ByteString data)
174 throws com.google.protobuf.InvalidProtocolBufferException {
175 return PARSER.parseFrom(data);
176 }
178 com.google.protobuf.ByteString data,
179 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
180 throws com.google.protobuf.InvalidProtocolBufferException {
181 return PARSER.parseFrom(data, extensionRegistry);
182 }
184 throws com.google.protobuf.InvalidProtocolBufferException {
185 return PARSER.parseFrom(data);
186 }
188 byte[] data,
189 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
190 throws com.google.protobuf.InvalidProtocolBufferException {
191 return PARSER.parseFrom(data, extensionRegistry);
192 }
194 throws java.io.IOException {
195 return com.google.protobuf.GeneratedMessage
196 .parseWithIOException(PARSER, input);
197 }
199 java.io.InputStream input,
200 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
201 throws java.io.IOException {
202 return com.google.protobuf.GeneratedMessage
203 .parseWithIOException(PARSER, input, extensionRegistry);
204 }
205
207 throws java.io.IOException {
208 return com.google.protobuf.GeneratedMessage
209 .parseDelimitedWithIOException(PARSER, input);
210 }
211
213 java.io.InputStream input,
214 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
215 throws java.io.IOException {
216 return com.google.protobuf.GeneratedMessage
217 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
218 }
220 com.google.protobuf.CodedInputStream input)
221 throws java.io.IOException {
222 return com.google.protobuf.GeneratedMessage
223 .parseWithIOException(PARSER, input);
224 }
226 com.google.protobuf.CodedInputStream input,
227 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
228 throws java.io.IOException {
229 return com.google.protobuf.GeneratedMessage
230 .parseWithIOException(PARSER, input, extensionRegistry);
231 }
232
233 @java.lang.Override
234 public Builder newBuilderForType() { return newBuilder(); }
235 public static Builder newBuilder() {
236 return DEFAULT_INSTANCE.toBuilder();
237 }
238 public static Builder newBuilder(com.google.ortools.constraintsolver.RandomWalkRuinStrategy prototype) {
239 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
240 }
241 @java.lang.Override
243 return this == DEFAULT_INSTANCE
244 ? new Builder() : new Builder().mergeFrom(this);
245 }
246
247 @java.lang.Override
249 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
250 Builder builder = new Builder(parent);
251 return builder;
252 }
253
265 public static final class Builder extends
266 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
267 // @@protoc_insertion_point(builder_implements:operations_research.RandomWalkRuinStrategy)
269 public static final com.google.protobuf.Descriptors.Descriptor
271 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RandomWalkRuinStrategy_descriptor;
272 }
273
274 @java.lang.Override
275 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
277 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RandomWalkRuinStrategy_fieldAccessorTable
278 .ensureFieldAccessorsInitialized(
279 com.google.ortools.constraintsolver.RandomWalkRuinStrategy.class, com.google.ortools.constraintsolver.RandomWalkRuinStrategy.Builder.class);
280 }
281
282 // Construct using com.google.ortools.constraintsolver.RandomWalkRuinStrategy.newBuilder()
283 private Builder() {
284
285 }
286
287 private Builder(
288 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
289 super(parent);
290
291 }
292 @java.lang.Override
293 public Builder clear() {
294 super.clear();
295 bitField0_ = 0;
296 numRemovedVisits_ = 0;
297 return this;
298 }
299
300 @java.lang.Override
301 public com.google.protobuf.Descriptors.Descriptor
303 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_RandomWalkRuinStrategy_descriptor;
304 }
305
306 @java.lang.Override
308 return com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance();
309 }
310
311 @java.lang.Override
314 if (!result.isInitialized()) {
315 throw newUninitializedMessageException(result);
316 }
317 return result;
318 }
319
320 @java.lang.Override
322 com.google.ortools.constraintsolver.RandomWalkRuinStrategy result = new com.google.ortools.constraintsolver.RandomWalkRuinStrategy(this);
323 if (bitField0_ != 0) { buildPartial0(result); }
324 onBuilt();
325 return result;
326 }
327
328 private void buildPartial0(com.google.ortools.constraintsolver.RandomWalkRuinStrategy result) {
329 int from_bitField0_ = bitField0_;
330 int to_bitField0_ = 0;
331 if (((from_bitField0_ & 0x00000001) != 0)) {
332 result.numRemovedVisits_ = numRemovedVisits_;
333 to_bitField0_ |= 0x00000001;
334 }
335 result.bitField0_ |= to_bitField0_;
336 }
337
338 @java.lang.Override
339 public Builder mergeFrom(com.google.protobuf.Message other) {
340 if (other instanceof com.google.ortools.constraintsolver.RandomWalkRuinStrategy) {
341 return mergeFrom((com.google.ortools.constraintsolver.RandomWalkRuinStrategy)other);
342 } else {
343 super.mergeFrom(other);
344 return this;
345 }
346 }
347
348 public Builder mergeFrom(com.google.ortools.constraintsolver.RandomWalkRuinStrategy other) {
349 if (other == com.google.ortools.constraintsolver.RandomWalkRuinStrategy.getDefaultInstance()) return this;
350 if (other.hasNumRemovedVisits()) {
351 setNumRemovedVisits(other.getNumRemovedVisits());
352 }
353 this.mergeUnknownFields(other.getUnknownFields());
354 onChanged();
355 return this;
356 }
357
358 @java.lang.Override
359 public final boolean isInitialized() {
360 return true;
361 }
362
363 @java.lang.Override
364 public Builder mergeFrom(
365 com.google.protobuf.CodedInputStream input,
366 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
367 throws java.io.IOException {
368 if (extensionRegistry == null) {
369 throw new java.lang.NullPointerException();
370 }
371 try {
372 boolean done = false;
373 while (!done) {
374 int tag = input.readTag();
375 switch (tag) {
376 case 0:
377 done = true;
378 break;
379 case 56: {
380 numRemovedVisits_ = input.readUInt32();
381 bitField0_ |= 0x00000001;
382 break;
383 } // case 56
384 default: {
385 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
386 done = true; // was an endgroup tag
387 }
388 break;
389 } // default:
390 } // switch (tag)
391 } // while (!done)
392 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
393 throw e.unwrapIOException();
394 } finally {
395 onChanged();
396 } // finally
397 return this;
398 }
399 private int bitField0_;
400
401 private int numRemovedVisits_ ;
414 @java.lang.Override
415 public boolean hasNumRemovedVisits() {
416 return ((bitField0_ & 0x00000001) != 0);
417 }
418
430 @java.lang.Override
431 public int getNumRemovedVisits() {
432 return numRemovedVisits_;
433 }
434
447 public Builder setNumRemovedVisits(int value) {
448
449 numRemovedVisits_ = value;
450 bitField0_ |= 0x00000001;
451 onChanged();
452 return this;
453 }
454
466 public Builder clearNumRemovedVisits() {
467 bitField0_ = (bitField0_ & ~0x00000001);
468 numRemovedVisits_ = 0;
469 onChanged();
470 return this;
471 }
472
473 // @@protoc_insertion_point(builder_scope:operations_research.RandomWalkRuinStrategy)
474 }
475
476 // @@protoc_insertion_point(class_scope:operations_research.RandomWalkRuinStrategy)
477 private static final com.google.ortools.constraintsolver.RandomWalkRuinStrategy DEFAULT_INSTANCE;
478 static {
479 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.RandomWalkRuinStrategy();
480 }
481
483 return DEFAULT_INSTANCE;
484 }
485
486 private static final com.google.protobuf.Parser<RandomWalkRuinStrategy>
487 PARSER = new com.google.protobuf.AbstractParser<RandomWalkRuinStrategy>() {
488 @java.lang.Override
489 public RandomWalkRuinStrategy parsePartialFrom(
490 com.google.protobuf.CodedInputStream input,
491 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
492 throws com.google.protobuf.InvalidProtocolBufferException {
493 Builder builder = newBuilder();
494 try {
495 builder.mergeFrom(input, extensionRegistry);
496 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
497 throw e.setUnfinishedMessage(builder.buildPartial());
498 } catch (com.google.protobuf.UninitializedMessageException e) {
499 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
500 } catch (java.io.IOException e) {
501 throw new com.google.protobuf.InvalidProtocolBufferException(e)
502 .setUnfinishedMessage(builder.buildPartial());
503 }
504 return builder.buildPartial();
505 }
506 };
507
508 public static com.google.protobuf.Parser<RandomWalkRuinStrategy> parser() {
509 return PARSER;
510 }
511
512 @java.lang.Override
513 public com.google.protobuf.Parser<RandomWalkRuinStrategy> getParserForType() {
514 return PARSER;
515 }
516
517 @java.lang.Override
521
522}
523
Builder mergeFrom(com.google.ortools.constraintsolver.RandomWalkRuinStrategy other)
com.google.ortools.constraintsolver.RandomWalkRuinStrategy build()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.ortools.constraintsolver.RandomWalkRuinStrategy buildPartial()
com.google.ortools.constraintsolver.RandomWalkRuinStrategy getDefaultInstanceForType()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser< RandomWalkRuinStrategy > parser()
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.RandomWalkRuinStrategy getDefaultInstanceForType()
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseDelimitedFrom(java.io.InputStream input)
static Builder newBuilder(com.google.ortools.constraintsolver.RandomWalkRuinStrategy prototype)
com.google.protobuf.Parser< RandomWalkRuinStrategy > getParserForType()
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(com.google.protobuf.ByteString data)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(byte[] data)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy getDefaultInstance()
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.RandomWalkRuinStrategy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)