6package com.google.ortools.constraintsolver;
15@com.google.protobuf.Generated
16public final class SavingsParameters
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,
31 private SavingsParameters(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private SavingsParameters() {
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_descriptor;
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.constraintsolver.SavingsParameters.class, com.google.ortools.constraintsolver.SavingsParameters.Builder.class);
51 private double neighborsRatio_ = 0D;
63 return neighborsRatio_;
67 private double maxMemoryUsageBytes_ = 0D;
83 return maxMemoryUsageBytes_;
87 private boolean addReverseArcs_ =
false;
99 return addReverseArcs_;
103 private double arcCoefficient_ = 0D;
118 return arcCoefficient_;
121 private byte memoizedIsInitialized = -1;
128 memoizedIsInitialized = 1;
133 public void writeTo(com.google.protobuf.CodedOutputStream output)
134 throws java.io.IOException {
135 if (java.lang.Double.doubleToRawLongBits(neighborsRatio_) != 0) {
136 output.writeDouble(1, neighborsRatio_);
138 if (java.lang.Double.doubleToRawLongBits(maxMemoryUsageBytes_) != 0) {
139 output.writeDouble(2, maxMemoryUsageBytes_);
141 if (addReverseArcs_ !=
false) {
142 output.writeBool(3, addReverseArcs_);
144 if (java.lang.Double.doubleToRawLongBits(arcCoefficient_) != 0) {
145 output.writeDouble(4, arcCoefficient_);
147 getUnknownFields().writeTo(output);
152 int size = memoizedSize;
153 if (size != -1)
return size;
156 if (java.lang.Double.doubleToRawLongBits(neighborsRatio_) != 0) {
157 size += com.google.protobuf.CodedOutputStream
158 .computeDoubleSize(1, neighborsRatio_);
160 if (java.lang.Double.doubleToRawLongBits(maxMemoryUsageBytes_) != 0) {
161 size += com.google.protobuf.CodedOutputStream
162 .computeDoubleSize(2, maxMemoryUsageBytes_);
164 if (addReverseArcs_ !=
false) {
165 size += com.google.protobuf.CodedOutputStream
166 .computeBoolSize(3, addReverseArcs_);
168 if (java.lang.Double.doubleToRawLongBits(arcCoefficient_) != 0) {
169 size += com.google.protobuf.CodedOutputStream
170 .computeDoubleSize(4, arcCoefficient_);
172 size += getUnknownFields().getSerializedSize();
178 public boolean equals(
final java.lang.Object obj) {
182 if (!(obj instanceof com.google.ortools.constraintsolver.SavingsParameters)) {
183 return super.equals(obj);
188 != java.lang.Double.doubleToLongBits(
191 != java.lang.Double.doubleToLongBits(
196 != java.lang.Double.doubleToLongBits(
198 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
204 if (memoizedHashCode != 0) {
205 return memoizedHashCode;
210 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
213 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
216 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
219 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
221 hash = (29 * hash) + getUnknownFields().hashCode();
222 memoizedHashCode = hash;
227 java.nio.ByteBuffer data)
228 throws com.google.protobuf.InvalidProtocolBufferException {
229 return PARSER.parseFrom(data);
232 java.nio.ByteBuffer data,
233 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
234 throws com.google.protobuf.InvalidProtocolBufferException {
235 return PARSER.parseFrom(data, extensionRegistry);
238 com.google.protobuf.ByteString data)
239 throws com.google.protobuf.InvalidProtocolBufferException {
240 return PARSER.parseFrom(data);
243 com.google.protobuf.ByteString data,
244 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
245 throws com.google.protobuf.InvalidProtocolBufferException {
246 return PARSER.parseFrom(data, extensionRegistry);
249 throws com.google.protobuf.InvalidProtocolBufferException {
250 return PARSER.parseFrom(data);
254 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
255 throws com.google.protobuf.InvalidProtocolBufferException {
256 return PARSER.parseFrom(data, extensionRegistry);
259 throws java.io.IOException {
260 return com.google.protobuf.GeneratedMessage
261 .parseWithIOException(PARSER, input);
264 java.io.InputStream input,
265 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
266 throws java.io.IOException {
267 return com.google.protobuf.GeneratedMessage
268 .parseWithIOException(PARSER, input, extensionRegistry);
272 throws java.io.IOException {
273 return com.google.protobuf.GeneratedMessage
274 .parseDelimitedWithIOException(PARSER, input);
278 java.io.InputStream input,
279 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
280 throws java.io.IOException {
281 return com.google.protobuf.GeneratedMessage
282 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
285 com.google.protobuf.CodedInputStream input)
286 throws java.io.IOException {
287 return com.google.protobuf.GeneratedMessage
288 .parseWithIOException(PARSER, input);
291 com.google.protobuf.CodedInputStream input,
292 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293 throws java.io.IOException {
294 return com.google.protobuf.GeneratedMessage
295 .parseWithIOException(PARSER, input, extensionRegistry);
301 return DEFAULT_INSTANCE.toBuilder();
303 public static Builder newBuilder(com.google.ortools.constraintsolver.SavingsParameters prototype) {
304 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
308 return this == DEFAULT_INSTANCE
314 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
325 public static final class Builder
extends
326 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
329 public static final com.google.protobuf.Descriptors.Descriptor
331 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_descriptor;
335 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
337 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_fieldAccessorTable
338 .ensureFieldAccessorsInitialized(
339 com.google.ortools.constraintsolver.SavingsParameters.class, com.google.ortools.constraintsolver.SavingsParameters.Builder.class);
348 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
356 neighborsRatio_ = 0D;
357 maxMemoryUsageBytes_ = 0D;
358 addReverseArcs_ =
false;
359 arcCoefficient_ = 0D;
364 public com.google.protobuf.Descriptors.Descriptor
366 return com.google.ortools.constraintsolver.RoutingHeuristicParameters.internal_static_operations_research_SavingsParameters_descriptor;
371 return com.google.ortools.constraintsolver.SavingsParameters.getDefaultInstance();
378 throw newUninitializedMessageException(result);
386 if (bitField0_ != 0) { buildPartial0(result); }
391 private void buildPartial0(com.google.ortools.constraintsolver.SavingsParameters result) {
392 int from_bitField0_ = bitField0_;
393 if (((from_bitField0_ & 0x00000001) != 0)) {
394 result.neighborsRatio_ = neighborsRatio_;
396 if (((from_bitField0_ & 0x00000002) != 0)) {
397 result.maxMemoryUsageBytes_ = maxMemoryUsageBytes_;
399 if (((from_bitField0_ & 0x00000004) != 0)) {
400 result.addReverseArcs_ = addReverseArcs_;
402 if (((from_bitField0_ & 0x00000008) != 0)) {
403 result.arcCoefficient_ = arcCoefficient_;
408 public Builder
mergeFrom(com.google.protobuf.Message other) {
409 if (other instanceof com.google.ortools.constraintsolver.SavingsParameters) {
410 return mergeFrom((com.google.ortools.constraintsolver.SavingsParameters)other);
412 super.mergeFrom(other);
417 public Builder
mergeFrom(com.google.ortools.constraintsolver.SavingsParameters other) {
418 if (other == com.google.ortools.constraintsolver.SavingsParameters.getDefaultInstance())
return this;
419 if (java.lang.Double.doubleToRawLongBits(other.getNeighborsRatio()) != 0) {
422 if (java.lang.Double.doubleToRawLongBits(other.getMaxMemoryUsageBytes()) != 0) {
425 if (other.getAddReverseArcs() !=
false) {
428 if (java.lang.Double.doubleToRawLongBits(other.getArcCoefficient()) != 0) {
431 this.mergeUnknownFields(other.getUnknownFields());
443 com.google.protobuf.CodedInputStream input,
444 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
445 throws java.io.IOException {
446 if (extensionRegistry ==
null) {
447 throw new java.lang.NullPointerException();
450 boolean done =
false;
452 int tag = input.readTag();
458 neighborsRatio_ = input.readDouble();
459 bitField0_ |= 0x00000001;
463 maxMemoryUsageBytes_ = input.readDouble();
464 bitField0_ |= 0x00000002;
468 addReverseArcs_ = input.readBool();
469 bitField0_ |= 0x00000004;
473 arcCoefficient_ = input.readDouble();
474 bitField0_ |= 0x00000008;
478 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
485 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
486 throw e.unwrapIOException();
492 private int bitField0_;
494 private double neighborsRatio_ ;
506 return neighborsRatio_;
520 neighborsRatio_ = value;
521 bitField0_ |= 0x00000001;
535 bitField0_ = (bitField0_ & ~0x00000001);
536 neighborsRatio_ = 0D;
541 private double maxMemoryUsageBytes_ ;
557 return maxMemoryUsageBytes_;
575 maxMemoryUsageBytes_ = value;
576 bitField0_ |= 0x00000002;
594 bitField0_ = (bitField0_ & ~0x00000002);
595 maxMemoryUsageBytes_ = 0D;
600 private boolean addReverseArcs_ ;
612 return addReverseArcs_;
626 addReverseArcs_ = value;
627 bitField0_ |= 0x00000004;
641 bitField0_ = (bitField0_ & ~0x00000004);
642 addReverseArcs_ =
false;
647 private double arcCoefficient_ ;
662 return arcCoefficient_;
679 arcCoefficient_ = value;
680 bitField0_ |= 0x00000008;
697 bitField0_ = (bitField0_ & ~0x00000008);
698 arcCoefficient_ = 0D;
709 DEFAULT_INSTANCE =
new com.google.ortools.constraintsolver.SavingsParameters();
713 return DEFAULT_INSTANCE;
720 com.google.protobuf.CodedInputStream input,
721 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
722 throws com.google.protobuf.InvalidProtocolBufferException {
725 builder.mergeFrom(input, extensionRegistry);
726 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
727 throw e.setUnfinishedMessage(builder.buildPartial());
728 }
catch (com.google.protobuf.UninitializedMessageException e) {
729 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
730 }
catch (java.io.IOException e) {
731 throw new com.google.protobuf.InvalidProtocolBufferException(e)
732 .setUnfinishedMessage(builder.buildPartial());
734 return builder.buildPartial();
738 public static com.google.protobuf.Parser<SavingsParameters>
parser() {
749 return DEFAULT_INSTANCE;