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