Google OR-Tools v9.12
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 }
119
120 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
121 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
122 public bool HasTail {
123 get { return (_hasBits0 & 1) != 0; }
124 }
125
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 }
146
147 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
148 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
149 public bool HasHead {
150 get { return (_hasBits0 & 2) != 0; }
151 }
152
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 }
177
178 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
179 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
180 public bool HasCapacity {
181 get { return (_hasBits0 & 4) != 0; }
182 }
183
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 }
208
209 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
210 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
211 public bool HasUnitCost {
212 get { return (_hasBits0 & 8) != 0; }
213 }
214
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 if ((tag & 7) == 4) {
369 // Abort on any end group tag.
370 return;
371 }
372 switch(tag) {
373 default:
374 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
375 break;
376 case 8: {
377 Tail = input.ReadInt64();
378 break;
379 }
380 case 16: {
381 Head = input.ReadInt64();
382 break;
383 }
384 case 24: {
385 Capacity = input.ReadInt64();
386 break;
387 }
388 case 32: {
389 UnitCost = input.ReadInt64();
390 break;
391 }
392 }
393 }
394 #endif
395 }
396
397 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
398 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
399 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
400 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
401 uint tag;
402 while ((tag = input.ReadTag()) != 0) {
403 if ((tag & 7) == 4) {
404 // Abort on any end group tag.
405 return;
406 }
407 switch(tag) {
408 default:
409 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
410 break;
411 case 8: {
412 Tail = input.ReadInt64();
413 break;
414 }
415 case 16: {
416 Head = input.ReadInt64();
417 break;
418 }
419 case 24: {
420 Capacity = input.ReadInt64();
421 break;
422 }
423 case 32: {
424 UnitCost = input.ReadInt64();
425 break;
426 }
427 }
428 }
429 }
430 #endif
431
432 }
433
434 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
435 public sealed partial class FlowNodeProto : pb::IMessage<FlowNodeProto>
436 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
437 , pb::IBufferMessage
438 #endif
439 {
440 private static readonly pb::MessageParser<FlowNodeProto> _parser = new pb::MessageParser<FlowNodeProto>(() => new FlowNodeProto());
441 private pb::UnknownFieldSet _unknownFields;
442 private int _hasBits0;
443 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
444 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
445 public static pb::MessageParser<FlowNodeProto> Parser { get { return _parser; } }
446
447 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
448 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
449 public static pbr::MessageDescriptor Descriptor {
450 get { return global::Google.OrTools.Graph.FlowProblemReflection.Descriptor.MessageTypes[1]; }
451 }
452
453 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
454 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
455 pbr::MessageDescriptor pb::IMessage.Descriptor {
456 get { return Descriptor; }
457 }
458
459 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
460 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
461 public FlowNodeProto() {
462 OnConstruction();
463 }
464
465 partial void OnConstruction();
466
467 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
468 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
469 public FlowNodeProto(FlowNodeProto other) : this() {
470 _hasBits0 = other._hasBits0;
471 id_ = other.id_;
472 supply_ = other.supply_;
473 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
474 }
475
476 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
477 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
479 return new FlowNodeProto(this);
480 }
481
483 public const int IdFieldNumber = 1;
484 private readonly static long IdDefaultValue = 0L;
485
486 private long id_;
492 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
493 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
494 public long Id {
495 get { if ((_hasBits0 & 1) != 0) { return id_; } else { return IdDefaultValue; } }
496 set {
497 _hasBits0 |= 1;
498 id_ = value;
499 }
500 }
501
502 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
503 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
504 public bool HasId {
505 get { return (_hasBits0 & 1) != 0; }
506 }
507
508 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
509 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
510 public void ClearId() {
511 _hasBits0 &= ~1;
512 }
513
515 public const int SupplyFieldNumber = 2;
516 private readonly static long SupplyDefaultValue = 0L;
517
518 private long supply_;
523 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
524 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
525 public long Supply {
526 get { if ((_hasBits0 & 2) != 0) { return supply_; } else { return SupplyDefaultValue; } }
527 set {
528 _hasBits0 |= 2;
529 supply_ = value;
530 }
531 }
532
533 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
534 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
535 public bool HasSupply {
536 get { return (_hasBits0 & 2) != 0; }
537 }
538
539 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
540 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
541 public void ClearSupply() {
542 _hasBits0 &= ~2;
543 }
544
545 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
546 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
547 public override bool Equals(object other) {
548 return Equals(other as FlowNodeProto);
549 }
550
551 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
552 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
553 public bool Equals(FlowNodeProto other) {
554 if (ReferenceEquals(other, null)) {
555 return false;
556 }
557 if (ReferenceEquals(other, this)) {
558 return true;
559 }
560 if (Id != other.Id) return false;
561 if (Supply != other.Supply) return false;
562 return Equals(_unknownFields, other._unknownFields);
563 }
564
565 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
566 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
567 public override int GetHashCode() {
568 int hash = 1;
569 if (HasId) hash ^= Id.GetHashCode();
570 if (HasSupply) hash ^= Supply.GetHashCode();
571 if (_unknownFields != null) {
572 hash ^= _unknownFields.GetHashCode();
573 }
574 return hash;
575 }
576
577 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
578 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
579 public override string ToString() {
580 return pb::JsonFormatter.ToDiagnosticString(this);
581 }
582
583 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
584 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
585 public void WriteTo(pb::CodedOutputStream output) {
586 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
587 output.WriteRawMessage(this);
588 #else
589 if (HasId) {
590 output.WriteRawTag(8);
591 output.WriteInt64(Id);
592 }
593 if (HasSupply) {
594 output.WriteRawTag(16);
595 output.WriteInt64(Supply);
596 }
597 if (_unknownFields != null) {
598 _unknownFields.WriteTo(output);
599 }
600 #endif
601 }
602
603 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
604 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
605 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
606 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
607 if (HasId) {
608 output.WriteRawTag(8);
609 output.WriteInt64(Id);
610 }
611 if (HasSupply) {
612 output.WriteRawTag(16);
613 output.WriteInt64(Supply);
614 }
615 if (_unknownFields != null) {
616 _unknownFields.WriteTo(ref output);
617 }
618 }
619 #endif
620
621 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
622 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
623 public int CalculateSize() {
624 int size = 0;
625 if (HasId) {
626 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id);
627 }
628 if (HasSupply) {
629 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Supply);
630 }
631 if (_unknownFields != null) {
632 size += _unknownFields.CalculateSize();
633 }
634 return size;
635 }
636
637 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
638 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
639 public void MergeFrom(FlowNodeProto other) {
640 if (other == null) {
641 return;
642 }
643 if (other.HasId) {
644 Id = other.Id;
645 }
646 if (other.HasSupply) {
647 Supply = other.Supply;
648 }
649 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
650 }
651
652 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
653 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
654 public void MergeFrom(pb::CodedInputStream input) {
655 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
656 input.ReadRawMessage(this);
657 #else
658 uint tag;
659 while ((tag = input.ReadTag()) != 0) {
660 if ((tag & 7) == 4) {
661 // Abort on any end group tag.
662 return;
663 }
664 switch(tag) {
665 default:
666 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
667 break;
668 case 8: {
669 Id = input.ReadInt64();
670 break;
671 }
672 case 16: {
673 Supply = input.ReadInt64();
674 break;
675 }
676 }
677 }
678 #endif
679 }
680
681 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
682 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
683 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
684 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
685 uint tag;
686 while ((tag = input.ReadTag()) != 0) {
687 if ((tag & 7) == 4) {
688 // Abort on any end group tag.
689 return;
690 }
691 switch(tag) {
692 default:
693 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
694 break;
695 case 8: {
696 Id = input.ReadInt64();
697 break;
698 }
699 case 16: {
700 Supply = input.ReadInt64();
701 break;
702 }
703 }
704 }
705 }
706 #endif
707
708 }
709
713 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
714 public sealed partial class FlowModelProto : pb::IMessage<FlowModelProto>
715 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
716 , pb::IBufferMessage
717 #endif
718 {
719 private static readonly pb::MessageParser<FlowModelProto> _parser = new pb::MessageParser<FlowModelProto>(() => new FlowModelProto());
720 private pb::UnknownFieldSet _unknownFields;
721 private int _hasBits0;
722 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
723 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
724 public static pb::MessageParser<FlowModelProto> Parser { get { return _parser; } }
725
726 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
727 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
728 public static pbr::MessageDescriptor Descriptor {
729 get { return global::Google.OrTools.Graph.FlowProblemReflection.Descriptor.MessageTypes[2]; }
730 }
731
732 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
733 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
734 pbr::MessageDescriptor pb::IMessage.Descriptor {
735 get { return Descriptor; }
736 }
737
738 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
739 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
740 public FlowModelProto() {
741 OnConstruction();
742 }
743
744 partial void OnConstruction();
745
746 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
747 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
748 public FlowModelProto(FlowModelProto other) : this() {
749 _hasBits0 = other._hasBits0;
750 nodes_ = other.nodes_.Clone();
751 arcs_ = other.arcs_.Clone();
752 problemType_ = other.problemType_;
753 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
754 }
755
756 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
757 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
759 return new FlowModelProto(this);
760 }
761
763 public const int NodesFieldNumber = 1;
764 private static readonly pb::FieldCodec<global::Google.OrTools.Graph.FlowNodeProto> _repeated_nodes_codec
765 = pb::FieldCodec.ForMessage(10, global::Google.OrTools.Graph.FlowNodeProto.Parser);
766 private readonly pbc::RepeatedField<global::Google.OrTools.Graph.FlowNodeProto> nodes_ = new pbc::RepeatedField<global::Google.OrTools.Graph.FlowNodeProto>();
767 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
768 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
769 public pbc::RepeatedField<global::Google.OrTools.Graph.FlowNodeProto> Nodes {
770 get { return nodes_; }
771 }
772
774 public const int ArcsFieldNumber = 2;
775 private static readonly pb::FieldCodec<global::Google.OrTools.Graph.FlowArcProto> _repeated_arcs_codec
776 = pb::FieldCodec.ForMessage(18, global::Google.OrTools.Graph.FlowArcProto.Parser);
777 private readonly pbc::RepeatedField<global::Google.OrTools.Graph.FlowArcProto> arcs_ = new pbc::RepeatedField<global::Google.OrTools.Graph.FlowArcProto>();
778 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
779 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
780 public pbc::RepeatedField<global::Google.OrTools.Graph.FlowArcProto> Arcs {
781 get { return arcs_; }
782 }
783
785 public const int ProblemTypeFieldNumber = 3;
786 private readonly static global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType ProblemTypeDefaultValue = global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType.LinearSumAssignment;
787
788 private global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType problemType_;
789 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
790 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
792 get { if ((_hasBits0 & 1) != 0) { return problemType_; } else { return ProblemTypeDefaultValue; } }
793 set {
794 _hasBits0 |= 1;
795 problemType_ = value;
796 }
797 }
798
799 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
800 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
801 public bool HasProblemType {
802 get { return (_hasBits0 & 1) != 0; }
803 }
804
805 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
806 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
807 public void ClearProblemType() {
808 _hasBits0 &= ~1;
809 }
810
811 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
812 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
813 public override bool Equals(object other) {
814 return Equals(other as FlowModelProto);
815 }
816
817 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
818 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
819 public bool Equals(FlowModelProto other) {
820 if (ReferenceEquals(other, null)) {
821 return false;
822 }
823 if (ReferenceEquals(other, this)) {
824 return true;
825 }
826 if(!nodes_.Equals(other.nodes_)) return false;
827 if(!arcs_.Equals(other.arcs_)) return false;
828 if (ProblemType != other.ProblemType) return false;
829 return Equals(_unknownFields, other._unknownFields);
830 }
831
832 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
833 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
834 public override int GetHashCode() {
835 int hash = 1;
836 hash ^= nodes_.GetHashCode();
837 hash ^= arcs_.GetHashCode();
838 if (HasProblemType) hash ^= ProblemType.GetHashCode();
839 if (_unknownFields != null) {
840 hash ^= _unknownFields.GetHashCode();
841 }
842 return hash;
843 }
844
845 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
846 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
847 public override string ToString() {
848 return pb::JsonFormatter.ToDiagnosticString(this);
849 }
850
851 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
852 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
853 public void WriteTo(pb::CodedOutputStream output) {
854 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
855 output.WriteRawMessage(this);
856 #else
857 nodes_.WriteTo(output, _repeated_nodes_codec);
858 arcs_.WriteTo(output, _repeated_arcs_codec);
859 if (HasProblemType) {
860 output.WriteRawTag(24);
861 output.WriteEnum((int) ProblemType);
862 }
863 if (_unknownFields != null) {
864 _unknownFields.WriteTo(output);
865 }
866 #endif
867 }
868
869 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
870 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
871 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
872 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
873 nodes_.WriteTo(ref output, _repeated_nodes_codec);
874 arcs_.WriteTo(ref output, _repeated_arcs_codec);
875 if (HasProblemType) {
876 output.WriteRawTag(24);
877 output.WriteEnum((int) ProblemType);
878 }
879 if (_unknownFields != null) {
880 _unknownFields.WriteTo(ref output);
881 }
882 }
883 #endif
884
885 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
886 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
887 public int CalculateSize() {
888 int size = 0;
889 size += nodes_.CalculateSize(_repeated_nodes_codec);
890 size += arcs_.CalculateSize(_repeated_arcs_codec);
891 if (HasProblemType) {
892 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ProblemType);
893 }
894 if (_unknownFields != null) {
895 size += _unknownFields.CalculateSize();
896 }
897 return size;
898 }
899
900 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
901 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
902 public void MergeFrom(FlowModelProto other) {
903 if (other == null) {
904 return;
905 }
906 nodes_.Add(other.nodes_);
907 arcs_.Add(other.arcs_);
908 if (other.HasProblemType) {
909 ProblemType = other.ProblemType;
910 }
911 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
912 }
913
914 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
915 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
916 public void MergeFrom(pb::CodedInputStream input) {
917 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
918 input.ReadRawMessage(this);
919 #else
920 uint tag;
921 while ((tag = input.ReadTag()) != 0) {
922 if ((tag & 7) == 4) {
923 // Abort on any end group tag.
924 return;
925 }
926 switch(tag) {
927 default:
928 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
929 break;
930 case 10: {
931 nodes_.AddEntriesFrom(input, _repeated_nodes_codec);
932 break;
933 }
934 case 18: {
935 arcs_.AddEntriesFrom(input, _repeated_arcs_codec);
936 break;
937 }
938 case 24: {
939 ProblemType = (global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType) input.ReadEnum();
940 break;
941 }
942 }
943 }
944 #endif
945 }
946
947 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
948 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
949 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
950 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
951 uint tag;
952 while ((tag = input.ReadTag()) != 0) {
953 if ((tag & 7) == 4) {
954 // Abort on any end group tag.
955 return;
956 }
957 switch(tag) {
958 default:
959 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
960 break;
961 case 10: {
962 nodes_.AddEntriesFrom(ref input, _repeated_nodes_codec);
963 break;
964 }
965 case 18: {
966 arcs_.AddEntriesFrom(ref input, _repeated_arcs_codec);
967 break;
968 }
969 case 24: {
970 ProblemType = (global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType) input.ReadEnum();
971 break;
972 }
973 }
974 }
975 }
976 #endif
977
978 #region Nested types
980 [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
981 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
982 public static partial class Types {
986 public enum ProblemType {
987 [pbr::OriginalName("LINEAR_SUM_ASSIGNMENT")] LinearSumAssignment = 0,
988 [pbr::OriginalName("MAX_FLOW")] MaxFlow = 1,
989 [pbr::OriginalName("MIN_COST_FLOW")] MinCostFlow = 2,
990 }
991
992 }
993 #endregion
994
995 }
996
997 #endregion
998
999}
1000
1001#endregion Designer generated code
global::Google.Protobuf pb
Definition SetCover.pb.cs:8
global::Google.Protobuf.Reflection pbr
global::System.Collections.Generic scg
global::Google.Protobuf.Collections pbc
Definition SetCover.pb.cs:9
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.
static pbr::MessageDescriptor Descriptor
bool Equals(FlowModelProto other)
global::Google.OrTools.Graph.FlowModelProto.Types.ProblemType ProblemType
pbc::RepeatedField< global::Google.OrTools.Graph.FlowArcProto > Arcs
const int ArcsFieldNumber
Field number for the "arcs" field.
void MergeFrom(pb::CodedInputStream input)
void WriteTo(pb::CodedOutputStream output)
const int ProblemTypeFieldNumber
Field number for the "problem_type" field.
bool HasProblemType
Gets whether the "problem_type" field is set.
void ClearProblemType()
Clears the value of the "problem_type" field.
void MergeFrom(FlowModelProto other)
static pb::MessageParser< FlowModelProto > Parser
pbc::RepeatedField< global::Google.OrTools.Graph.FlowNodeProto > Nodes
const int NodesFieldNumber
Field number for the "nodes" field.
override bool Equals(object other)
void WriteTo(pb::CodedOutputStream output)
const int IdFieldNumber
Field number for the "id" field.
override bool Equals(object other)
bool HasId
Gets whether the "id" field is set.
bool HasSupply
Gets whether the "supply" field is set.
static pb::MessageParser< FlowNodeProto > Parser
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)
const int SupplyFieldNumber
Field number for the "supply" field.
static pbr::MessageDescriptor Descriptor
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.