OR-Tools  9.2
flow_problem.pb.h
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/graph/flow_problem.proto
3
4#ifndef GOOGLE_PROTOBUF_INCLUDED_ortools_2fgraph_2fflow_5fproblem_2eproto
5#define GOOGLE_PROTOBUF_INCLUDED_ortools_2fgraph_2fflow_5fproblem_2eproto
6
7#include <limits>
8#include <string>
9
10#include <google/protobuf/port_def.inc>
11#if PROTOBUF_VERSION < 3019000
12#error This file was generated by a newer version of protoc which is
13#error incompatible with your Protocol Buffer headers. Please update
14#error your headers.
15#endif
16#if 3019001 < PROTOBUF_MIN_PROTOC_VERSION
17#error This file was generated by an older version of protoc which is
18#error incompatible with your Protocol Buffer headers. Please
19#error regenerate this file with a newer version of protoc.
20#endif
21
22#include <google/protobuf/port_undef.inc>
23#include <google/protobuf/io/coded_stream.h>
24#include <google/protobuf/arena.h>
25#include <google/protobuf/arenastring.h>
26#include <google/protobuf/generated_message_table_driven.h>
27#include <google/protobuf/generated_message_util.h>
28#include <google/protobuf/metadata_lite.h>
29#include <google/protobuf/generated_message_reflection.h>
30#include <google/protobuf/message.h>
31#include <google/protobuf/repeated_field.h> // IWYU pragma: export
32#include <google/protobuf/extension_set.h> // IWYU pragma: export
33#include <google/protobuf/generated_enum_reflection.h>
34#include <google/protobuf/unknown_field_set.h>
35// @@protoc_insertion_point(includes)
36#include <google/protobuf/port_def.inc>
37#define PROTOBUF_INTERNAL_EXPORT_ortools_2fgraph_2fflow_5fproblem_2eproto
38PROTOBUF_NAMESPACE_OPEN
39namespace internal {
40class AnyMetadata;
41} // namespace internal
42PROTOBUF_NAMESPACE_CLOSE
43
44// Internal implementation detail -- do not use these members.
46 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
48 static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
50 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3]
52 static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
53 static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
54 static const uint32_t offsets[];
55};
56extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto;
57namespace operations_research {
58class FlowArcProto;
59struct FlowArcProtoDefaultTypeInternal;
60extern FlowArcProtoDefaultTypeInternal _FlowArcProto_default_instance_;
61class FlowModelProto;
62struct FlowModelProtoDefaultTypeInternal;
63extern FlowModelProtoDefaultTypeInternal _FlowModelProto_default_instance_;
64class FlowNodeProto;
65struct FlowNodeProtoDefaultTypeInternal;
66extern FlowNodeProtoDefaultTypeInternal _FlowNodeProto_default_instance_;
67} // namespace operations_research
68PROTOBUF_NAMESPACE_OPEN
69template<> ::operations_research::FlowArcProto* Arena::CreateMaybeMessage<::operations_research::FlowArcProto>(Arena*);
70template<> ::operations_research::FlowModelProto* Arena::CreateMaybeMessage<::operations_research::FlowModelProto>(Arena*);
71template<> ::operations_research::FlowNodeProto* Arena::CreateMaybeMessage<::operations_research::FlowNodeProto>(Arena*);
72PROTOBUF_NAMESPACE_CLOSE
73namespace operations_research {
74
79};
84
85const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FlowModelProto_ProblemType_descriptor();
86template<typename T>
87inline const std::string& FlowModelProto_ProblemType_Name(T enum_t_value) {
90 "Incorrect type passed to function FlowModelProto_ProblemType_Name.");
91 return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
93}
95 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FlowModelProto_ProblemType* value) {
96 return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<FlowModelProto_ProblemType>(
98}
99// ===================================================================
100
101class FlowArcProto final :
102 public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:operations_research.FlowArcProto) */ {
103 public:
104 inline FlowArcProto() : FlowArcProto(nullptr) {}
105 ~FlowArcProto() override;
106 explicit constexpr FlowArcProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
107
108 FlowArcProto(const FlowArcProto& from);
109 FlowArcProto(FlowArcProto&& from) noexcept
110 : FlowArcProto() {
111 *this = ::std::move(from);
112 }
113
114 inline FlowArcProto& operator=(const FlowArcProto& from) {
115 CopyFrom(from);
116 return *this;
117 }
118 inline FlowArcProto& operator=(FlowArcProto&& from) noexcept {
119 if (this == &from) return *this;
120 if (GetOwningArena() == from.GetOwningArena()
121 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
122 && GetOwningArena() != nullptr
123 #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
124 ) {
125 InternalSwap(&from);
126 } else {
127 CopyFrom(from);
128 }
129 return *this;
130 }
131
132 inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
133 return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
134 }
135 inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
136 return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
137 }
138
139 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
140 return GetDescriptor();
141 }
142 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
143 return default_instance().GetMetadata().descriptor;
144 }
145 static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
146 return default_instance().GetMetadata().reflection;
147 }
150 }
152 return reinterpret_cast<const FlowArcProto*>(
154 }
155 static constexpr int kIndexInFileMessages =
156 0;
157
158 friend void swap(FlowArcProto& a, FlowArcProto& b) {
159 a.Swap(&b);
160 }
161 inline void Swap(FlowArcProto* other) {
162 if (other == this) return;
163 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
164 if (GetOwningArena() != nullptr &&
165 GetOwningArena() == other->GetOwningArena()) {
166 #else // PROTOBUF_FORCE_COPY_IN_SWAP
167 if (GetOwningArena() == other->GetOwningArena()) {
168 #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
169 InternalSwap(other);
170 } else {
171 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
172 }
173 }
175 if (other == this) return;
176 GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
177 InternalSwap(other);
178 }
179
180 // implements Message ----------------------------------------------
181
182 FlowArcProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
183 return CreateMaybeMessage<FlowArcProto>(arena);
184 }
185 using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
186 void CopyFrom(const FlowArcProto& from);
187 using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
188 void MergeFrom(const FlowArcProto& from);
189 private:
190 static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
191 public:
192 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
193 bool IsInitialized() const final;
194
195 size_t ByteSizeLong() const final;
196 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
197 uint8_t* _InternalSerialize(
198 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
199 int GetCachedSize() const final { return _cached_size_.Get(); }
200
201 private:
202 void SharedCtor();
203 void SharedDtor();
204 void SetCachedSize(int size) const final;
205 void InternalSwap(FlowArcProto* other);
206
207 private:
208 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
209 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
210 return "operations_research.FlowArcProto";
211 }
212 protected:
213 explicit FlowArcProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
214 bool is_message_owned = false);
215 private:
216 static void ArenaDtor(void* object);
217 inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
218 public:
219
220 static const ClassData _class_data_;
221 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
222
223 ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
224
225 // nested types ----------------------------------------------------
226
227 // accessors -------------------------------------------------------
228
229 enum : int {
234 };
235 // optional int64 tail = 1;
236 bool has_tail() const;
237 private:
238 bool _internal_has_tail() const;
239 public:
240 void clear_tail();
241 int64_t tail() const;
242 void set_tail(int64_t value);
243 private:
244 int64_t _internal_tail() const;
245 void _internal_set_tail(int64_t value);
246 public:
247
248 // optional int64 head = 2;
249 bool has_head() const;
250 private:
251 bool _internal_has_head() const;
252 public:
253 void clear_head();
254 int64_t head() const;
255 void set_head(int64_t value);
256 private:
257 int64_t _internal_head() const;
258 void _internal_set_head(int64_t value);
259 public:
260
261 // optional int64 unit_cost = 4 [default = 0];
262 bool has_unit_cost() const;
263 private:
264 bool _internal_has_unit_cost() const;
265 public:
266 void clear_unit_cost();
267 int64_t unit_cost() const;
268 void set_unit_cost(int64_t value);
269 private:
270 int64_t _internal_unit_cost() const;
271 void _internal_set_unit_cost(int64_t value);
272 public:
273
274 // optional int64 capacity = 3 [default = 1];
275 bool has_capacity() const;
276 private:
277 bool _internal_has_capacity() const;
278 public:
279 void clear_capacity();
280 int64_t capacity() const;
281 void set_capacity(int64_t value);
282 private:
283 int64_t _internal_capacity() const;
284 void _internal_set_capacity(int64_t value);
285 public:
286
287 // @@protoc_insertion_point(class_scope:operations_research.FlowArcProto)
288 private:
289 class _Internal;
290
291 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
292 typedef void InternalArenaConstructable_;
293 typedef void DestructorSkippable_;
294 ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
295 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
296 int64_t tail_;
297 int64_t head_;
298 int64_t unit_cost_;
299 int64_t capacity_;
300 friend struct ::TableStruct_ortools_2fgraph_2fflow_5fproblem_2eproto;
301};
302// -------------------------------------------------------------------
303
304class FlowNodeProto final :
305 public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:operations_research.FlowNodeProto) */ {
306 public:
307 inline FlowNodeProto() : FlowNodeProto(nullptr) {}
308 ~FlowNodeProto() override;
309 explicit constexpr FlowNodeProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
310
311 FlowNodeProto(const FlowNodeProto& from);
313 : FlowNodeProto() {
314 *this = ::std::move(from);
315 }
316
317 inline FlowNodeProto& operator=(const FlowNodeProto& from) {
318 CopyFrom(from);
319 return *this;
320 }
321 inline FlowNodeProto& operator=(FlowNodeProto&& from) noexcept {
322 if (this == &from) return *this;
323 if (GetOwningArena() == from.GetOwningArena()
324 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
325 && GetOwningArena() != nullptr
326 #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
327 ) {
328 InternalSwap(&from);
329 } else {
330 CopyFrom(from);
331 }
332 return *this;
333 }
334
335 inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
336 return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
337 }
338 inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
339 return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
340 }
341
342 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
343 return GetDescriptor();
344 }
345 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
346 return default_instance().GetMetadata().descriptor;
347 }
348 static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
349 return default_instance().GetMetadata().reflection;
350 }
353 }
355 return reinterpret_cast<const FlowNodeProto*>(
357 }
358 static constexpr int kIndexInFileMessages =
359 1;
360
362 a.Swap(&b);
363 }
364 inline void Swap(FlowNodeProto* other) {
365 if (other == this) return;
366 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
367 if (GetOwningArena() != nullptr &&
368 GetOwningArena() == other->GetOwningArena()) {
369 #else // PROTOBUF_FORCE_COPY_IN_SWAP
370 if (GetOwningArena() == other->GetOwningArena()) {
371 #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
372 InternalSwap(other);
373 } else {
374 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
375 }
376 }
378 if (other == this) return;
379 GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
380 InternalSwap(other);
381 }
382
383 // implements Message ----------------------------------------------
384
385 FlowNodeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
386 return CreateMaybeMessage<FlowNodeProto>(arena);
387 }
388 using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
389 void CopyFrom(const FlowNodeProto& from);
390 using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
391 void MergeFrom(const FlowNodeProto& from);
392 private:
393 static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
394 public:
395 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
396 bool IsInitialized() const final;
397
398 size_t ByteSizeLong() const final;
399 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
400 uint8_t* _InternalSerialize(
401 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
402 int GetCachedSize() const final { return _cached_size_.Get(); }
403
404 private:
405 void SharedCtor();
406 void SharedDtor();
407 void SetCachedSize(int size) const final;
408 void InternalSwap(FlowNodeProto* other);
409
410 private:
411 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
412 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
413 return "operations_research.FlowNodeProto";
414 }
415 protected:
416 explicit FlowNodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
417 bool is_message_owned = false);
418 private:
419 static void ArenaDtor(void* object);
420 inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
421 public:
422
423 static const ClassData _class_data_;
424 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
425
426 ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
427
428 // nested types ----------------------------------------------------
429
430 // accessors -------------------------------------------------------
431
432 enum : int {
433 kIdFieldNumber = 1,
434 kSupplyFieldNumber = 2,
435 };
436 // optional int64 id = 1;
437 bool has_id() const;
438 private:
439 bool _internal_has_id() const;
440 public:
441 void clear_id();
442 int64_t id() const;
443 void set_id(int64_t value);
444 private:
445 int64_t _internal_id() const;
446 void _internal_set_id(int64_t value);
447 public:
448
449 // optional int64 supply = 2 [default = 0];
450 bool has_supply() const;
451 private:
452 bool _internal_has_supply() const;
453 public:
454 void clear_supply();
455 int64_t supply() const;
456 void set_supply(int64_t value);
457 private:
458 int64_t _internal_supply() const;
459 void _internal_set_supply(int64_t value);
460 public:
461
462 // @@protoc_insertion_point(class_scope:operations_research.FlowNodeProto)
463 private:
464 class _Internal;
465
466 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
467 typedef void InternalArenaConstructable_;
468 typedef void DestructorSkippable_;
469 ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
470 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
471 int64_t id_;
472 int64_t supply_;
473 friend struct ::TableStruct_ortools_2fgraph_2fflow_5fproblem_2eproto;
474};
475// -------------------------------------------------------------------
476
477class FlowModelProto final :
478 public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:operations_research.FlowModelProto) */ {
479 public:
480 inline FlowModelProto() : FlowModelProto(nullptr) {}
481 ~FlowModelProto() override;
482 explicit constexpr FlowModelProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
483
484 FlowModelProto(const FlowModelProto& from);
486 : FlowModelProto() {
487 *this = ::std::move(from);
488 }
489
491 CopyFrom(from);
492 return *this;
493 }
494 inline FlowModelProto& operator=(FlowModelProto&& from) noexcept {
495 if (this == &from) return *this;
496 if (GetOwningArena() == from.GetOwningArena()
497 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
498 && GetOwningArena() != nullptr
499 #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
500 ) {
501 InternalSwap(&from);
502 } else {
503 CopyFrom(from);
504 }
505 return *this;
506 }
507
508 inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
509 return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
510 }
511 inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
512 return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
513 }
514
515 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
516 return GetDescriptor();
517 }
518 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
519 return default_instance().GetMetadata().descriptor;
520 }
521 static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
522 return default_instance().GetMetadata().reflection;
523 }
526 }
528 return reinterpret_cast<const FlowModelProto*>(
530 }
531 static constexpr int kIndexInFileMessages =
532 2;
533
535 a.Swap(&b);
536 }
537 inline void Swap(FlowModelProto* other) {
538 if (other == this) return;
539 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
540 if (GetOwningArena() != nullptr &&
541 GetOwningArena() == other->GetOwningArena()) {
542 #else // PROTOBUF_FORCE_COPY_IN_SWAP
543 if (GetOwningArena() == other->GetOwningArena()) {
544 #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
545 InternalSwap(other);
546 } else {
547 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
548 }
549 }
551 if (other == this) return;
552 GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
553 InternalSwap(other);
554 }
555
556 // implements Message ----------------------------------------------
557
558 FlowModelProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
559 return CreateMaybeMessage<FlowModelProto>(arena);
560 }
561 using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
562 void CopyFrom(const FlowModelProto& from);
563 using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
564 void MergeFrom(const FlowModelProto& from);
565 private:
566 static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
567 public:
568 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
569 bool IsInitialized() const final;
570
571 size_t ByteSizeLong() const final;
572 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
573 uint8_t* _InternalSerialize(
574 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
575 int GetCachedSize() const final { return _cached_size_.Get(); }
576
577 private:
578 void SharedCtor();
579 void SharedDtor();
580 void SetCachedSize(int size) const final;
581 void InternalSwap(FlowModelProto* other);
582
583 private:
584 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
585 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
586 return "operations_research.FlowModelProto";
587 }
588 protected:
589 explicit FlowModelProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
590 bool is_message_owned = false);
591 private:
592 static void ArenaDtor(void* object);
593 inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
594 public:
595
596 static const ClassData _class_data_;
597 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
598
599 ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
600
601 // nested types ----------------------------------------------------
602
604 static constexpr ProblemType LINEAR_SUM_ASSIGNMENT =
606 static constexpr ProblemType MAX_FLOW =
608 static constexpr ProblemType MIN_COST_FLOW =
610 static inline bool ProblemType_IsValid(int value) {
612 }
613 static constexpr ProblemType ProblemType_MIN =
615 static constexpr ProblemType ProblemType_MAX =
617 static constexpr int ProblemType_ARRAYSIZE =
619 static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor*
622 }
623 template<typename T>
624 static inline const std::string& ProblemType_Name(T enum_t_value) {
627 "Incorrect type passed to function ProblemType_Name.");
628 return FlowModelProto_ProblemType_Name(enum_t_value);
629 }
630 static inline bool ProblemType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,
633 }
634
635 // accessors -------------------------------------------------------
636
637 enum : int {
638 kNodesFieldNumber = 1,
639 kArcsFieldNumber = 2,
640 kProblemTypeFieldNumber = 3,
641 };
642 // repeated .operations_research.FlowNodeProto nodes = 1;
643 int nodes_size() const;
644 private:
645 int _internal_nodes_size() const;
646 public:
647 void clear_nodes();
649 ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowNodeProto >*
650 mutable_nodes();
651 private:
652 const ::operations_research::FlowNodeProto& _internal_nodes(int index) const;
653 ::operations_research::FlowNodeProto* _internal_add_nodes();
654 public:
655 const ::operations_research::FlowNodeProto& nodes(int index) const;
657 const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowNodeProto >&
658 nodes() const;
659
660 // repeated .operations_research.FlowArcProto arcs = 2;
661 int arcs_size() const;
662 private:
663 int _internal_arcs_size() const;
664 public:
665 void clear_arcs();
667 ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowArcProto >*
668 mutable_arcs();
669 private:
670 const ::operations_research::FlowArcProto& _internal_arcs(int index) const;
671 ::operations_research::FlowArcProto* _internal_add_arcs();
672 public:
673 const ::operations_research::FlowArcProto& arcs(int index) const;
675 const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowArcProto >&
676 arcs() const;
677
678 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
679 bool has_problem_type() const;
680 private:
681 bool _internal_has_problem_type() const;
682 public:
683 void clear_problem_type();
686 private:
687 ::operations_research::FlowModelProto_ProblemType _internal_problem_type() const;
688 void _internal_set_problem_type(::operations_research::FlowModelProto_ProblemType value);
689 public:
690
691 // @@protoc_insertion_point(class_scope:operations_research.FlowModelProto)
692 private:
693 class _Internal;
694
695 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
696 typedef void InternalArenaConstructable_;
697 typedef void DestructorSkippable_;
698 ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
699 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
700 ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowNodeProto > nodes_;
701 ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowArcProto > arcs_;
702 int problem_type_;
703 friend struct ::TableStruct_ortools_2fgraph_2fflow_5fproblem_2eproto;
704};
705// ===================================================================
706
707
708// ===================================================================
709
710#ifdef __GNUC__
711 #pragma GCC diagnostic push
712 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
713#endif // __GNUC__
714// FlowArcProto
715
716// optional int64 tail = 1;
717inline bool FlowArcProto::_internal_has_tail() const {
718 bool value = (_has_bits_[0] & 0x00000001u) != 0;
719 return value;
720}
721inline bool FlowArcProto::has_tail() const {
722 return _internal_has_tail();
723}
725 tail_ = int64_t{0};
726 _has_bits_[0] &= ~0x00000001u;
727}
728inline int64_t FlowArcProto::_internal_tail() const {
729 return tail_;
730}
731inline int64_t FlowArcProto::tail() const {
732 // @@protoc_insertion_point(field_get:operations_research.FlowArcProto.tail)
733 return _internal_tail();
734}
735inline void FlowArcProto::_internal_set_tail(int64_t value) {
736 _has_bits_[0] |= 0x00000001u;
737 tail_ = value;
738}
739inline void FlowArcProto::set_tail(int64_t value) {
740 _internal_set_tail(value);
741 // @@protoc_insertion_point(field_set:operations_research.FlowArcProto.tail)
742}
743
744// optional int64 head = 2;
745inline bool FlowArcProto::_internal_has_head() const {
746 bool value = (_has_bits_[0] & 0x00000002u) != 0;
747 return value;
748}
749inline bool FlowArcProto::has_head() const {
750 return _internal_has_head();
751}
753 head_ = int64_t{0};
754 _has_bits_[0] &= ~0x00000002u;
755}
756inline int64_t FlowArcProto::_internal_head() const {
757 return head_;
758}
759inline int64_t FlowArcProto::head() const {
760 // @@protoc_insertion_point(field_get:operations_research.FlowArcProto.head)
761 return _internal_head();
762}
763inline void FlowArcProto::_internal_set_head(int64_t value) {
764 _has_bits_[0] |= 0x00000002u;
765 head_ = value;
766}
767inline void FlowArcProto::set_head(int64_t value) {
768 _internal_set_head(value);
769 // @@protoc_insertion_point(field_set:operations_research.FlowArcProto.head)
770}
771
772// optional int64 capacity = 3 [default = 1];
773inline bool FlowArcProto::_internal_has_capacity() const {
774 bool value = (_has_bits_[0] & 0x00000008u) != 0;
775 return value;
776}
777inline bool FlowArcProto::has_capacity() const {
778 return _internal_has_capacity();
779}
781 capacity_ = int64_t{1};
782 _has_bits_[0] &= ~0x00000008u;
783}
784inline int64_t FlowArcProto::_internal_capacity() const {
785 return capacity_;
786}
787inline int64_t FlowArcProto::capacity() const {
788 // @@protoc_insertion_point(field_get:operations_research.FlowArcProto.capacity)
789 return _internal_capacity();
790}
791inline void FlowArcProto::_internal_set_capacity(int64_t value) {
792 _has_bits_[0] |= 0x00000008u;
793 capacity_ = value;
794}
795inline void FlowArcProto::set_capacity(int64_t value) {
796 _internal_set_capacity(value);
797 // @@protoc_insertion_point(field_set:operations_research.FlowArcProto.capacity)
798}
799
800// optional int64 unit_cost = 4 [default = 0];
801inline bool FlowArcProto::_internal_has_unit_cost() const {
802 bool value = (_has_bits_[0] & 0x00000004u) != 0;
803 return value;
804}
805inline bool FlowArcProto::has_unit_cost() const {
806 return _internal_has_unit_cost();
807}
809 unit_cost_ = int64_t{0};
810 _has_bits_[0] &= ~0x00000004u;
811}
812inline int64_t FlowArcProto::_internal_unit_cost() const {
813 return unit_cost_;
814}
815inline int64_t FlowArcProto::unit_cost() const {
816 // @@protoc_insertion_point(field_get:operations_research.FlowArcProto.unit_cost)
817 return _internal_unit_cost();
818}
819inline void FlowArcProto::_internal_set_unit_cost(int64_t value) {
820 _has_bits_[0] |= 0x00000004u;
821 unit_cost_ = value;
822}
823inline void FlowArcProto::set_unit_cost(int64_t value) {
824 _internal_set_unit_cost(value);
825 // @@protoc_insertion_point(field_set:operations_research.FlowArcProto.unit_cost)
826}
827
828// -------------------------------------------------------------------
829
830// FlowNodeProto
831
832// optional int64 id = 1;
833inline bool FlowNodeProto::_internal_has_id() const {
834 bool value = (_has_bits_[0] & 0x00000001u) != 0;
835 return value;
836}
837inline bool FlowNodeProto::has_id() const {
838 return _internal_has_id();
839}
841 id_ = int64_t{0};
842 _has_bits_[0] &= ~0x00000001u;
843}
844inline int64_t FlowNodeProto::_internal_id() const {
845 return id_;
846}
847inline int64_t FlowNodeProto::id() const {
848 // @@protoc_insertion_point(field_get:operations_research.FlowNodeProto.id)
849 return _internal_id();
850}
851inline void FlowNodeProto::_internal_set_id(int64_t value) {
852 _has_bits_[0] |= 0x00000001u;
853 id_ = value;
854}
855inline void FlowNodeProto::set_id(int64_t value) {
856 _internal_set_id(value);
857 // @@protoc_insertion_point(field_set:operations_research.FlowNodeProto.id)
858}
859
860// optional int64 supply = 2 [default = 0];
861inline bool FlowNodeProto::_internal_has_supply() const {
862 bool value = (_has_bits_[0] & 0x00000002u) != 0;
863 return value;
864}
865inline bool FlowNodeProto::has_supply() const {
866 return _internal_has_supply();
867}
869 supply_ = int64_t{0};
870 _has_bits_[0] &= ~0x00000002u;
871}
872inline int64_t FlowNodeProto::_internal_supply() const {
873 return supply_;
874}
875inline int64_t FlowNodeProto::supply() const {
876 // @@protoc_insertion_point(field_get:operations_research.FlowNodeProto.supply)
877 return _internal_supply();
878}
879inline void FlowNodeProto::_internal_set_supply(int64_t value) {
880 _has_bits_[0] |= 0x00000002u;
881 supply_ = value;
882}
883inline void FlowNodeProto::set_supply(int64_t value) {
884 _internal_set_supply(value);
885 // @@protoc_insertion_point(field_set:operations_research.FlowNodeProto.supply)
886}
887
888// -------------------------------------------------------------------
889
890// FlowModelProto
891
892// repeated .operations_research.FlowNodeProto nodes = 1;
893inline int FlowModelProto::_internal_nodes_size() const {
894 return nodes_.size();
895}
896inline int FlowModelProto::nodes_size() const {
897 return _internal_nodes_size();
898}
900 nodes_.Clear();
901}
902inline ::operations_research::FlowNodeProto* FlowModelProto::mutable_nodes(int index) {
903 // @@protoc_insertion_point(field_mutable:operations_research.FlowModelProto.nodes)
904 return nodes_.Mutable(index);
905}
906inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowNodeProto >*
908 // @@protoc_insertion_point(field_mutable_list:operations_research.FlowModelProto.nodes)
909 return &nodes_;
910}
911inline const ::operations_research::FlowNodeProto& FlowModelProto::_internal_nodes(int index) const {
912 return nodes_.Get(index);
913}
914inline const ::operations_research::FlowNodeProto& FlowModelProto::nodes(int index) const {
915 // @@protoc_insertion_point(field_get:operations_research.FlowModelProto.nodes)
916 return _internal_nodes(index);
917}
918inline ::operations_research::FlowNodeProto* FlowModelProto::_internal_add_nodes() {
919 return nodes_.Add();
920}
921inline ::operations_research::FlowNodeProto* FlowModelProto::add_nodes() {
922 ::operations_research::FlowNodeProto* _add = _internal_add_nodes();
923 // @@protoc_insertion_point(field_add:operations_research.FlowModelProto.nodes)
924 return _add;
925}
926inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowNodeProto >&
928 // @@protoc_insertion_point(field_list:operations_research.FlowModelProto.nodes)
929 return nodes_;
930}
931
932// repeated .operations_research.FlowArcProto arcs = 2;
933inline int FlowModelProto::_internal_arcs_size() const {
934 return arcs_.size();
935}
936inline int FlowModelProto::arcs_size() const {
937 return _internal_arcs_size();
938}
940 arcs_.Clear();
941}
942inline ::operations_research::FlowArcProto* FlowModelProto::mutable_arcs(int index) {
943 // @@protoc_insertion_point(field_mutable:operations_research.FlowModelProto.arcs)
944 return arcs_.Mutable(index);
945}
946inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowArcProto >*
948 // @@protoc_insertion_point(field_mutable_list:operations_research.FlowModelProto.arcs)
949 return &arcs_;
950}
951inline const ::operations_research::FlowArcProto& FlowModelProto::_internal_arcs(int index) const {
952 return arcs_.Get(index);
953}
954inline const ::operations_research::FlowArcProto& FlowModelProto::arcs(int index) const {
955 // @@protoc_insertion_point(field_get:operations_research.FlowModelProto.arcs)
956 return _internal_arcs(index);
957}
958inline ::operations_research::FlowArcProto* FlowModelProto::_internal_add_arcs() {
959 return arcs_.Add();
960}
961inline ::operations_research::FlowArcProto* FlowModelProto::add_arcs() {
962 ::operations_research::FlowArcProto* _add = _internal_add_arcs();
963 // @@protoc_insertion_point(field_add:operations_research.FlowModelProto.arcs)
964 return _add;
965}
966inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowArcProto >&
968 // @@protoc_insertion_point(field_list:operations_research.FlowModelProto.arcs)
969 return arcs_;
970}
971
972// optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
973inline bool FlowModelProto::_internal_has_problem_type() const {
974 bool value = (_has_bits_[0] & 0x00000001u) != 0;
975 return value;
976}
978 return _internal_has_problem_type();
979}
981 problem_type_ = 0;
982 _has_bits_[0] &= ~0x00000001u;
983}
984inline ::operations_research::FlowModelProto_ProblemType FlowModelProto::_internal_problem_type() const {
985 return static_cast< ::operations_research::FlowModelProto_ProblemType >(problem_type_);
986}
988 // @@protoc_insertion_point(field_get:operations_research.FlowModelProto.problem_type)
989 return _internal_problem_type();
990}
991inline void FlowModelProto::_internal_set_problem_type(::operations_research::FlowModelProto_ProblemType value) {
993 _has_bits_[0] |= 0x00000001u;
994 problem_type_ = value;
995}
997 _internal_set_problem_type(value);
998 // @@protoc_insertion_point(field_set:operations_research.FlowModelProto.problem_type)
999}
1000
1001#ifdef __GNUC__
1002 #pragma GCC diagnostic pop
1003#endif // __GNUC__
1004// -------------------------------------------------------------------
1005
1006// -------------------------------------------------------------------
1007
1008
1009// @@protoc_insertion_point(namespace_scope)
1010
1011} // namespace operations_research
1012
1013PROTOBUF_NAMESPACE_OPEN
1014
1015template <> struct is_proto_enum< ::operations_research::FlowModelProto_ProblemType> : ::std::true_type {};
1016template <>
1017inline const EnumDescriptor* GetEnumDescriptor< ::operations_research::FlowModelProto_ProblemType>() {
1019}
1020
1021PROTOBUF_NAMESPACE_CLOSE
1022
1023// @@protoc_insertion_point(global_scope)
1024
1025#include <google/protobuf/port_undef.inc>
1026#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_ortools_2fgraph_2fflow_5fproblem_2eproto
void Swap(FlowArcProto *other)
FlowArcProto & operator=(FlowArcProto &&from) noexcept
void UnsafeArenaSwap(FlowArcProto *other)
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
FlowArcProto * New(::PROTOBUF_NAMESPACE_ID::Arena *arena=nullptr) const final
static const ClassData _class_data_
void CopyFrom(const FlowArcProto &from)
static const FlowArcProto * internal_default_instance()
const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet & unknown_fields() const
static constexpr int kIndexInFileMessages
FlowArcProto(FlowArcProto &&from) noexcept
friend void swap(FlowArcProto &a, FlowArcProto &b)
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * GetDescriptor()
FlowArcProto & operator=(const FlowArcProto &from)
static const FlowArcProto & default_instance()
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * descriptor()
void MergeFrom(const FlowArcProto &from)
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet * mutable_unknown_fields()
uint8_t * _InternalSerialize(uint8_t *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static const ::PROTOBUF_NAMESPACE_ID::Reflection * GetReflection()
static const FlowModelProto * internal_default_instance()
::operations_research::FlowArcProto * add_arcs()
static const FlowModelProto & default_instance()
static const ClassData _class_data_
static const std::string & ProblemType_Name(T enum_t_value)
void Swap(FlowModelProto *other)
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowArcProto > & arcs() const
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowNodeProto > & nodes() const
void set_problem_type(::operations_research::FlowModelProto_ProblemType value)
FlowModelProto(FlowModelProto &&from) noexcept
const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet & unknown_fields() const
static bool ProblemType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ProblemType *value)
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * GetDescriptor()
FlowModelProto & operator=(const FlowModelProto &from)
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * descriptor()
friend void swap(FlowModelProto &a, FlowModelProto &b)
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowArcProto > * mutable_arcs()
void UnsafeArenaSwap(FlowModelProto *other)
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * ProblemType_descriptor()
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet * mutable_unknown_fields()
FlowModelProto * New(::PROTOBUF_NAMESPACE_ID::Arena *arena=nullptr) const final
static const ::PROTOBUF_NAMESPACE_ID::Reflection * GetReflection()
::operations_research::FlowModelProto_ProblemType problem_type() const
::operations_research::FlowNodeProto * add_nodes()
FlowModelProto & operator=(FlowModelProto &&from) noexcept
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::operations_research::FlowNodeProto > * mutable_nodes()
static const FlowNodeProto & default_instance()
void UnsafeArenaSwap(FlowNodeProto *other)
static const ClassData _class_data_
FlowNodeProto & operator=(const FlowNodeProto &from)
const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet & unknown_fields() const
void Swap(FlowNodeProto *other)
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * GetDescriptor()
FlowNodeProto * New(::PROTOBUF_NAMESPACE_ID::Arena *arena=nullptr) const final
FlowNodeProto(FlowNodeProto &&from) noexcept
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * descriptor()
static const FlowNodeProto * internal_default_instance()
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet * mutable_unknown_fields()
friend void swap(FlowNodeProto &a, FlowNodeProto &b)
FlowNodeProto & operator=(FlowNodeProto &&from) noexcept
static const ::PROTOBUF_NAMESPACE_ID::Reflection * GetReflection()
int64_t b
int64_t a
const std::string name
int64_t value
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto
MPSolver::OptimizationProblemType problem_type
Collection of objects used to extend the Constraint Solver library.
bool FlowModelProto_ProblemType_IsValid(int value)
constexpr FlowModelProto_ProblemType FlowModelProto_ProblemType_ProblemType_MIN
@ FlowModelProto_ProblemType_LINEAR_SUM_ASSIGNMENT
@ FlowModelProto_ProblemType_MIN_COST_FLOW
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlowArcProtoDefaultTypeInternal _FlowArcProto_default_instance_
const std::string & FlowModelProto_ProblemType_Name(T enum_t_value)
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlowNodeProtoDefaultTypeInternal _FlowNodeProto_default_instance_
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * FlowModelProto_ProblemType_descriptor()
bool FlowModelProto_ProblemType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, FlowModelProto_ProblemType *value)
constexpr int FlowModelProto_ProblemType_ProblemType_ARRAYSIZE
constexpr FlowModelProto_ProblemType FlowModelProto_ProblemType_ProblemType_MAX
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlowModelProtoDefaultTypeInternal _FlowModelProto_default_instance_
int index
Definition: pack.cc:509
int nodes
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)