Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
PerturbationStrategy.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
15@com.google.protobuf.Generated
16public final class PerturbationStrategy extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.PerturbationStrategy)
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 PerturbationStrategy.class.getName());
29 }
30 // Use PerturbationStrategy.newBuilder() to construct.
31 private PerturbationStrategy(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private PerturbationStrategy() {
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_PerturbationStrategy_descriptor;
40 }
41
42 @java.lang.Override
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_PerturbationStrategy_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.constraintsolver.PerturbationStrategy.class, com.google.ortools.constraintsolver.PerturbationStrategy.Builder.class);
48 }
49
53 public enum Value
54 implements com.google.protobuf.ProtocolMessageEnum {
72 ;
73
74 static {
75 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
76 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
77 /* major= */ 4,
78 /* minor= */ 31,
79 /* patch= */ 1,
80 /* suffix= */ "",
81 Value.class.getName());
82 }
90 public static final int UNSET_VALUE = 0;
98 public static final int RUIN_AND_RECREATE_VALUE = 1;
99
100
101 public final int getNumber() {
102 if (this == UNRECOGNIZED) {
103 throw new java.lang.IllegalArgumentException(
104 "Can't get the number of an unknown enum value.");
105 }
106 return value;
107 }
108
114 @java.lang.Deprecated
115 public static Value valueOf(int value) {
116 return forNumber(value);
117 }
118
123 public static Value forNumber(int value) {
124 switch (value) {
125 case 0: return UNSET;
126 case 1: return RUIN_AND_RECREATE;
127 default: return null;
128 }
129 }
130
131 public static com.google.protobuf.Internal.EnumLiteMap<Value>
133 return internalValueMap;
134 }
135 private static final com.google.protobuf.Internal.EnumLiteMap<
136 Value> internalValueMap =
137 new com.google.protobuf.Internal.EnumLiteMap<Value>() {
138 public Value findValueByNumber(int number) {
139 return Value.forNumber(number);
140 }
141 };
142
143 public final com.google.protobuf.Descriptors.EnumValueDescriptor
145 if (this == UNRECOGNIZED) {
146 throw new java.lang.IllegalStateException(
147 "Can't get the descriptor of an unrecognized enum value.");
148 }
149 return getDescriptor().getValues().get(ordinal());
150 }
151 public final com.google.protobuf.Descriptors.EnumDescriptor
153 return getDescriptor();
154 }
155 public static com.google.protobuf.Descriptors.EnumDescriptor
157 return com.google.ortools.constraintsolver.PerturbationStrategy.getDescriptor().getEnumTypes().get(0);
158 }
159
160 private static final Value[] VALUES = values();
161
162 public static Value valueOf(
163 com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
164 if (desc.getType() != getDescriptor()) {
165 throw new java.lang.IllegalArgumentException(
166 "EnumValueDescriptor is not for this type.");
167 }
168 if (desc.getIndex() == -1) {
169 return UNRECOGNIZED;
170 }
171 return VALUES[desc.getIndex()];
172 }
173
174 private final int value;
175
176 private Value(int value) {
177 this.value = value;
178 }
179
180 // @@protoc_insertion_point(enum_scope:operations_research.PerturbationStrategy.Value)
181 }
182
183 private byte memoizedIsInitialized = -1;
184 @java.lang.Override
185 public final boolean isInitialized() {
186 byte isInitialized = memoizedIsInitialized;
187 if (isInitialized == 1) return true;
188 if (isInitialized == 0) return false;
189
190 memoizedIsInitialized = 1;
191 return true;
192 }
193
194 @java.lang.Override
195 public void writeTo(com.google.protobuf.CodedOutputStream output)
196 throws java.io.IOException {
197 getUnknownFields().writeTo(output);
198 }
199
200 @java.lang.Override
201 public int getSerializedSize() {
202 int size = memoizedSize;
203 if (size != -1) return size;
204
205 size = 0;
206 size += getUnknownFields().getSerializedSize();
207 memoizedSize = size;
208 return size;
209 }
210
211 @java.lang.Override
212 public boolean equals(final java.lang.Object obj) {
213 if (obj == this) {
214 return true;
215 }
216 if (!(obj instanceof com.google.ortools.constraintsolver.PerturbationStrategy)) {
217 return super.equals(obj);
218 }
219 com.google.ortools.constraintsolver.PerturbationStrategy other = (com.google.ortools.constraintsolver.PerturbationStrategy) obj;
220
221 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
222 return true;
223 }
224
225 @java.lang.Override
226 public int hashCode() {
227 if (memoizedHashCode != 0) {
228 return memoizedHashCode;
229 }
230 int hash = 41;
231 hash = (19 * hash) + getDescriptor().hashCode();
232 hash = (29 * hash) + getUnknownFields().hashCode();
233 memoizedHashCode = hash;
234 return hash;
235 }
236
238 java.nio.ByteBuffer data)
239 throws com.google.protobuf.InvalidProtocolBufferException {
240 return PARSER.parseFrom(data);
241 }
243 java.nio.ByteBuffer data,
244 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
245 throws com.google.protobuf.InvalidProtocolBufferException {
246 return PARSER.parseFrom(data, extensionRegistry);
247 }
249 com.google.protobuf.ByteString data)
250 throws com.google.protobuf.InvalidProtocolBufferException {
251 return PARSER.parseFrom(data);
252 }
254 com.google.protobuf.ByteString data,
255 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
256 throws com.google.protobuf.InvalidProtocolBufferException {
257 return PARSER.parseFrom(data, extensionRegistry);
258 }
260 throws com.google.protobuf.InvalidProtocolBufferException {
261 return PARSER.parseFrom(data);
262 }
264 byte[] data,
265 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
266 throws com.google.protobuf.InvalidProtocolBufferException {
267 return PARSER.parseFrom(data, extensionRegistry);
268 }
270 throws java.io.IOException {
271 return com.google.protobuf.GeneratedMessage
272 .parseWithIOException(PARSER, input);
273 }
275 java.io.InputStream input,
276 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
277 throws java.io.IOException {
278 return com.google.protobuf.GeneratedMessage
279 .parseWithIOException(PARSER, input, extensionRegistry);
280 }
281
283 throws java.io.IOException {
284 return com.google.protobuf.GeneratedMessage
285 .parseDelimitedWithIOException(PARSER, input);
286 }
287
289 java.io.InputStream input,
290 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
291 throws java.io.IOException {
292 return com.google.protobuf.GeneratedMessage
293 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
294 }
296 com.google.protobuf.CodedInputStream input)
297 throws java.io.IOException {
298 return com.google.protobuf.GeneratedMessage
299 .parseWithIOException(PARSER, input);
300 }
302 com.google.protobuf.CodedInputStream input,
303 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
304 throws java.io.IOException {
305 return com.google.protobuf.GeneratedMessage
306 .parseWithIOException(PARSER, input, extensionRegistry);
307 }
308
309 @java.lang.Override
310 public Builder newBuilderForType() { return newBuilder(); }
311 public static Builder newBuilder() {
312 return DEFAULT_INSTANCE.toBuilder();
313 }
314 public static Builder newBuilder(com.google.ortools.constraintsolver.PerturbationStrategy prototype) {
315 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
316 }
317 @java.lang.Override
319 return this == DEFAULT_INSTANCE
320 ? new Builder() : new Builder().mergeFrom(this);
321 }
322
323 @java.lang.Override
325 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
326 Builder builder = new Builder(parent);
327 return builder;
328 }
329
336 public static final class Builder extends
337 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
338 // @@protoc_insertion_point(builder_implements:operations_research.PerturbationStrategy)
340 public static final com.google.protobuf.Descriptors.Descriptor
342 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_PerturbationStrategy_descriptor;
343 }
344
345 @java.lang.Override
346 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
348 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_PerturbationStrategy_fieldAccessorTable
349 .ensureFieldAccessorsInitialized(
350 com.google.ortools.constraintsolver.PerturbationStrategy.class, com.google.ortools.constraintsolver.PerturbationStrategy.Builder.class);
351 }
352
353 // Construct using com.google.ortools.constraintsolver.PerturbationStrategy.newBuilder()
354 private Builder() {
355
356 }
357
358 private Builder(
359 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
360 super(parent);
361
362 }
363 @java.lang.Override
364 public Builder clear() {
365 super.clear();
366 return this;
367 }
368
369 @java.lang.Override
370 public com.google.protobuf.Descriptors.Descriptor
372 return com.google.ortools.constraintsolver.RoutingIls.internal_static_operations_research_PerturbationStrategy_descriptor;
373 }
374
375 @java.lang.Override
377 return com.google.ortools.constraintsolver.PerturbationStrategy.getDefaultInstance();
378 }
379
380 @java.lang.Override
383 if (!result.isInitialized()) {
384 throw newUninitializedMessageException(result);
385 }
386 return result;
387 }
388
389 @java.lang.Override
391 com.google.ortools.constraintsolver.PerturbationStrategy result = new com.google.ortools.constraintsolver.PerturbationStrategy(this);
392 onBuilt();
393 return result;
394 }
395
396 @java.lang.Override
397 public Builder mergeFrom(com.google.protobuf.Message other) {
398 if (other instanceof com.google.ortools.constraintsolver.PerturbationStrategy) {
399 return mergeFrom((com.google.ortools.constraintsolver.PerturbationStrategy)other);
400 } else {
401 super.mergeFrom(other);
402 return this;
403 }
404 }
405
406 public Builder mergeFrom(com.google.ortools.constraintsolver.PerturbationStrategy other) {
407 if (other == com.google.ortools.constraintsolver.PerturbationStrategy.getDefaultInstance()) return this;
408 this.mergeUnknownFields(other.getUnknownFields());
409 onChanged();
410 return this;
411 }
412
413 @java.lang.Override
414 public final boolean isInitialized() {
415 return true;
416 }
417
418 @java.lang.Override
419 public Builder mergeFrom(
420 com.google.protobuf.CodedInputStream input,
421 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
422 throws java.io.IOException {
423 if (extensionRegistry == null) {
424 throw new java.lang.NullPointerException();
425 }
426 try {
427 boolean done = false;
428 while (!done) {
429 int tag = input.readTag();
430 switch (tag) {
431 case 0:
432 done = true;
433 break;
434 default: {
435 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
436 done = true; // was an endgroup tag
437 }
438 break;
439 } // default:
440 } // switch (tag)
441 } // while (!done)
442 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
443 throw e.unwrapIOException();
444 } finally {
445 onChanged();
446 } // finally
447 return this;
448 }
449
450 // @@protoc_insertion_point(builder_scope:operations_research.PerturbationStrategy)
451 }
452
453 // @@protoc_insertion_point(class_scope:operations_research.PerturbationStrategy)
454 private static final com.google.ortools.constraintsolver.PerturbationStrategy DEFAULT_INSTANCE;
455 static {
456 DEFAULT_INSTANCE = new com.google.ortools.constraintsolver.PerturbationStrategy();
457 }
458
460 return DEFAULT_INSTANCE;
461 }
462
463 private static final com.google.protobuf.Parser<PerturbationStrategy>
464 PARSER = new com.google.protobuf.AbstractParser<PerturbationStrategy>() {
465 @java.lang.Override
466 public PerturbationStrategy parsePartialFrom(
467 com.google.protobuf.CodedInputStream input,
468 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
469 throws com.google.protobuf.InvalidProtocolBufferException {
470 Builder builder = newBuilder();
471 try {
472 builder.mergeFrom(input, extensionRegistry);
473 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
474 throw e.setUnfinishedMessage(builder.buildPartial());
475 } catch (com.google.protobuf.UninitializedMessageException e) {
476 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
477 } catch (java.io.IOException e) {
478 throw new com.google.protobuf.InvalidProtocolBufferException(e)
479 .setUnfinishedMessage(builder.buildPartial());
480 }
481 return builder.buildPartial();
482 }
483 };
484
485 public static com.google.protobuf.Parser<PerturbationStrategy> parser() {
486 return PARSER;
487 }
488
489 @java.lang.Override
490 public com.google.protobuf.Parser<PerturbationStrategy> getParserForType() {
491 return PARSER;
492 }
493
494 @java.lang.Override
496 return DEFAULT_INSTANCE;
497 }
498
499}
500
Builder mergeFrom(com.google.ortools.constraintsolver.PerturbationStrategy other)
com.google.ortools.constraintsolver.PerturbationStrategy buildPartial()
com.google.ortools.constraintsolver.PerturbationStrategy getDefaultInstanceForType()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.ortools.constraintsolver.PerturbationStrategy build()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(byte[] data)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.constraintsolver.PerturbationStrategy prototype)
com.google.protobuf.Parser< PerturbationStrategy > getParserForType()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.constraintsolver.PerturbationStrategy parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.constraintsolver.PerturbationStrategy getDefaultInstance()
static com.google.protobuf.Parser< PerturbationStrategy > parser()
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.constraintsolver.PerturbationStrategy getDefaultInstanceForType()
void writeTo(com.google.protobuf.CodedOutputStream output)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.PerturbationStrategy parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(com.google.protobuf.ByteString data)
static com.google.ortools.constraintsolver.PerturbationStrategy parseFrom(java.io.InputStream input)
final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
static Value valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
static com.google.protobuf.Internal.EnumLiteMap< Value > internalGetValueMap()