Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
FlowProblem.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/graph/flow_problem.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 FlowProblemReflection {
16
17 #region Descriptor
19 public static pbr::FileDescriptor Descriptor {
20 get { return descriptor; }
21 }
22 private static pbr::FileDescriptor descriptor;
23
24 static FlowProblemReflection() {
25 byte[] descriptorData = global::System.Convert.FromBase64String(
26 string.Concat(
27 "CiBvcnRvb2xzL2dyYXBoL2Zsb3dfcHJvYmxlbS5wcm90bxITb3BlcmF0aW9u",
28 "c19yZXNlYXJjaCJVCgxGbG93QXJjUHJvdG8SDAoEdGFpbBgBIAEoAxIMCgRo",
29 "ZWFkGAIgASgDEhMKCGNhcGFjaXR5GAMgASgDOgExEhQKCXVuaXRfY29zdBgE",
30 "IAEoAzoBMCIuCg1GbG93Tm9kZVByb3RvEgoKAmlkGAEgASgDEhEKBnN1cHBs",
31 "eRgCIAEoAzoBMCKGAgoORmxvd01vZGVsUHJvdG8SMQoFbm9kZXMYASADKAsy",
32 "Ii5vcGVyYXRpb25zX3Jlc2VhcmNoLkZsb3dOb2RlUHJvdG8SLwoEYXJjcxgC",
33 "IAMoCzIhLm9wZXJhdGlvbnNfcmVzZWFyY2guRmxvd0FyY1Byb3RvEkUKDHBy",
34 "b2JsZW1fdHlwZRgDIAEoDjIvLm9wZXJhdGlvbnNfcmVzZWFyY2guRmxvd01v",
35 "ZGVsUHJvdG8uUHJvYmxlbVR5cGUiSQoLUHJvYmxlbVR5cGUSGQoVTElORUFS",
36 "X1NVTV9BU1NJR05NRU5UEAASDAoITUFYX0ZMT1cQARIRCg1NSU5fQ09TVF9G",
37 "TE9XEAJCMwoYY29tLmdvb2dsZS5vcnRvb2xzLmdyYXBoUAGqAhRHb29nbGUu",
38 "T3JUb29scy5HcmFwaA=="));
39 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
40 new pbr::FileDescriptor[] { },
41 new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
42 new pbr::GeneratedClrTypeInfo(typeof(global::Google.OrTools.Graph.FlowArcProto), global::Google.OrTools.Graph.FlowArcProto.Parser, new[]{ "Tail", "Head", "Capacity", "UnitCost" }, null, null, null, null),
43 new pbr::GeneratedClrTypeInfo(typeof(global::Google.OrTools.Graph.FlowNodeProto), global::Google.OrTools.Graph.FlowNodeProto.Parser, new[]{ "Id", "Supply" }, null, null, null, null),
44 new pbr::GeneratedClrTypeInfo(typeof(global::Google.OrTools.Graph.FlowModelProto), global::Google.OrTools.Graph.FlowModelProto.Parser, new[]{ "Nodes", "Arcs", "ProblemType" }, null, new[]{ typeof(global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType) }, null, null)
45 }));
46 }
47 #endregion
48
49 }
50 #region Messages
51 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
52 public sealed partial class FlowArcProto : pb::IMessage<FlowArcProto>
53 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
54 , pb::IBufferMessage
55 #endif
56 {
57 private static readonly pb::MessageParser<FlowArcProto> _parser = new pb::MessageParser<FlowArcProto>(() => new FlowArcProto());
58 private pb::UnknownFieldSet _unknownFields;
59 private int _hasBits0;
60 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
61 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
62 public static pb::MessageParser<FlowArcProto> Parser { get { return _parser; } }
63
64 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
65 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
66 public static pbr::MessageDescriptor Descriptor {
67 get { return global::Google.OrTools.Graph.FlowProblemReflection.Descriptor.MessageTypes[0]; }
68 }
69
70 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
71 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
72 pbr::MessageDescriptor pb::IMessage.Descriptor {
73 get { return Descriptor; }
74 }
75
76 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
77 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
78 public FlowArcProto() {
79 OnConstruction();
80 }
81
82 partial void OnConstruction();
83
84 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
85 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
86 public FlowArcProto(FlowArcProto other) : this() {
87 _hasBits0 = other._hasBits0;
88 tail_ = other.tail_;
89 head_ = other.head_;
90 capacity_ = other.capacity_;
91 unitCost_ = other.unitCost_;
92 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
93 }
94
95 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
96 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
98 return new FlowArcProto(this);
99 }
100
102 public const int TailFieldNumber = 1;
103 private readonly static long TailDefaultValue = 0L;
104
105 private long tail_;
110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
111 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
112 public long Tail {
113 get { if ((_hasBits0 & 1) != 0) { return tail_; } else { return TailDefaultValue; } }
114 set {
115 _hasBits0 |= 1;
116 tail_ = value;
117 }
118 }
120 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
121 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
122 public bool HasTail {
123 get { return (_hasBits0 & 1) != 0; }
124 }
126 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
127 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
128 public void ClearTail() {
129 _hasBits0 &= ~1;
130 }
131
133 public const int HeadFieldNumber = 2;
134 private readonly static long HeadDefaultValue = 0L;
135
136 private long head_;
137 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
138 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
139 public long Head {
140 get { if ((_hasBits0 & 2) != 0) { return head_; } else { return HeadDefaultValue; } }
141 set {
142 _hasBits0 |= 2;
143 head_ = value;
144 }
145 }
147 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
148 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
149 public bool HasHead {
150 get { return (_hasBits0 & 2) != 0; }
151 }
153 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
154 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
155 public void ClearHead() {
156 _hasBits0 &= ~2;
157 }
158
160 public const int CapacityFieldNumber = 3;
161 private readonly static long CapacityDefaultValue = 1L;
162
163 private long capacity_;
168 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
169 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
170 public long Capacity {
171 get { if ((_hasBits0 & 4) != 0) { return capacity_; } else { return CapacityDefaultValue; } }
172 set {
173 _hasBits0 |= 4;
174 capacity_ = value;
175 }
176 }
178 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
179 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
180 public bool HasCapacity {
181 get { return (_hasBits0 & 4) != 0; }
182 }
184 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
185 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
186 public void ClearCapacity() {
187 _hasBits0 &= ~4;
188 }
189
191 public const int UnitCostFieldNumber = 4;
192 private readonly static long UnitCostDefaultValue = 0L;
193
194 private long unitCost_;
199 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
200 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
201 public long UnitCost {
202 get { if ((_hasBits0 & 8) != 0) { return unitCost_; } else { return UnitCostDefaultValue; } }
203 set {
204 _hasBits0 |= 8;
205 unitCost_ = value;
206 }
207 }
209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
210 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
211 public bool HasUnitCost {
212 get { return (_hasBits0 & 8) != 0; }
213 }
215 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
216 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
217 public void ClearUnitCost() {
218 _hasBits0 &= ~8;
219 }
220
221 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
222 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
223 public override bool Equals(object other) {
224 return Equals(other as FlowArcProto);
225 }
226
227 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
228 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
229 public bool Equals(FlowArcProto other) {
230 if (ReferenceEquals(other, null)) {
231 return false;
232 }
233 if (ReferenceEquals(other, this)) {
234 return true;
235 }
236 if (Tail != other.Tail) return false;
237 if (Head != other.Head) return false;
238 if (Capacity != other.Capacity) return false;
239 if (UnitCost != other.UnitCost) return false;
240 return Equals(_unknownFields, other._unknownFields);
241 }
242
243 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
244 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
245 public override int GetHashCode() {
246 int hash = 1;
247 if (HasTail) hash ^= Tail.GetHashCode();
248 if (HasHead) hash ^= Head.GetHashCode();
249 if (HasCapacity) hash ^= Capacity.GetHashCode();
250 if (HasUnitCost) hash ^= UnitCost.GetHashCode();
251 if (_unknownFields != null) {
252 hash ^= _unknownFields.GetHashCode();
253 }
254 return hash;
255 }
256
257 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
258 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
259 public override string ToString() {
260 return pb::JsonFormatter.ToDiagnosticString(this);
261 }
262
263 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
264 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
265 public void WriteTo(pb::CodedOutputStream output) {
266 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
267 output.WriteRawMessage(this);
268 #else
269 if (HasTail) {
270 output.WriteRawTag(8);
271 output.WriteInt64(Tail);
272 }
273 if (HasHead) {
274 output.WriteRawTag(16);
275 output.WriteInt64(Head);
276 }
277 if (HasCapacity) {
278 output.WriteRawTag(24);
279 output.WriteInt64(Capacity);
280 }
281 if (HasUnitCost) {
282 output.WriteRawTag(32);
283 output.WriteInt64(UnitCost);
284 }
285 if (_unknownFields != null) {
286 _unknownFields.WriteTo(output);
287 }
288 #endif
289 }
290
291 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
292 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
293 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
294 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
295 if (HasTail) {
296 output.WriteRawTag(8);
297 output.WriteInt64(Tail);
298 }
299 if (HasHead) {
300 output.WriteRawTag(16);
301 output.WriteInt64(Head);
302 }
303 if (HasCapacity) {
304 output.WriteRawTag(24);
305 output.WriteInt64(Capacity);
306 }
307 if (HasUnitCost) {
308 output.WriteRawTag(32);
309 output.WriteInt64(UnitCost);
310 }
311 if (_unknownFields != null) {
312 _unknownFields.WriteTo(ref output);
313 }
314 }
315 #endif
316
317 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
318 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
319 public int CalculateSize() {
320 int size = 0;
321 if (HasTail) {
322 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Tail);
323 }
324 if (HasHead) {
325 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Head);
326 }
327 if (HasCapacity) {
328 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Capacity);
329 }
330 if (HasUnitCost) {
331 size += 1 + pb::CodedOutputStream.ComputeInt64Size(UnitCost);
332 }
333 if (_unknownFields != null) {
334 size += _unknownFields.CalculateSize();
335 }
336 return size;
337 }
338
339 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
340 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
341 public void MergeFrom(FlowArcProto other) {
342 if (other == null) {
343 return;
344 }
345 if (other.HasTail) {
346 Tail = other.Tail;
347 }
348 if (other.HasHead) {
349 Head = other.Head;
350 }
351 if (other.HasCapacity) {
352 Capacity = other.Capacity;
353 }
354 if (other.HasUnitCost) {
355 UnitCost = other.UnitCost;
356 }
357 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
358 }
359
360 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
361 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
362 public void MergeFrom(pb::CodedInputStream input) {
363 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
364 input.ReadRawMessage(this);
365 #else
366 uint tag;
367 while ((tag = input.ReadTag()) != 0) {
368 switch(tag) {
369 default:
370 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
371 break;
372 case 8: {
373 Tail = input.ReadInt64();
374 break;
375 }
376 case 16: {
377 Head = input.ReadInt64();
378 break;
379 }
380 case 24: {
381 Capacity = input.ReadInt64();
382 break;
383 }
384 case 32: {
385 UnitCost = input.ReadInt64();
386 break;
387 }
388 }
389 }
390 #endif
391 }
392
393 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
394 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
395 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
396 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
397 uint tag;
398 while ((tag = input.ReadTag()) != 0) {
399 switch(tag) {
400 default:
401 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
402 break;
403 case 8: {
404 Tail = input.ReadInt64();
405 break;
406 }
407 case 16: {
408 Head = input.ReadInt64();
409 break;
410 }
411 case 24: {
412 Capacity = input.ReadInt64();
413 break;
414 }
415 case 32: {
416 UnitCost = input.ReadInt64();
417 break;
418 }
419 }
420 }
421 }
422 #endif
423
424 }
425
426 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
427 public sealed partial class FlowNodeProto : pb::IMessage<FlowNodeProto>
428 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
429 , pb::IBufferMessage
430 #endif
431 {
432 private static readonly pb::MessageParser<FlowNodeProto> _parser = new pb::MessageParser<FlowNodeProto>(() => new FlowNodeProto());
433 private pb::UnknownFieldSet _unknownFields;
434 private int _hasBits0;
435 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
436 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
437 public static pb::MessageParser<FlowNodeProto> Parser { get { return _parser; } }
438
439 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
440 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
441 public static pbr::MessageDescriptor Descriptor {
442 get { return global::Google.OrTools.Graph.FlowProblemReflection.Descriptor.MessageTypes[1]; }
443 }
444
445 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
446 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
447 pbr::MessageDescriptor pb::IMessage.Descriptor {
448 get { return Descriptor; }
449 }
450
451 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
452 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
453 public FlowNodeProto() {
454 OnConstruction();
455 }
456
457 partial void OnConstruction();
458
459 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
460 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
461 public FlowNodeProto(FlowNodeProto other) : this() {
462 _hasBits0 = other._hasBits0;
463 id_ = other.id_;
464 supply_ = other.supply_;
465 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
466 }
467
468 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
469 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
471 return new FlowNodeProto(this);
472 }
473
475 public const int IdFieldNumber = 1;
476 private readonly static long IdDefaultValue = 0L;
477
478 private long id_;
484 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
485 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
486 public long Id {
487 get { if ((_hasBits0 & 1) != 0) { return id_; } else { return IdDefaultValue; } }
488 set {
489 _hasBits0 |= 1;
490 id_ = value;
491 }
492 }
494 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
495 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
496 public bool HasId {
497 get { return (_hasBits0 & 1) != 0; }
498 }
500 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
501 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
502 public void ClearId() {
503 _hasBits0 &= ~1;
504 }
505
507 public const int SupplyFieldNumber = 2;
508 private readonly static long SupplyDefaultValue = 0L;
509
510 private long supply_;
515 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
516 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
517 public long Supply {
518 get { if ((_hasBits0 & 2) != 0) { return supply_; } else { return SupplyDefaultValue; } }
519 set {
520 _hasBits0 |= 2;
521 supply_ = value;
522 }
523 }
525 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
526 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
527 public bool HasSupply {
528 get { return (_hasBits0 & 2) != 0; }
529 }
531 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
532 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
533 public void ClearSupply() {
534 _hasBits0 &= ~2;
535 }
536
537 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
538 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
539 public override bool Equals(object other) {
540 return Equals(other as FlowNodeProto);
541 }
542
543 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
544 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
545 public bool Equals(FlowNodeProto other) {
546 if (ReferenceEquals(other, null)) {
547 return false;
548 }
549 if (ReferenceEquals(other, this)) {
550 return true;
551 }
552 if (Id != other.Id) return false;
553 if (Supply != other.Supply) return false;
554 return Equals(_unknownFields, other._unknownFields);
555 }
556
557 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
558 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
559 public override int GetHashCode() {
560 int hash = 1;
561 if (HasId) hash ^= Id.GetHashCode();
562 if (HasSupply) hash ^= Supply.GetHashCode();
563 if (_unknownFields != null) {
564 hash ^= _unknownFields.GetHashCode();
565 }
566 return hash;
567 }
568
569 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
570 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
571 public override string ToString() {
572 return pb::JsonFormatter.ToDiagnosticString(this);
573 }
574
575 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
576 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
577 public void WriteTo(pb::CodedOutputStream output) {
578 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
579 output.WriteRawMessage(this);
580 #else
581 if (HasId) {
582 output.WriteRawTag(8);
583 output.WriteInt64(Id);
584 }
585 if (HasSupply) {
586 output.WriteRawTag(16);
587 output.WriteInt64(Supply);
588 }
589 if (_unknownFields != null) {
590 _unknownFields.WriteTo(output);
591 }
592 #endif
593 }
594
595 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
596 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
597 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
598 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
599 if (HasId) {
600 output.WriteRawTag(8);
601 output.WriteInt64(Id);
602 }
603 if (HasSupply) {
604 output.WriteRawTag(16);
605 output.WriteInt64(Supply);
606 }
607 if (_unknownFields != null) {
608 _unknownFields.WriteTo(ref output);
609 }
610 }
611 #endif
612
613 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
614 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
615 public int CalculateSize() {
616 int size = 0;
617 if (HasId) {
618 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id);
619 }
620 if (HasSupply) {
621 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Supply);
622 }
623 if (_unknownFields != null) {
624 size += _unknownFields.CalculateSize();
625 }
626 return size;
627 }
628
629 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
630 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
631 public void MergeFrom(FlowNodeProto other) {
632 if (other == null) {
633 return;
634 }
635 if (other.HasId) {
636 Id = other.Id;
637 }
638 if (other.HasSupply) {
639 Supply = other.Supply;
640 }
641 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
642 }
643
644 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
645 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
646 public void MergeFrom(pb::CodedInputStream input) {
647 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
648 input.ReadRawMessage(this);
649 #else
650 uint tag;
651 while ((tag = input.ReadTag()) != 0) {
652 switch(tag) {
653 default:
654 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
655 break;
656 case 8: {
657 Id = input.ReadInt64();
658 break;
659 }
660 case 16: {
661 Supply = input.ReadInt64();
662 break;
663 }
664 }
665 }
666 #endif
667 }
668
669 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
670 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
671 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
672 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
673 uint tag;
674 while ((tag = input.ReadTag()) != 0) {
675 switch(tag) {
676 default:
677 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
678 break;
679 case 8: {
680 Id = input.ReadInt64();
681 break;
682 }
683 case 16: {
684 Supply = input.ReadInt64();
685 break;
686 }
687 }
688 }
689 }
690 #endif
691
692 }
693
697 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
698 public sealed partial class FlowModelProto : pb::IMessage<FlowModelProto>
699 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
700 , pb::IBufferMessage
701 #endif
702 {
703 private static readonly pb::MessageParser<FlowModelProto> _parser = new pb::MessageParser<FlowModelProto>(() => new FlowModelProto());
704 private pb::UnknownFieldSet _unknownFields;
705 private int _hasBits0;
706 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
707 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
708 public static pb::MessageParser<FlowModelProto> Parser { get { return _parser; } }
709
710 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
711 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
712 public static pbr::MessageDescriptor Descriptor {
713 get { return global::Google.OrTools.Graph.FlowProblemReflection.Descriptor.MessageTypes[2]; }
714 }
715
716 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
717 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
718 pbr::MessageDescriptor pb::IMessage.Descriptor {
719 get { return Descriptor; }
720 }
721
722 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
723 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
724 public FlowModelProto() {
725 OnConstruction();
726 }
727
728 partial void OnConstruction();
729
730 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
731 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
732 public FlowModelProto(FlowModelProto other) : this() {
733 _hasBits0 = other._hasBits0;
734 nodes_ = other.nodes_.Clone();
735 arcs_ = other.arcs_.Clone();
736 problemType_ = other.problemType_;
737 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
738 }
739
740 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
741 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
743 return new FlowModelProto(this);
744 }
745
747 public const int NodesFieldNumber = 1;
748 private static readonly pb::FieldCodec<global::Google.OrTools.Graph.FlowNodeProto> _repeated_nodes_codec
749 = pb::FieldCodec.ForMessage(10, global::Google.OrTools.Graph.FlowNodeProto.Parser);
750 private readonly pbc::RepeatedField<global::Google.OrTools.Graph.FlowNodeProto> nodes_ = new pbc::RepeatedField<global::Google.OrTools.Graph.FlowNodeProto>();
751 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
752 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
753 public pbc::RepeatedField<global::Google.OrTools.Graph.FlowNodeProto> Nodes {
754 get { return nodes_; }
755 }
756
758 public const int ArcsFieldNumber = 2;
759 private static readonly pb::FieldCodec<global::Google.OrTools.Graph.FlowArcProto> _repeated_arcs_codec
760 = pb::FieldCodec.ForMessage(18, global::Google.OrTools.Graph.FlowArcProto.Parser);
761 private readonly pbc::RepeatedField<global::Google.OrTools.Graph.FlowArcProto> arcs_ = new pbc::RepeatedField<global::Google.OrTools.Graph.FlowArcProto>();
762 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
763 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
764 public pbc::RepeatedField<global::Google.OrTools.Graph.FlowArcProto> Arcs {
765 get { return arcs_; }
766 }
767
769 public const int ProblemTypeFieldNumber = 3;
770 private readonly static global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType ProblemTypeDefaultValue = global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType.LinearSumAssignment;
771
772 private global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType problemType_;
773 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
774 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
775 public global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType ProblemType {
776 get { if ((_hasBits0 & 1) != 0) { return problemType_; } else { return ProblemTypeDefaultValue; } }
777 set {
778 _hasBits0 |= 1;
779 problemType_ = value;
780 }
781 }
783 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
784 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
785 public bool HasProblemType {
786 get { return (_hasBits0 & 1) != 0; }
787 }
789 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
790 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
791 public void ClearProblemType() {
792 _hasBits0 &= ~1;
793 }
794
795 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
796 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
797 public override bool Equals(object other) {
798 return Equals(other as FlowModelProto);
799 }
800
801 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
802 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
803 public bool Equals(FlowModelProto other) {
804 if (ReferenceEquals(other, null)) {
805 return false;
806 }
807 if (ReferenceEquals(other, this)) {
808 return true;
809 }
810 if(!nodes_.Equals(other.nodes_)) return false;
811 if(!arcs_.Equals(other.arcs_)) return false;
812 if (ProblemType != other.ProblemType) return false;
813 return Equals(_unknownFields, other._unknownFields);
814 }
815
816 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
817 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
818 public override int GetHashCode() {
819 int hash = 1;
820 hash ^= nodes_.GetHashCode();
821 hash ^= arcs_.GetHashCode();
822 if (HasProblemType) hash ^= ProblemType.GetHashCode();
823 if (_unknownFields != null) {
824 hash ^= _unknownFields.GetHashCode();
825 }
826 return hash;
827 }
828
829 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
830 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
831 public override string ToString() {
832 return pb::JsonFormatter.ToDiagnosticString(this);
833 }
834
835 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
836 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
837 public void WriteTo(pb::CodedOutputStream output) {
838 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
839 output.WriteRawMessage(this);
840 #else
841 nodes_.WriteTo(output, _repeated_nodes_codec);
842 arcs_.WriteTo(output, _repeated_arcs_codec);
843 if (HasProblemType) {
844 output.WriteRawTag(24);
845 output.WriteEnum((int) ProblemType);
846 }
847 if (_unknownFields != null) {
848 _unknownFields.WriteTo(output);
849 }
850 #endif
851 }
852
853 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
854 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
855 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
856 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
857 nodes_.WriteTo(ref output, _repeated_nodes_codec);
858 arcs_.WriteTo(ref output, _repeated_arcs_codec);
859 if (HasProblemType) {
860 output.WriteRawTag(24);
861 output.WriteEnum((int) ProblemType);
862 }
863 if (_unknownFields != null) {
864 _unknownFields.WriteTo(ref output);
865 }
866 }
867 #endif
868
869 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
870 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
871 public int CalculateSize() {
872 int size = 0;
873 size += nodes_.CalculateSize(_repeated_nodes_codec);
874 size += arcs_.CalculateSize(_repeated_arcs_codec);
875 if (HasProblemType) {
876 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ProblemType);
877 }
878 if (_unknownFields != null) {
879 size += _unknownFields.CalculateSize();
880 }
881 return size;
882 }
883
884 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
885 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
886 public void MergeFrom(FlowModelProto other) {
887 if (other == null) {
888 return;
889 }
890 nodes_.Add(other.nodes_);
891 arcs_.Add(other.arcs_);
892 if (other.HasProblemType) {
893 ProblemType = other.ProblemType;
894 }
895 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
896 }
897
898 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
899 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
900 public void MergeFrom(pb::CodedInputStream input) {
901 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
902 input.ReadRawMessage(this);
903 #else
904 uint tag;
905 while ((tag = input.ReadTag()) != 0) {
906 switch(tag) {
907 default:
908 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
909 break;
910 case 10: {
911 nodes_.AddEntriesFrom(input, _repeated_nodes_codec);
912 break;
913 }
914 case 18: {
915 arcs_.AddEntriesFrom(input, _repeated_arcs_codec);
916 break;
917 }
918 case 24: {
919 ProblemType = (global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType) input.ReadEnum();
920 break;
921 }
922 }
923 }
924 #endif
925 }
926
927 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
928 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
929 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
930 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
931 uint tag;
932 while ((tag = input.ReadTag()) != 0) {
933 switch(tag) {
934 default:
935 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
936 break;
937 case 10: {
938 nodes_.AddEntriesFrom(ref input, _repeated_nodes_codec);
939 break;
940 }
941 case 18: {
942 arcs_.AddEntriesFrom(ref input, _repeated_arcs_codec);
943 break;
944 }
945 case 24: {
946 ProblemType = (global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType) input.ReadEnum();
947 break;
948 }
949 }
950 }
951 }
952 #endif
953
954 #region Nested types
956 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
957 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
958 public static partial class Types {
962 public enum ProblemType {
963 [pbr::OriginalName("LINEAR_SUM_ASSIGNMENT")] LinearSumAssignment = 0,
964 [pbr::OriginalName("MAX_FLOW")] MaxFlow = 1,
965 [pbr::OriginalName("MIN_COST_FLOW")] MinCostFlow = 2,
966 }
967
968 }
969 #endregion
970
971 }
972
973 #endregion
974
975}
976
977#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
const int HeadFieldNumber
Field number for the "head" field.
const int TailFieldNumber
Field number for the "tail" field.
long Tail
A directed arc goes from a tail node to a head node. Node ids must be non-negative (>= 0).
bool HasUnitCost
Gets whether the "unit_cost" field is set.
void ClearUnitCost()
Clears the value of the "unit_cost" field.
void MergeFrom(FlowArcProto other)
void MergeFrom(pb::CodedInputStream input)
void WriteTo(pb::CodedOutputStream output)
long Capacity
Capacity of the arc. Must be non-negative (>= 0). If the capacity is zero, it is equivalent to not in...
static pbr::MessageDescriptor Descriptor
const int CapacityFieldNumber
Field number for the "capacity" field.
static pb::MessageParser< FlowArcProto > Parser
void ClearCapacity()
Clears the value of the "capacity" field.
void ClearTail()
Clears the value of the "tail" field.
bool Equals(FlowArcProto other)
bool HasTail
Gets whether the "tail" field is set.
long UnitCost
Cost of this arc per unit of flow.
const int UnitCostFieldNumber
Field number for the "unit_cost" field.
override bool Equals(object other)
void ClearHead()
Clears the value of the "head" field.
bool HasHead
Gets whether the "head" field is set.
bool HasCapacity
Gets whether the "capacity" field is set.
Container for nested types declared in the FlowModelProto message type.
ProblemType
The type of problem to solve.
Holds a flow problem, see NodeProto and ArcProto for more details.
bool Equals(FlowModelProto other)
global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType ProblemType
void MergeFrom(pb::CodedInputStream input)
void WriteTo(pb::CodedOutputStream output)
bool HasProblemType
Gets whether the "problem_type" field is set.
void ClearProblemType()
Clears the value of the "problem_type" field.
void MergeFrom(FlowModelProto other)
override bool Equals(object other)
void WriteTo(pb::CodedOutputStream output)
override bool Equals(object other)
bool HasId
Gets whether the "id" field is set.
bool HasSupply
Gets whether the "supply" field is set.
long Id
The ids must be non-negative (>= 0). They should be dense for good performance. Note that it is not m...
void ClearSupply()
Clears the value of the "supply" field.
void MergeFrom(FlowNodeProto other)
long Supply
The supply can be positive or negative in which case it means demand. The sum of the supplies over al...
bool Equals(FlowNodeProto other)
void MergeFrom(pb::CodedInputStream input)
void ClearId()
Clears the value of the "id" field.
Holder for reflection information generated from ortools/graph/flow_problem.proto.
static pbr::FileDescriptor Descriptor
File descriptor for ortools/graph/flow_problem.proto.