Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SetCover.pb.cs
Go to the documentation of this file.
1// <auto-generated>
2// Generated by the protocol buffer compiler. DO NOT EDIT!
3// source: ortools/algorithms/set_cover.proto
4// </auto-generated>
5#pragma warning disable 1591, 0612, 3021, 8981
6#region Designer generated code
7
8using pb = global::Google.Protobuf;
9using pbc = global::Google.Protobuf.Collections;
10using pbr = global::Google.Protobuf.Reflection;
11using scg = global::System.Collections.Generic;
13
15 public static partial class SetCoverReflection {
16
17 #region Descriptor
19 public static pbr::FileDescriptor Descriptor {
20 get { return descriptor; }
21 }
22 private static pbr::FileDescriptor descriptor;
23
24 static SetCoverReflection() {
25 byte[] descriptorData = global::System.Convert.FromBase64String(
26 string.Concat(
27 "CiJvcnRvb2xzL2FsZ29yaXRobXMvc2V0X2NvdmVyLnByb3RvEhNvcGVyYXRp",
28 "b25zX3Jlc2VhcmNoGhlvcnRvb2xzL3V0aWwvaW50MTI4LnByb3RvIugBCg1T",
29 "ZXRDb3ZlclByb3RvEjkKBnN1YnNldBgBIAMoCzIpLm9wZXJhdGlvbnNfcmVz",
30 "ZWFyY2guU2V0Q292ZXJQcm90by5TdWJzZXQSEQoEbmFtZRgCIAEoCUgAiAEB",
31 "EjUKC2ZpbmdlcnByaW50GAMgASgLMhsub3BlcmF0aW9uc19yZXNlYXJjaC5J",
32 "bnQxMjhIAYgBARo5CgZTdWJzZXQSEQoEY29zdBgBIAEoAUgAiAEBEhMKB2Vs",
33 "ZW1lbnQYAiADKAVCAhABQgcKBV9jb3N0QgcKBV9uYW1lQg4KDF9maW5nZXJw",
34 "cmludCLpAwoYU2V0Q292ZXJTb2x1dGlvblJlc3BvbnNlEkkKBnN0YXR1cxgB",
35 "IAEoDjI0Lm9wZXJhdGlvbnNfcmVzZWFyY2guU2V0Q292ZXJTb2x1dGlvblJl",
36 "c3BvbnNlLlN0YXR1c0gAiAEBEhgKC251bV9zdWJzZXRzGAIgASgFSAGIAQES",
37 "EgoGc3Vic2V0GAMgAygFQgIQARIRCgRjb3N0GAQgASgBSAKIAQESHQoQY29z",
38 "dF9sb3dlcl9ib3VuZBgFIAEoAUgDiAEBEjUKC2ZpbmdlcnByaW50GAYgASgL",
39 "Mhsub3BlcmF0aW9uc19yZXNlYXJjaC5JbnQxMjhIBIgBARI7ChFtb2RlbF9m",
40 "aW5nZXJwcmludBgHIAEoCzIbLm9wZXJhdGlvbnNfcmVzZWFyY2guSW50MTI4",
41 "SAWIAQEiTwoGU3RhdHVzEg0KCVVOREVGSU5FRBAAEgsKB09QVElNQUwQARIM",
42 "CghGRUFTSUJMRRACEg4KCklORkVBU0lCTEUQAxILCgdJTlZBTElEEARCCQoH",
43 "X3N0YXR1c0IOCgxfbnVtX3N1YnNldHNCBwoFX2Nvc3RCEwoRX2Nvc3RfbG93",
44 "ZXJfYm91bmRCDgoMX2ZpbmdlcnByaW50QhQKEl9tb2RlbF9maW5nZXJwcmlu",
45 "dEIhCh1jb20uZ29vZ2xlLm9ydG9vbHMuYWxnb3JpdGhtc1ABYgZwcm90bzM="));
46 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
47 new pbr::FileDescriptor[] { global::Google.OrTools.Util.Int128Reflection.Descriptor, },
48 new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
49 new pbr::GeneratedClrTypeInfo(typeof(global::OperationsResearch.SetCoverProto), global::OperationsResearch.SetCoverProto.Parser, new[]{ "Subset", "Name", "Fingerprint" }, new[]{ "Name", "Fingerprint" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::OperationsResearch.SetCoverProto.Types.Subset), global::OperationsResearch.SetCoverProto.Types.Subset.Parser, new[]{ "Cost", "Element" }, new[]{ "Cost" }, null, null, null)}),
50 new pbr::GeneratedClrTypeInfo(typeof(global::OperationsResearch.SetCoverSolutionResponse), global::OperationsResearch.SetCoverSolutionResponse.Parser, new[]{ "Status", "NumSubsets", "Subset", "Cost", "CostLowerBound", "Fingerprint", "ModelFingerprint" }, new[]{ "Status", "NumSubsets", "Cost", "CostLowerBound", "Fingerprint", "ModelFingerprint" }, new[]{ typeof(global::OperationsResearch.SetCoverSolutionResponse.Types.Status) }, null, null)
51 }));
52 }
53 #endregion
54
55 }
56 #region Messages
57 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
58 public sealed partial class SetCoverProto : pb::IMessage<SetCoverProto>
59 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
60 , pb::IBufferMessage
61 #endif
62 {
63 private static readonly pb::MessageParser<SetCoverProto> _parser = new pb::MessageParser<SetCoverProto>(() => new SetCoverProto());
64 private pb::UnknownFieldSet _unknownFields;
65 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
66 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
67 public static pb::MessageParser<SetCoverProto> Parser { get { return _parser; } }
68
69 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
70 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
71 public static pbr::MessageDescriptor Descriptor {
72 get { return global::OperationsResearch.SetCoverReflection.Descriptor.MessageTypes[0]; }
73 }
74
75 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
76 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
77 pbr::MessageDescriptor pb::IMessage.Descriptor {
78 get { return Descriptor; }
79 }
80
81 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
82 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
83 public SetCoverProto() {
84 OnConstruction();
85 }
86
87 partial void OnConstruction();
88
89 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
90 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
91 public SetCoverProto(SetCoverProto other) : this() {
92 subset_ = other.subset_.Clone();
93 name_ = other.name_;
94 fingerprint_ = other.fingerprint_ != null ? other.fingerprint_.Clone() : null;
95 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
96 }
97
98 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
99 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
101 return new SetCoverProto(this);
102 }
103
105 public const int SubsetFieldNumber = 1;
106 private static readonly pb::FieldCodec<global::OperationsResearch.SetCoverProto.Types.Subset> _repeated_subset_codec
107 = pb::FieldCodec.ForMessage(10, global::OperationsResearch.SetCoverProto.Types.Subset.Parser);
108 private readonly pbc::RepeatedField<global::OperationsResearch.SetCoverProto.Types.Subset> subset_ = new pbc::RepeatedField<global::OperationsResearch.SetCoverProto.Types.Subset>();
112 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
113 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
114 public pbc::RepeatedField<global::OperationsResearch.SetCoverProto.Types.Subset> Subset {
115 get { return subset_; }
116 }
117
119 public const int NameFieldNumber = 2;
120 private readonly static string NameDefaultValue = "";
121
122 private string name_;
126 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
127 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
128 public string Name {
129 get { return name_ ?? NameDefaultValue; }
130 set {
131 name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
132 }
133 }
135 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
136 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
137 public bool HasName {
138 get { return name_ != null; }
139 }
141 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
142 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
143 public void ClearName() {
144 name_ = null;
145 }
146
148 public const int FingerprintFieldNumber = 3;
149 private global::Google.OrTools.Util.Int128 fingerprint_;
153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
154 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
155 public global::Google.OrTools.Util.Int128 Fingerprint {
156 get { return fingerprint_; }
157 set {
158 fingerprint_ = value;
159 }
160 }
161
162 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
163 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
164 public override bool Equals(object other) {
165 return Equals(other as SetCoverProto);
166 }
167
168 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
169 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
170 public bool Equals(SetCoverProto other) {
171 if (ReferenceEquals(other, null)) {
172 return false;
173 }
174 if (ReferenceEquals(other, this)) {
175 return true;
176 }
177 if(!subset_.Equals(other.subset_)) return false;
178 if (Name != other.Name) return false;
179 if (!object.Equals(Fingerprint, other.Fingerprint)) return false;
180 return Equals(_unknownFields, other._unknownFields);
181 }
182
183 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
184 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
185 public override int GetHashCode() {
186 int hash = 1;
187 hash ^= subset_.GetHashCode();
188 if (HasName) hash ^= Name.GetHashCode();
189 if (fingerprint_ != null) hash ^= Fingerprint.GetHashCode();
190 if (_unknownFields != null) {
191 hash ^= _unknownFields.GetHashCode();
192 }
193 return hash;
194 }
195
196 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
197 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
198 public override string ToString() {
199 return pb::JsonFormatter.ToDiagnosticString(this);
200 }
201
202 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
203 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
204 public void WriteTo(pb::CodedOutputStream output) {
205 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
206 output.WriteRawMessage(this);
207 #else
208 subset_.WriteTo(output, _repeated_subset_codec);
209 if (HasName) {
210 output.WriteRawTag(18);
211 output.WriteString(Name);
212 }
213 if (fingerprint_ != null) {
214 output.WriteRawTag(26);
215 output.WriteMessage(Fingerprint);
216 }
217 if (_unknownFields != null) {
218 _unknownFields.WriteTo(output);
219 }
220 #endif
221 }
222
223 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
224 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
225 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
226 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
227 subset_.WriteTo(ref output, _repeated_subset_codec);
228 if (HasName) {
229 output.WriteRawTag(18);
230 output.WriteString(Name);
231 }
232 if (fingerprint_ != null) {
233 output.WriteRawTag(26);
234 output.WriteMessage(Fingerprint);
235 }
236 if (_unknownFields != null) {
237 _unknownFields.WriteTo(ref output);
238 }
239 }
240 #endif
241
242 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
243 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
244 public int CalculateSize() {
245 int size = 0;
246 size += subset_.CalculateSize(_repeated_subset_codec);
247 if (HasName) {
248 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
249 }
250 if (fingerprint_ != null) {
251 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fingerprint);
252 }
253 if (_unknownFields != null) {
254 size += _unknownFields.CalculateSize();
255 }
256 return size;
257 }
258
259 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
260 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
261 public void MergeFrom(SetCoverProto other) {
262 if (other == null) {
263 return;
264 }
265 subset_.Add(other.subset_);
266 if (other.HasName) {
267 Name = other.Name;
268 }
269 if (other.fingerprint_ != null) {
270 if (fingerprint_ == null) {
271 Fingerprint = new global::Google.OrTools.Util.Int128();
272 }
273 Fingerprint.MergeFrom(other.Fingerprint);
274 }
275 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
276 }
277
278 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
279 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
280 public void MergeFrom(pb::CodedInputStream input) {
281 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
282 input.ReadRawMessage(this);
283 #else
284 uint tag;
285 while ((tag = input.ReadTag()) != 0) {
286 switch(tag) {
287 default:
288 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
289 break;
290 case 10: {
291 subset_.AddEntriesFrom(input, _repeated_subset_codec);
292 break;
293 }
294 case 18: {
295 Name = input.ReadString();
296 break;
297 }
298 case 26: {
299 if (fingerprint_ == null) {
300 Fingerprint = new global::Google.OrTools.Util.Int128();
301 }
302 input.ReadMessage(Fingerprint);
303 break;
304 }
305 }
306 }
307 #endif
308 }
309
310 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
311 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
312 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
313 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
314 uint tag;
315 while ((tag = input.ReadTag()) != 0) {
316 switch(tag) {
317 default:
318 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
319 break;
320 case 10: {
321 subset_.AddEntriesFrom(ref input, _repeated_subset_codec);
322 break;
323 }
324 case 18: {
325 Name = input.ReadString();
326 break;
327 }
328 case 26: {
329 if (fingerprint_ == null) {
330 Fingerprint = new global::Google.OrTools.Util.Int128();
331 }
332 input.ReadMessage(Fingerprint);
333 break;
334 }
335 }
336 }
337 }
338 #endif
339
340 #region Nested types
342 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
343 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
344 public static partial class Types {
345 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
346 public sealed partial class Subset : pb::IMessage<Subset>
347 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
348 , pb::IBufferMessage
349 #endif
350 {
351 private static readonly pb::MessageParser<Subset> _parser = new pb::MessageParser<Subset>(() => new Subset());
352 private pb::UnknownFieldSet _unknownFields;
353 private int _hasBits0;
354 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
355 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
356 public static pb::MessageParser<Subset> Parser { get { return _parser; } }
357
358 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
359 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
360 public static pbr::MessageDescriptor Descriptor {
361 get { return global::OperationsResearch.SetCoverProto.Descriptor.NestedTypes[0]; }
362 }
363
364 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
365 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
366 pbr::MessageDescriptor pb::IMessage.Descriptor {
367 get { return Descriptor; }
368 }
369
370 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
371 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
372 public Subset() {
373 OnConstruction();
374 }
375
376 partial void OnConstruction();
377
378 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
379 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
380 public Subset(Subset other) : this() {
381 _hasBits0 = other._hasBits0;
382 cost_ = other.cost_;
383 element_ = other.element_.Clone();
384 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
385 }
386
387 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
388 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
389 public Subset Clone() {
390 return new Subset(this);
391 }
392
394 public const int CostFieldNumber = 1;
395 private readonly static double CostDefaultValue = 0D;
396
397 private double cost_;
401 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
402 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
403 public double Cost {
404 get { if ((_hasBits0 & 1) != 0) { return cost_; } else { return CostDefaultValue; } }
405 set {
406 _hasBits0 |= 1;
407 cost_ = value;
408 }
409 }
411 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
412 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
413 public bool HasCost {
414 get { return (_hasBits0 & 1) != 0; }
415 }
417 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
418 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
419 public void ClearCost() {
420 _hasBits0 &= ~1;
421 }
422
424 public const int ElementFieldNumber = 2;
425 private static readonly pb::FieldCodec<int> _repeated_element_codec
426 = pb::FieldCodec.ForInt32(18);
427 private readonly pbc::RepeatedField<int> element_ = new pbc::RepeatedField<int>();
431 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
432 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
433 public pbc::RepeatedField<int> Element {
434 get { return element_; }
435 }
436
437 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
438 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
439 public override bool Equals(object other) {
440 return Equals(other as Subset);
441 }
442
443 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
444 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
445 public bool Equals(Subset other) {
446 if (ReferenceEquals(other, null)) {
447 return false;
448 }
449 if (ReferenceEquals(other, this)) {
450 return true;
451 }
452 if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Cost, other.Cost)) return false;
453 if(!element_.Equals(other.element_)) return false;
454 return Equals(_unknownFields, other._unknownFields);
455 }
456
457 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
458 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
459 public override int GetHashCode() {
460 int hash = 1;
461 if (HasCost) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Cost);
462 hash ^= element_.GetHashCode();
463 if (_unknownFields != null) {
464 hash ^= _unknownFields.GetHashCode();
465 }
466 return hash;
467 }
468
469 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
470 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
471 public override string ToString() {
472 return pb::JsonFormatter.ToDiagnosticString(this);
473 }
474
475 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
476 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
477 public void WriteTo(pb::CodedOutputStream output) {
478 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
479 output.WriteRawMessage(this);
480 #else
481 if (HasCost) {
482 output.WriteRawTag(9);
483 output.WriteDouble(Cost);
484 }
485 element_.WriteTo(output, _repeated_element_codec);
486 if (_unknownFields != null) {
487 _unknownFields.WriteTo(output);
488 }
489 #endif
490 }
491
492 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
493 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
494 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
495 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
496 if (HasCost) {
497 output.WriteRawTag(9);
498 output.WriteDouble(Cost);
499 }
500 element_.WriteTo(ref output, _repeated_element_codec);
501 if (_unknownFields != null) {
502 _unknownFields.WriteTo(ref output);
503 }
504 }
505 #endif
506
507 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
508 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
509 public int CalculateSize() {
510 int size = 0;
511 if (HasCost) {
512 size += 1 + 8;
513 }
514 size += element_.CalculateSize(_repeated_element_codec);
515 if (_unknownFields != null) {
516 size += _unknownFields.CalculateSize();
517 }
518 return size;
519 }
520
521 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
522 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
523 public void MergeFrom(Subset other) {
524 if (other == null) {
525 return;
526 }
527 if (other.HasCost) {
528 Cost = other.Cost;
529 }
530 element_.Add(other.element_);
531 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
532 }
533
534 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
535 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
536 public void MergeFrom(pb::CodedInputStream input) {
537 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
538 input.ReadRawMessage(this);
539 #else
540 uint tag;
541 while ((tag = input.ReadTag()) != 0) {
542 switch(tag) {
543 default:
544 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
545 break;
546 case 9: {
547 Cost = input.ReadDouble();
548 break;
549 }
550 case 18:
551 case 16: {
552 element_.AddEntriesFrom(input, _repeated_element_codec);
553 break;
554 }
555 }
556 }
557 #endif
558 }
559
560 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
561 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
562 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
563 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
564 uint tag;
565 while ((tag = input.ReadTag()) != 0) {
566 switch(tag) {
567 default:
568 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
569 break;
570 case 9: {
571 Cost = input.ReadDouble();
572 break;
573 }
574 case 18:
575 case 16: {
576 element_.AddEntriesFrom(ref input, _repeated_element_codec);
577 break;
578 }
579 }
580 }
581 }
582 #endif
583
584 }
585
586 }
587 #endregion
588
589 }
590
591 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
592 public sealed partial class SetCoverSolutionResponse : pb::IMessage<SetCoverSolutionResponse>
593 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
594 , pb::IBufferMessage
595 #endif
596 {
597 private static readonly pb::MessageParser<SetCoverSolutionResponse> _parser = new pb::MessageParser<SetCoverSolutionResponse>(() => new SetCoverSolutionResponse());
598 private pb::UnknownFieldSet _unknownFields;
599 private int _hasBits0;
600 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
601 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
602 public static pb::MessageParser<SetCoverSolutionResponse> Parser { get { return _parser; } }
603
604 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
605 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
606 public static pbr::MessageDescriptor Descriptor {
607 get { return global::OperationsResearch.SetCoverReflection.Descriptor.MessageTypes[1]; }
608 }
609
610 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
611 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
612 pbr::MessageDescriptor pb::IMessage.Descriptor {
613 get { return Descriptor; }
614 }
615
616 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
617 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
619 OnConstruction();
620 }
621
622 partial void OnConstruction();
623
624 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
625 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
627 _hasBits0 = other._hasBits0;
628 status_ = other.status_;
629 numSubsets_ = other.numSubsets_;
630 subset_ = other.subset_.Clone();
631 cost_ = other.cost_;
632 costLowerBound_ = other.costLowerBound_;
633 fingerprint_ = other.fingerprint_ != null ? other.fingerprint_.Clone() : null;
634 modelFingerprint_ = other.modelFingerprint_ != null ? other.modelFingerprint_.Clone() : null;
635 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
636 }
637
638 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
639 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
641 return new SetCoverSolutionResponse(this);
642 }
643
645 public const int StatusFieldNumber = 1;
646 private readonly static global::OperationsResearch.SetCoverSolutionResponse.Types.Status StatusDefaultValue = global::OperationsResearch.SetCoverSolutionResponse.Types.Status.Undefined;
647
648 private global::OperationsResearch.SetCoverSolutionResponse.Types.Status status_;
652 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
653 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
654 public global::OperationsResearch.SetCoverSolutionResponse.Types.Status Status {
655 get { if ((_hasBits0 & 1) != 0) { return status_; } else { return StatusDefaultValue; } }
656 set {
657 _hasBits0 |= 1;
658 status_ = value;
659 }
660 }
662 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
663 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
664 public bool HasStatus {
665 get { return (_hasBits0 & 1) != 0; }
666 }
668 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
669 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
670 public void ClearStatus() {
671 _hasBits0 &= ~1;
672 }
673
675 public const int NumSubsetsFieldNumber = 2;
676 private readonly static int NumSubsetsDefaultValue = 0;
677
678 private int numSubsets_;
683 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
684 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
685 public int NumSubsets {
686 get { if ((_hasBits0 & 2) != 0) { return numSubsets_; } else { return NumSubsetsDefaultValue; } }
687 set {
688 _hasBits0 |= 2;
689 numSubsets_ = value;
690 }
691 }
693 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
694 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
695 public bool HasNumSubsets {
696 get { return (_hasBits0 & 2) != 0; }
697 }
699 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
700 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
701 public void ClearNumSubsets() {
702 _hasBits0 &= ~2;
703 }
704
706 public const int SubsetFieldNumber = 3;
707 private static readonly pb::FieldCodec<int> _repeated_subset_codec
708 = pb::FieldCodec.ForInt32(26);
709 private readonly pbc::RepeatedField<int> subset_ = new pbc::RepeatedField<int>();
713 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
714 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
715 public pbc::RepeatedField<int> Subset {
716 get { return subset_; }
717 }
718
720 public const int CostFieldNumber = 4;
721 private readonly static double CostDefaultValue = 0D;
722
723 private double cost_;
727 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
728 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
729 public double Cost {
730 get { if ((_hasBits0 & 4) != 0) { return cost_; } else { return CostDefaultValue; } }
731 set {
732 _hasBits0 |= 4;
733 cost_ = value;
734 }
735 }
737 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
738 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
739 public bool HasCost {
740 get { return (_hasBits0 & 4) != 0; }
741 }
743 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
744 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
745 public void ClearCost() {
746 _hasBits0 &= ~4;
747 }
748
750 public const int CostLowerBoundFieldNumber = 5;
751 private readonly static double CostLowerBoundDefaultValue = 0D;
752
753 private double costLowerBound_;
757 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
758 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
759 public double CostLowerBound {
760 get { if ((_hasBits0 & 8) != 0) { return costLowerBound_; } else { return CostLowerBoundDefaultValue; } }
761 set {
762 _hasBits0 |= 8;
763 costLowerBound_ = value;
764 }
765 }
767 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
768 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
769 public bool HasCostLowerBound {
770 get { return (_hasBits0 & 8) != 0; }
771 }
773 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
774 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
775 public void ClearCostLowerBound() {
776 _hasBits0 &= ~8;
777 }
778
780 public const int FingerprintFieldNumber = 6;
781 private global::Google.OrTools.Util.Int128 fingerprint_;
785 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
786 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
787 public global::Google.OrTools.Util.Int128 Fingerprint {
788 get { return fingerprint_; }
789 set {
790 fingerprint_ = value;
791 }
792 }
793
795 public const int ModelFingerprintFieldNumber = 7;
796 private global::Google.OrTools.Util.Int128 modelFingerprint_;
800 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
801 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
802 public global::Google.OrTools.Util.Int128 ModelFingerprint {
803 get { return modelFingerprint_; }
804 set {
805 modelFingerprint_ = value;
806 }
807 }
808
809 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
810 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
811 public override bool Equals(object other) {
812 return Equals(other as SetCoverSolutionResponse);
813 }
814
815 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
816 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
817 public bool Equals(SetCoverSolutionResponse other) {
818 if (ReferenceEquals(other, null)) {
819 return false;
820 }
821 if (ReferenceEquals(other, this)) {
822 return true;
823 }
824 if (Status != other.Status) return false;
825 if (NumSubsets != other.NumSubsets) return false;
826 if(!subset_.Equals(other.subset_)) return false;
827 if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Cost, other.Cost)) return false;
828 if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(CostLowerBound, other.CostLowerBound)) return false;
829 if (!object.Equals(Fingerprint, other.Fingerprint)) return false;
830 if (!object.Equals(ModelFingerprint, other.ModelFingerprint)) return false;
831 return Equals(_unknownFields, other._unknownFields);
832 }
833
834 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
835 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
836 public override int GetHashCode() {
837 int hash = 1;
838 if (HasStatus) hash ^= Status.GetHashCode();
839 if (HasNumSubsets) hash ^= NumSubsets.GetHashCode();
840 hash ^= subset_.GetHashCode();
841 if (HasCost) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Cost);
842 if (HasCostLowerBound) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(CostLowerBound);
843 if (fingerprint_ != null) hash ^= Fingerprint.GetHashCode();
844 if (modelFingerprint_ != null) hash ^= ModelFingerprint.GetHashCode();
845 if (_unknownFields != null) {
846 hash ^= _unknownFields.GetHashCode();
847 }
848 return hash;
849 }
850
851 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
852 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
853 public override string ToString() {
854 return pb::JsonFormatter.ToDiagnosticString(this);
855 }
856
857 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
858 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
859 public void WriteTo(pb::CodedOutputStream output) {
860 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
861 output.WriteRawMessage(this);
862 #else
863 if (HasStatus) {
864 output.WriteRawTag(8);
865 output.WriteEnum((int) Status);
866 }
867 if (HasNumSubsets) {
868 output.WriteRawTag(16);
869 output.WriteInt32(NumSubsets);
870 }
871 subset_.WriteTo(output, _repeated_subset_codec);
872 if (HasCost) {
873 output.WriteRawTag(33);
874 output.WriteDouble(Cost);
875 }
876 if (HasCostLowerBound) {
877 output.WriteRawTag(41);
878 output.WriteDouble(CostLowerBound);
879 }
880 if (fingerprint_ != null) {
881 output.WriteRawTag(50);
882 output.WriteMessage(Fingerprint);
883 }
884 if (modelFingerprint_ != null) {
885 output.WriteRawTag(58);
886 output.WriteMessage(ModelFingerprint);
887 }
888 if (_unknownFields != null) {
889 _unknownFields.WriteTo(output);
890 }
891 #endif
892 }
893
894 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
895 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
896 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
897 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
898 if (HasStatus) {
899 output.WriteRawTag(8);
900 output.WriteEnum((int) Status);
901 }
902 if (HasNumSubsets) {
903 output.WriteRawTag(16);
904 output.WriteInt32(NumSubsets);
905 }
906 subset_.WriteTo(ref output, _repeated_subset_codec);
907 if (HasCost) {
908 output.WriteRawTag(33);
909 output.WriteDouble(Cost);
910 }
911 if (HasCostLowerBound) {
912 output.WriteRawTag(41);
913 output.WriteDouble(CostLowerBound);
914 }
915 if (fingerprint_ != null) {
916 output.WriteRawTag(50);
917 output.WriteMessage(Fingerprint);
918 }
919 if (modelFingerprint_ != null) {
920 output.WriteRawTag(58);
921 output.WriteMessage(ModelFingerprint);
922 }
923 if (_unknownFields != null) {
924 _unknownFields.WriteTo(ref output);
925 }
926 }
927 #endif
928
929 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
930 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
931 public int CalculateSize() {
932 int size = 0;
933 if (HasStatus) {
934 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status);
935 }
936 if (HasNumSubsets) {
937 size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumSubsets);
938 }
939 size += subset_.CalculateSize(_repeated_subset_codec);
940 if (HasCost) {
941 size += 1 + 8;
942 }
943 if (HasCostLowerBound) {
944 size += 1 + 8;
945 }
946 if (fingerprint_ != null) {
947 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fingerprint);
948 }
949 if (modelFingerprint_ != null) {
950 size += 1 + pb::CodedOutputStream.ComputeMessageSize(ModelFingerprint);
951 }
952 if (_unknownFields != null) {
953 size += _unknownFields.CalculateSize();
954 }
955 return size;
956 }
957
958 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
959 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
961 if (other == null) {
962 return;
963 }
964 if (other.HasStatus) {
965 Status = other.Status;
966 }
967 if (other.HasNumSubsets) {
968 NumSubsets = other.NumSubsets;
969 }
970 subset_.Add(other.subset_);
971 if (other.HasCost) {
972 Cost = other.Cost;
973 }
974 if (other.HasCostLowerBound) {
975 CostLowerBound = other.CostLowerBound;
976 }
977 if (other.fingerprint_ != null) {
978 if (fingerprint_ == null) {
979 Fingerprint = new global::Google.OrTools.Util.Int128();
980 }
981 Fingerprint.MergeFrom(other.Fingerprint);
982 }
983 if (other.modelFingerprint_ != null) {
984 if (modelFingerprint_ == null) {
985 ModelFingerprint = new global::Google.OrTools.Util.Int128();
986 }
987 ModelFingerprint.MergeFrom(other.ModelFingerprint);
988 }
989 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
990 }
991
992 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
993 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
994 public void MergeFrom(pb::CodedInputStream input) {
995 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
996 input.ReadRawMessage(this);
997 #else
998 uint tag;
999 while ((tag = input.ReadTag()) != 0) {
1000 switch(tag) {
1001 default:
1002 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
1003 break;
1004 case 8: {
1005 Status = (global::OperationsResearch.SetCoverSolutionResponse.Types.Status) input.ReadEnum();
1006 break;
1007 }
1008 case 16: {
1009 NumSubsets = input.ReadInt32();
1010 break;
1011 }
1012 case 26:
1013 case 24: {
1014 subset_.AddEntriesFrom(input, _repeated_subset_codec);
1015 break;
1016 }
1017 case 33: {
1018 Cost = input.ReadDouble();
1019 break;
1020 }
1021 case 41: {
1022 CostLowerBound = input.ReadDouble();
1023 break;
1024 }
1025 case 50: {
1026 if (fingerprint_ == null) {
1027 Fingerprint = new global::Google.OrTools.Util.Int128();
1028 }
1029 input.ReadMessage(Fingerprint);
1030 break;
1031 }
1032 case 58: {
1033 if (modelFingerprint_ == null) {
1034 ModelFingerprint = new global::Google.OrTools.Util.Int128();
1035 }
1036 input.ReadMessage(ModelFingerprint);
1037 break;
1038 }
1039 }
1040 }
1041 #endif
1042 }
1043
1044 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
1045 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1046 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1047 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
1048 uint tag;
1049 while ((tag = input.ReadTag()) != 0) {
1050 switch(tag) {
1051 default:
1052 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
1053 break;
1054 case 8: {
1055 Status = (global::OperationsResearch.SetCoverSolutionResponse.Types.Status) input.ReadEnum();
1056 break;
1057 }
1058 case 16: {
1059 NumSubsets = input.ReadInt32();
1060 break;
1061 }
1062 case 26:
1063 case 24: {
1064 subset_.AddEntriesFrom(ref input, _repeated_subset_codec);
1065 break;
1066 }
1067 case 33: {
1068 Cost = input.ReadDouble();
1069 break;
1070 }
1071 case 41: {
1072 CostLowerBound = input.ReadDouble();
1073 break;
1074 }
1075 case 50: {
1076 if (fingerprint_ == null) {
1077 Fingerprint = new global::Google.OrTools.Util.Int128();
1078 }
1079 input.ReadMessage(Fingerprint);
1080 break;
1081 }
1082 case 58: {
1083 if (modelFingerprint_ == null) {
1084 ModelFingerprint = new global::Google.OrTools.Util.Int128();
1085 }
1086 input.ReadMessage(ModelFingerprint);
1087 break;
1088 }
1089 }
1090 }
1091 }
1092 #endif
1093
1094 #region Nested types
1096 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
1097 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
1098 public static partial class Types {
1102 public enum Status {
1106 [pbr::OriginalName("UNDEFINED")] Undefined = 0,
1110 [pbr::OriginalName("OPTIMAL")] Optimal = 1,
1115 [pbr::OriginalName("FEASIBLE")] Feasible = 2,
1119 [pbr::OriginalName("INFEASIBLE")] Infeasible = 3,
1123 [pbr::OriginalName("INVALID")] Invalid = 4,
1124 }
1125
1126 }
1127 #endregion
1128
1129 }
1130
1131 #endregion
1132
1133}
1134
1135#endregion Designer generated code
global::Google.Protobuf.Reflection pbr
global::System.Collections.Generic scg
global::Google.Protobuf.Collections pbc
Definition SetCover.pb.cs:9
global::Google.Protobuf pb
Definition SetCover.pb.cs:8
bool HasCost
Gets whether the "cost" field is set.
void WriteTo(pb::CodedOutputStream output)
static pb::MessageParser< Subset > Parser
void ClearCost()
Clears the value of the "cost" field.
double Cost
The cost for using the given subset.
void MergeFrom(pb::CodedInputStream input)
Container for nested types declared in the SetCoverProto message type.
string Name
A user-defined name for the model.
SetCoverProto(SetCoverProto other)
override bool Equals(object other)
void MergeFrom(SetCoverProto other)
bool Equals(SetCoverProto other)
void ClearName()
Clears the value of the "name" field.
void WriteTo(pb::CodedOutputStream output)
bool HasName
Gets whether the "name" field is set.
global::Google.OrTools.Util.Int128 Fingerprint
An automatically fingerprint for the model.
void MergeFrom(pb::CodedInputStream input)
Holder for reflection information generated from ortools/algorithms/set_cover.proto.
static pbr::FileDescriptor Descriptor
File descriptor for ortools/algorithms/set_cover.proto.
Container for nested types declared in the SetCoverSolutionResponse message type.
void WriteTo(pb::CodedOutputStream output)
void ClearNumSubsets()
Clears the value of the "num_subsets" field.
bool Equals(SetCoverSolutionResponse other)
bool HasStatus
Gets whether the "status" field is set.
void MergeFrom(SetCoverSolutionResponse other)
void MergeFrom(pb::CodedInputStream input)
double Cost
The cost of the solution, as computed by the algorithm.
double CostLowerBound
A lower bound of the solution, as computed by the algorithm.
bool HasCost
Gets whether the "cost" field is set.
void ClearCost()
Clears the value of the "cost" field.
global::OperationsResearch.SetCoverSolutionResponse.Types.Status Status
For future use.
int NumSubsets
The number of subsets that are selected in the solution. This is used to decompress their indices bel...
void ClearStatus()
Clears the value of the "status" field.
SetCoverSolutionResponse(SetCoverSolutionResponse other)
void ClearCostLowerBound()
Clears the value of the "cost_lower_bound" field.
global::Google.OrTools.Util.Int128 Fingerprint
An automatically fingerprint for the solution.
global::Google.OrTools.Util.Int128 ModelFingerprint
A reference to the model the solution applies to.
bool HasCostLowerBound
Gets whether the "cost_lower_bound" field is set.
bool HasNumSubsets
Gets whether the "num_subsets" field is set.