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