6package com.google.ortools.constraintsolver;
15@com.google.protobuf.Generated
16public final class GlobalCheapestInsertionParameters
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 "GlobalCheapestInsertionParameters");
31 private GlobalCheapestInsertionParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private GlobalCheapestInsertionParameters() {
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_GlobalCheapestInsertionParameters_descriptor;
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_GlobalCheapestInsertionParameters_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters.class, com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters.Builder.class);
51 private double farthestSeedsRatio_ = 0D;
63 return farthestSeedsRatio_;
67 private double neighborsRatio_ = 0D;
89 return neighborsRatio_;
93 private int minNeighbors_ = 0;
100 return minNeighbors_;
104 private boolean useNeighborsRatioForInitialization_ =
false;
119 return useNeighborsRatioForInitialization_;
123 private boolean addUnperformedEntries_ =
false;
138 return addUnperformedEntries_;
141 private byte memoizedIsInitialized = -1;
148 memoizedIsInitialized = 1;
153 public void writeTo(com.google.protobuf.CodedOutputStream output)
154 throws java.io.IOException {
155 if (java.lang.Double.doubleToRawLongBits(farthestSeedsRatio_) != 0) {
156 output.writeDouble(1, farthestSeedsRatio_);
158 if (java.lang.Double.doubleToRawLongBits(neighborsRatio_) != 0) {
159 output.writeDouble(2, neighborsRatio_);
161 if (minNeighbors_ != 0) {
162 output.writeInt32(3, minNeighbors_);
164 if (useNeighborsRatioForInitialization_ !=
false) {
165 output.writeBool(6, useNeighborsRatioForInitialization_);
167 if (addUnperformedEntries_ !=
false) {
168 output.writeBool(7, addUnperformedEntries_);
170 getUnknownFields().writeTo(output);
175 int size = memoizedSize;
176 if (size != -1)
return size;
179 if (java.lang.Double.doubleToRawLongBits(farthestSeedsRatio_) != 0) {
180 size += com.google.protobuf.CodedOutputStream
181 .computeDoubleSize(1, farthestSeedsRatio_);
183 if (java.lang.Double.doubleToRawLongBits(neighborsRatio_) != 0) {
184 size += com.google.protobuf.CodedOutputStream
185 .computeDoubleSize(2, neighborsRatio_);
187 if (minNeighbors_ != 0) {
188 size += com.google.protobuf.CodedOutputStream
189 .computeInt32Size(3, minNeighbors_);
191 if (useNeighborsRatioForInitialization_ !=
false) {
192 size += com.google.protobuf.CodedOutputStream
193 .computeBoolSize(6, useNeighborsRatioForInitialization_);
195 if (addUnperformedEntries_ !=
false) {
196 size += com.google.protobuf.CodedOutputStream
197 .computeBoolSize(7, addUnperformedEntries_);
199 size += getUnknownFields().getSerializedSize();
205 public boolean equals(
final java.lang.Object obj) {
209 if (!(obj instanceof com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters)) {
210 return super.equals(obj);
215 != java.lang.Double.doubleToLongBits(
218 != java.lang.Double.doubleToLongBits(
226 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
232 if (memoizedHashCode != 0) {
233 return memoizedHashCode;
238 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
241 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
246 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
249 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
251 hash = (29 * hash) + getUnknownFields().hashCode();
252 memoizedHashCode = hash;
257 java.nio.ByteBuffer data)
258 throws com.google.protobuf.InvalidProtocolBufferException {
259 return PARSER.parseFrom(data);
262 java.nio.ByteBuffer data,
263 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
264 throws com.google.protobuf.InvalidProtocolBufferException {
265 return PARSER.parseFrom(data, extensionRegistry);
268 com.google.protobuf.ByteString data)
269 throws com.google.protobuf.InvalidProtocolBufferException {
270 return PARSER.parseFrom(data);
273 com.google.protobuf.ByteString data,
274 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
275 throws com.google.protobuf.InvalidProtocolBufferException {
276 return PARSER.parseFrom(data, extensionRegistry);
279 throws com.google.protobuf.InvalidProtocolBufferException {
280 return PARSER.parseFrom(data);
284 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
285 throws com.google.protobuf.InvalidProtocolBufferException {
286 return PARSER.parseFrom(data, extensionRegistry);
289 throws java.io.IOException {
290 return com.google.protobuf.GeneratedMessage
291 .parseWithIOException(PARSER, input);
294 java.io.InputStream input,
295 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
296 throws java.io.IOException {
297 return com.google.protobuf.GeneratedMessage
298 .parseWithIOException(PARSER, input, extensionRegistry);
302 throws java.io.IOException {
303 return com.google.protobuf.GeneratedMessage
304 .parseDelimitedWithIOException(PARSER, input);
308 java.io.InputStream input,
309 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
310 throws java.io.IOException {
311 return com.google.protobuf.GeneratedMessage
312 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
315 com.google.protobuf.CodedInputStream input)
316 throws java.io.IOException {
317 return com.google.protobuf.GeneratedMessage
318 .parseWithIOException(PARSER, input);
321 com.google.protobuf.CodedInputStream input,
322 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
323 throws java.io.IOException {
324 return com.google.protobuf.GeneratedMessage
325 .parseWithIOException(PARSER, input, extensionRegistry);
331 return DEFAULT_INSTANCE.toBuilder();
333 public static Builder newBuilder(com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters prototype) {
334 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
338 return this == DEFAULT_INSTANCE
344 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
355 public static final class Builder
extends
356 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
359 public static final com.google.protobuf.Descriptors.Descriptor
361 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_GlobalCheapestInsertionParameters_descriptor;
365 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
367 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_GlobalCheapestInsertionParameters_fieldAccessorTable
368 .ensureFieldAccessorsInitialized(
369 com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters.class, com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters.Builder.class);
378 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
386 farthestSeedsRatio_ = 0D;
387 neighborsRatio_ = 0D;
389 useNeighborsRatioForInitialization_ =
false;
390 addUnperformedEntries_ =
false;
395 public com.google.protobuf.Descriptors.Descriptor
397 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_GlobalCheapestInsertionParameters_descriptor;
402 return com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters.getDefaultInstance();
409 throw newUninitializedMessageException(result);
417 if (bitField0_ != 0) { buildPartial0(result); }
422 private void buildPartial0(com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters result) {
423 int from_bitField0_ = bitField0_;
424 if (((from_bitField0_ & 0x00000001) != 0)) {
425 result.farthestSeedsRatio_ = farthestSeedsRatio_;
427 if (((from_bitField0_ & 0x00000002) != 0)) {
428 result.neighborsRatio_ = neighborsRatio_;
430 if (((from_bitField0_ & 0x00000004) != 0)) {
431 result.minNeighbors_ = minNeighbors_;
433 if (((from_bitField0_ & 0x00000008) != 0)) {
434 result.useNeighborsRatioForInitialization_ = useNeighborsRatioForInitialization_;
436 if (((from_bitField0_ & 0x00000010) != 0)) {
437 result.addUnperformedEntries_ = addUnperformedEntries_;
442 public Builder
mergeFrom(com.google.protobuf.Message other) {
443 if (other instanceof com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters) {
444 return mergeFrom((com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters)other);
446 super.mergeFrom(other);
451 public Builder
mergeFrom(com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters other) {
452 if (other == com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters.getDefaultInstance())
return this;
453 if (java.lang.Double.doubleToRawLongBits(other.getFarthestSeedsRatio()) != 0) {
456 if (java.lang.Double.doubleToRawLongBits(other.getNeighborsRatio()) != 0) {
459 if (other.getMinNeighbors() != 0) {
462 if (other.getUseNeighborsRatioForInitialization() !=
false) {
465 if (other.getAddUnperformedEntries() !=
false) {
468 this.mergeUnknownFields(other.getUnknownFields());
480 com.google.protobuf.CodedInputStream input,
481 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
482 throws java.io.IOException {
483 if (extensionRegistry ==
null) {
484 throw new java.lang.NullPointerException();
487 boolean done =
false;
489 int tag = input.readTag();
495 farthestSeedsRatio_ = input.readDouble();
496 bitField0_ |= 0x00000001;
500 neighborsRatio_ = input.readDouble();
501 bitField0_ |= 0x00000002;
505 minNeighbors_ = input.readInt32();
506 bitField0_ |= 0x00000004;
510 useNeighborsRatioForInitialization_ = input.readBool();
511 bitField0_ |= 0x00000008;
515 addUnperformedEntries_ = input.readBool();
516 bitField0_ |= 0x00000010;
520 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
527 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
528 throw e.unwrapIOException();
534 private int bitField0_;
536 private double farthestSeedsRatio_ ;
548 return farthestSeedsRatio_;
562 farthestSeedsRatio_ = value;
563 bitField0_ |= 0x00000001;
577 bitField0_ = (bitField0_ & ~0x00000001);
578 farthestSeedsRatio_ = 0D;
583 private double neighborsRatio_ ;
605 return neighborsRatio_;
629 neighborsRatio_ = value;
630 bitField0_ |= 0x00000002;
654 bitField0_ = (bitField0_ & ~0x00000002);
655 neighborsRatio_ = 0D;
660 private int minNeighbors_ ;
667 return minNeighbors_;
676 minNeighbors_ = value;
677 bitField0_ |= 0x00000004;
686 bitField0_ = (bitField0_ & ~0x00000004);
692 private boolean useNeighborsRatioForInitialization_ ;
707 return useNeighborsRatioForInitialization_;
724 useNeighborsRatioForInitialization_ = value;
725 bitField0_ |= 0x00000008;
742 bitField0_ = (bitField0_ & ~0x00000008);
743 useNeighborsRatioForInitialization_ =
false;
748 private boolean addUnperformedEntries_ ;
763 return addUnperformedEntries_;
780 addUnperformedEntries_ = value;
781 bitField0_ |= 0x00000010;
798 bitField0_ = (bitField0_ & ~0x00000010);
799 addUnperformedEntries_ =
false;
810 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.GlobalCheapestInsertionParameters();
814 return DEFAULT_INSTANCE;
821 com.google.protobuf.CodedInputStream input,
822 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
823 throws com.google.protobuf.InvalidProtocolBufferException {
826 builder.mergeFrom(input, extensionRegistry);
827 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
828 throw e.setUnfinishedMessage(builder.buildPartial());
829 }
catch (com.google.protobuf.UninitializedMessageException e) {
830 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
831 }
catch (java.io.IOException e) {
832 throw new com.google.protobuf.InvalidProtocolBufferException(e)
833 .setUnfinishedMessage(builder.buildPartial());
835 return builder.buildPartial();
839 public static com.google.protobuf.Parser<GlobalCheapestInsertionParameters>
parser() {
850 return DEFAULT_INSTANCE;