OR-Tools  9.1
flow_problem.pb.cc
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 
5 
6 #include <algorithm>
7 
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
15 // @@protoc_insertion_point(includes)
16 #include <google/protobuf/port_def.inc>
17 
18 PROTOBUF_PRAGMA_INIT_SEG
19 namespace operations_research {
20 constexpr Arc::Arc(
21  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
22  : tail_node_id_(int64_t{0})
23  , head_node_id_(int64_t{0})
24  , unit_cost_(int64_t{0})
25  , capacity_(int64_t{1}){}
28  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
30  union {
32  };
33 };
34 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ArcDefaultTypeInternal _Arc_default_instance_;
35 constexpr Node::Node(
36  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
37  : id_(int64_t{0})
38  , supply_(int64_t{0}){}
41  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
43  union {
45  };
46 };
47 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDefaultTypeInternal _Node_default_instance_;
49  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
50  : node_()
51  , arc_()
52  , problem_type_(2)
53 {}
56  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
58  union {
60  };
61 };
62 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlowModelDefaultTypeInternal _FlowModel_default_instance_;
63 } // namespace operations_research
64 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fgraph_2fflow_5fproblem_2eproto[3];
65 static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto[1];
66 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto = nullptr;
67 
68 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ortools_2fgraph_2fflow_5fproblem_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
69  PROTOBUF_FIELD_OFFSET(::operations_research::Arc, _has_bits_),
70  PROTOBUF_FIELD_OFFSET(::operations_research::Arc, _internal_metadata_),
71  ~0u, // no _extensions_
72  ~0u, // no _oneof_case_
73  ~0u, // no _weak_field_map_
74  PROTOBUF_FIELD_OFFSET(::operations_research::Arc, tail_node_id_),
75  PROTOBUF_FIELD_OFFSET(::operations_research::Arc, head_node_id_),
76  PROTOBUF_FIELD_OFFSET(::operations_research::Arc, capacity_),
77  PROTOBUF_FIELD_OFFSET(::operations_research::Arc, unit_cost_),
78  0,
79  1,
80  3,
81  2,
82  PROTOBUF_FIELD_OFFSET(::operations_research::Node, _has_bits_),
83  PROTOBUF_FIELD_OFFSET(::operations_research::Node, _internal_metadata_),
84  ~0u, // no _extensions_
85  ~0u, // no _oneof_case_
86  ~0u, // no _weak_field_map_
87  PROTOBUF_FIELD_OFFSET(::operations_research::Node, id_),
88  PROTOBUF_FIELD_OFFSET(::operations_research::Node, supply_),
89  0,
90  1,
91  PROTOBUF_FIELD_OFFSET(::operations_research::FlowModel, _has_bits_),
92  PROTOBUF_FIELD_OFFSET(::operations_research::FlowModel, _internal_metadata_),
93  ~0u, // no _extensions_
94  ~0u, // no _oneof_case_
95  ~0u, // no _weak_field_map_
96  PROTOBUF_FIELD_OFFSET(::operations_research::FlowModel, node_),
97  PROTOBUF_FIELD_OFFSET(::operations_research::FlowModel, arc_),
98  PROTOBUF_FIELD_OFFSET(::operations_research::FlowModel, problem_type_),
99  ~0u,
100  ~0u,
101  0,
102 };
103 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
104  { 0, 9, sizeof(::operations_research::Arc)},
105  { 13, 20, sizeof(::operations_research::Node)},
106  { 22, 30, sizeof(::operations_research::FlowModel)},
107 };
108 
109 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
110  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::_Arc_default_instance_),
111  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::_Node_default_instance_),
112  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::_FlowModel_default_instance_),
113 };
114 
115 const char descriptor_table_protodef_ortools_2fgraph_2fflow_5fproblem_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
116  "\n ortools/graph/flow_problem.proto\022\023oper"
117  "ations_research\"\\\n\003Arc\022\024\n\014tail_node_id\030\001"
118  " \001(\003\022\024\n\014head_node_id\030\002 \001(\003\022\023\n\010capacity\030\003"
119  " \001(\003:\0011\022\024\n\tunit_cost\030\004 \001(\003:\0010\"%\n\004Node\022\n\n"
120  "\002id\030\001 \001(\003\022\021\n\006supply\030\002 \001(\003:\0010\"\367\001\n\tFlowMod"
121  "el\022\'\n\004node\030\001 \003(\0132\031.operations_research.N"
122  "ode\022%\n\003arc\030\002 \003(\0132\030.operations_research.A"
123  "rc\022O\n\014problem_type\030\003 \001(\0162*.operations_re"
124  "search.FlowModel.ProblemType:\rMIN_COST_F"
125  "LOW\"I\n\013ProblemType\022\031\n\025LINEAR_SUM_ASSIGNM"
126  "ENT\020\000\022\014\n\010MAX_FLOW\020\001\022\021\n\rMIN_COST_FLOW\020\002"
127  ;
128 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto_once;
129 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto = {
130  false, false, 438, descriptor_table_protodef_ortools_2fgraph_2fflow_5fproblem_2eproto, "ortools/graph/flow_problem.proto",
134 };
135 PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto_getter() {
137 }
138 
139 // Force running AddDescriptors() at dynamic initialization time.
140 PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_ortools_2fgraph_2fflow_5fproblem_2eproto(&descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto);
141 namespace operations_research {
142 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FlowModel_ProblemType_descriptor() {
143  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto);
145 }
147  switch (value) {
148  case 0:
149  case 1:
150  case 2:
151  return true;
152  default:
153  return false;
154  }
155 }
156 
157 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
164 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
165 
166 // ===================================================================
167 
168 class Arc::_Internal {
169  public:
170  using HasBits = decltype(std::declval<Arc>()._has_bits_);
171  static void set_has_tail_node_id(HasBits* has_bits) {
172  (*has_bits)[0] |= 1u;
173  }
174  static void set_has_head_node_id(HasBits* has_bits) {
175  (*has_bits)[0] |= 2u;
176  }
177  static void set_has_capacity(HasBits* has_bits) {
178  (*has_bits)[0] |= 8u;
179  }
180  static void set_has_unit_cost(HasBits* has_bits) {
181  (*has_bits)[0] |= 4u;
182  }
183 };
184 
185 Arc::Arc(::PROTOBUF_NAMESPACE_ID::Arena* arena,
186  bool is_message_owned)
187  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
188  SharedCtor();
189  if (!is_message_owned) {
190  RegisterArenaDtor(arena);
191  }
192  // @@protoc_insertion_point(arena_constructor:operations_research.Arc)
193 }
194 Arc::Arc(const Arc& from)
195  : ::PROTOBUF_NAMESPACE_ID::Message(),
196  _has_bits_(from._has_bits_) {
197  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
198  ::memcpy(&tail_node_id_, &from.tail_node_id_,
199  static_cast<size_t>(reinterpret_cast<char*>(&capacity_) -
200  reinterpret_cast<char*>(&tail_node_id_)) + sizeof(capacity_));
201  // @@protoc_insertion_point(copy_constructor:operations_research.Arc)
202 }
203 
204 inline void Arc::SharedCtor() {
205 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
206  reinterpret_cast<char*>(&tail_node_id_) - reinterpret_cast<char*>(this)),
207  0, static_cast<size_t>(reinterpret_cast<char*>(&unit_cost_) -
208  reinterpret_cast<char*>(&tail_node_id_)) + sizeof(unit_cost_));
209 capacity_ = int64_t{1};
210 }
211 
213  // @@protoc_insertion_point(destructor:operations_research.Arc)
214  if (GetArenaForAllocation() != nullptr) return;
215  SharedDtor();
216  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
217 }
218 
219 inline void Arc::SharedDtor() {
220  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
221 }
222 
223 void Arc::ArenaDtor(void* object) {
224  Arc* _this = reinterpret_cast< Arc* >(object);
225  (void)_this;
226 }
227 void Arc::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
228 }
229 void Arc::SetCachedSize(int size) const {
230  _cached_size_.Set(size);
231 }
232 
233 void Arc::Clear() {
234 // @@protoc_insertion_point(message_clear_start:operations_research.Arc)
235  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
236  // Prevent compiler warnings about cached_has_bits being unused
237  (void) cached_has_bits;
238 
239  cached_has_bits = _has_bits_[0];
240  if (cached_has_bits & 0x0000000fu) {
241  ::memset(&tail_node_id_, 0, static_cast<size_t>(
242  reinterpret_cast<char*>(&unit_cost_) -
243  reinterpret_cast<char*>(&tail_node_id_)) + sizeof(unit_cost_));
244  capacity_ = int64_t{1};
245  }
246  _has_bits_.Clear();
247  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
248 }
249 
250 const char* Arc::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
251 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
252  _Internal::HasBits has_bits{};
253  while (!ctx->Done(&ptr)) {
254  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
255  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
256  switch (tag >> 3) {
257  // optional int64 tail_node_id = 1;
258  case 1:
259  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
261  tail_node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
262  CHK_(ptr);
263  } else goto handle_unusual;
264  continue;
265  // optional int64 head_node_id = 2;
266  case 2:
267  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
269  head_node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
270  CHK_(ptr);
271  } else goto handle_unusual;
272  continue;
273  // optional int64 capacity = 3 [default = 1];
274  case 3:
275  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
276  _Internal::set_has_capacity(&has_bits);
277  capacity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
278  CHK_(ptr);
279  } else goto handle_unusual;
280  continue;
281  // optional int64 unit_cost = 4 [default = 0];
282  case 4:
283  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
284  _Internal::set_has_unit_cost(&has_bits);
285  unit_cost_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
286  CHK_(ptr);
287  } else goto handle_unusual;
288  continue;
289  default: {
290  handle_unusual:
291  if ((tag == 0) || ((tag & 7) == 4)) {
292  CHK_(ptr);
293  ctx->SetLastTag(tag);
294  goto success;
295  }
296  ptr = UnknownFieldParse(tag,
297  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
298  ptr, ctx);
299  CHK_(ptr != nullptr);
300  continue;
301  }
302  } // switch
303  } // while
304 success:
305  _has_bits_.Or(has_bits);
306  return ptr;
307 failure:
308  ptr = nullptr;
309  goto success;
310 #undef CHK_
311 }
312 
313 ::PROTOBUF_NAMESPACE_ID::uint8* Arc::_InternalSerialize(
314  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
315  // @@protoc_insertion_point(serialize_to_array_start:operations_research.Arc)
316  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
317  (void) cached_has_bits;
318 
319  cached_has_bits = _has_bits_[0];
320  // optional int64 tail_node_id = 1;
321  if (cached_has_bits & 0x00000001u) {
322  target = stream->EnsureSpace(target);
323  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_tail_node_id(), target);
324  }
325 
326  // optional int64 head_node_id = 2;
327  if (cached_has_bits & 0x00000002u) {
328  target = stream->EnsureSpace(target);
329  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_head_node_id(), target);
330  }
331 
332  // optional int64 capacity = 3 [default = 1];
333  if (cached_has_bits & 0x00000008u) {
334  target = stream->EnsureSpace(target);
335  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_capacity(), target);
336  }
337 
338  // optional int64 unit_cost = 4 [default = 0];
339  if (cached_has_bits & 0x00000004u) {
340  target = stream->EnsureSpace(target);
341  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_unit_cost(), target);
342  }
343 
344  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
345  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
346  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
347  }
348  // @@protoc_insertion_point(serialize_to_array_end:operations_research.Arc)
349  return target;
350 }
351 
352 size_t Arc::ByteSizeLong() const {
353 // @@protoc_insertion_point(message_byte_size_start:operations_research.Arc)
354  size_t total_size = 0;
355 
356  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
357  // Prevent compiler warnings about cached_has_bits being unused
358  (void) cached_has_bits;
359 
360  cached_has_bits = _has_bits_[0];
361  if (cached_has_bits & 0x0000000fu) {
362  // optional int64 tail_node_id = 1;
363  if (cached_has_bits & 0x00000001u) {
364  total_size += 1 +
365  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
366  this->_internal_tail_node_id());
367  }
368 
369  // optional int64 head_node_id = 2;
370  if (cached_has_bits & 0x00000002u) {
371  total_size += 1 +
372  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
373  this->_internal_head_node_id());
374  }
375 
376  // optional int64 unit_cost = 4 [default = 0];
377  if (cached_has_bits & 0x00000004u) {
378  total_size += 1 +
379  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
380  this->_internal_unit_cost());
381  }
382 
383  // optional int64 capacity = 3 [default = 1];
384  if (cached_has_bits & 0x00000008u) {
385  total_size += 1 +
386  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
387  this->_internal_capacity());
388  }
389 
390  }
391  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
392  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
393  _internal_metadata_, total_size, &_cached_size_);
394  }
395  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
396  SetCachedSize(cached_size);
397  return total_size;
398 }
399 
400 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Arc::_class_data_ = {
401  ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
402  Arc::MergeImpl
403 };
404 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Arc::GetClassData() const { return &_class_data_; }
405 
406 void Arc::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
407  const ::PROTOBUF_NAMESPACE_ID::Message&from) {
408  static_cast<Arc *>(to)->MergeFrom(
409  static_cast<const Arc &>(from));
410 }
411 
412 
413 void Arc::MergeFrom(const Arc& from) {
414 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.Arc)
415  GOOGLE_DCHECK_NE(&from, this);
416  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
417  (void) cached_has_bits;
418 
419  cached_has_bits = from._has_bits_[0];
420  if (cached_has_bits & 0x0000000fu) {
421  if (cached_has_bits & 0x00000001u) {
422  tail_node_id_ = from.tail_node_id_;
423  }
424  if (cached_has_bits & 0x00000002u) {
425  head_node_id_ = from.head_node_id_;
426  }
427  if (cached_has_bits & 0x00000004u) {
428  unit_cost_ = from.unit_cost_;
429  }
430  if (cached_has_bits & 0x00000008u) {
431  capacity_ = from.capacity_;
432  }
433  _has_bits_[0] |= cached_has_bits;
434  }
435  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
436 }
437 
438 void Arc::CopyFrom(const Arc& from) {
439 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.Arc)
440  if (&from == this) return;
441  Clear();
442  MergeFrom(from);
443 }
444 
445 bool Arc::IsInitialized() const {
446  return true;
447 }
448 
449 void Arc::InternalSwap(Arc* other) {
450  using std::swap;
451  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
452  swap(_has_bits_[0], other->_has_bits_[0]);
453  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
454  PROTOBUF_FIELD_OFFSET(Arc, unit_cost_)
455  + sizeof(Arc::unit_cost_)
456  - PROTOBUF_FIELD_OFFSET(Arc, tail_node_id_)>(
457  reinterpret_cast<char*>(&tail_node_id_),
458  reinterpret_cast<char*>(&other->tail_node_id_));
459  swap(capacity_, other->capacity_);
460 }
461 
462 ::PROTOBUF_NAMESPACE_ID::Metadata Arc::GetMetadata() const {
463  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
466 }
467 
468 // ===================================================================
469 
471  public:
472  using HasBits = decltype(std::declval<Node>()._has_bits_);
473  static void set_has_id(HasBits* has_bits) {
474  (*has_bits)[0] |= 1u;
475  }
476  static void set_has_supply(HasBits* has_bits) {
477  (*has_bits)[0] |= 2u;
478  }
479 };
480 
481 Node::Node(::PROTOBUF_NAMESPACE_ID::Arena* arena,
482  bool is_message_owned)
483  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
484  SharedCtor();
485  if (!is_message_owned) {
486  RegisterArenaDtor(arena);
487  }
488  // @@protoc_insertion_point(arena_constructor:operations_research.Node)
489 }
490 Node::Node(const Node& from)
491  : ::PROTOBUF_NAMESPACE_ID::Message(),
492  _has_bits_(from._has_bits_) {
493  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
494  ::memcpy(&id_, &from.id_,
495  static_cast<size_t>(reinterpret_cast<char*>(&supply_) -
496  reinterpret_cast<char*>(&id_)) + sizeof(supply_));
497  // @@protoc_insertion_point(copy_constructor:operations_research.Node)
498 }
499 
500 inline void Node::SharedCtor() {
501 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
502  reinterpret_cast<char*>(&id_) - reinterpret_cast<char*>(this)),
503  0, static_cast<size_t>(reinterpret_cast<char*>(&supply_) -
504  reinterpret_cast<char*>(&id_)) + sizeof(supply_));
505 }
506 
508  // @@protoc_insertion_point(destructor:operations_research.Node)
509  if (GetArenaForAllocation() != nullptr) return;
510  SharedDtor();
511  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
512 }
513 
514 inline void Node::SharedDtor() {
515  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
516 }
517 
518 void Node::ArenaDtor(void* object) {
519  Node* _this = reinterpret_cast< Node* >(object);
520  (void)_this;
521 }
522 void Node::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
523 }
524 void Node::SetCachedSize(int size) const {
525  _cached_size_.Set(size);
526 }
527 
528 void Node::Clear() {
529 // @@protoc_insertion_point(message_clear_start:operations_research.Node)
530  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
531  // Prevent compiler warnings about cached_has_bits being unused
532  (void) cached_has_bits;
533 
534  cached_has_bits = _has_bits_[0];
535  if (cached_has_bits & 0x00000003u) {
536  ::memset(&id_, 0, static_cast<size_t>(
537  reinterpret_cast<char*>(&supply_) -
538  reinterpret_cast<char*>(&id_)) + sizeof(supply_));
539  }
540  _has_bits_.Clear();
541  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
542 }
543 
544 const char* Node::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
545 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
546  _Internal::HasBits has_bits{};
547  while (!ctx->Done(&ptr)) {
548  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
549  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
550  switch (tag >> 3) {
551  // optional int64 id = 1;
552  case 1:
553  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
554  _Internal::set_has_id(&has_bits);
555  id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
556  CHK_(ptr);
557  } else goto handle_unusual;
558  continue;
559  // optional int64 supply = 2 [default = 0];
560  case 2:
561  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
562  _Internal::set_has_supply(&has_bits);
563  supply_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
564  CHK_(ptr);
565  } else goto handle_unusual;
566  continue;
567  default: {
568  handle_unusual:
569  if ((tag == 0) || ((tag & 7) == 4)) {
570  CHK_(ptr);
571  ctx->SetLastTag(tag);
572  goto success;
573  }
574  ptr = UnknownFieldParse(tag,
575  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
576  ptr, ctx);
577  CHK_(ptr != nullptr);
578  continue;
579  }
580  } // switch
581  } // while
582 success:
583  _has_bits_.Or(has_bits);
584  return ptr;
585 failure:
586  ptr = nullptr;
587  goto success;
588 #undef CHK_
589 }
590 
591 ::PROTOBUF_NAMESPACE_ID::uint8* Node::_InternalSerialize(
592  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
593  // @@protoc_insertion_point(serialize_to_array_start:operations_research.Node)
594  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
595  (void) cached_has_bits;
596 
597  cached_has_bits = _has_bits_[0];
598  // optional int64 id = 1;
599  if (cached_has_bits & 0x00000001u) {
600  target = stream->EnsureSpace(target);
601  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_id(), target);
602  }
603 
604  // optional int64 supply = 2 [default = 0];
605  if (cached_has_bits & 0x00000002u) {
606  target = stream->EnsureSpace(target);
607  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_supply(), target);
608  }
609 
610  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
611  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
612  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
613  }
614  // @@protoc_insertion_point(serialize_to_array_end:operations_research.Node)
615  return target;
616 }
617 
618 size_t Node::ByteSizeLong() const {
619 // @@protoc_insertion_point(message_byte_size_start:operations_research.Node)
620  size_t total_size = 0;
621 
622  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
623  // Prevent compiler warnings about cached_has_bits being unused
624  (void) cached_has_bits;
625 
626  cached_has_bits = _has_bits_[0];
627  if (cached_has_bits & 0x00000003u) {
628  // optional int64 id = 1;
629  if (cached_has_bits & 0x00000001u) {
630  total_size += 1 +
631  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
632  this->_internal_id());
633  }
634 
635  // optional int64 supply = 2 [default = 0];
636  if (cached_has_bits & 0x00000002u) {
637  total_size += 1 +
638  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
639  this->_internal_supply());
640  }
641 
642  }
643  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
644  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
645  _internal_metadata_, total_size, &_cached_size_);
646  }
647  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
648  SetCachedSize(cached_size);
649  return total_size;
650 }
651 
652 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Node::_class_data_ = {
653  ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
654  Node::MergeImpl
655 };
656 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Node::GetClassData() const { return &_class_data_; }
657 
658 void Node::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
659  const ::PROTOBUF_NAMESPACE_ID::Message&from) {
660  static_cast<Node *>(to)->MergeFrom(
661  static_cast<const Node &>(from));
662 }
663 
664 
665 void Node::MergeFrom(const Node& from) {
666 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.Node)
667  GOOGLE_DCHECK_NE(&from, this);
668  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
669  (void) cached_has_bits;
670 
671  cached_has_bits = from._has_bits_[0];
672  if (cached_has_bits & 0x00000003u) {
673  if (cached_has_bits & 0x00000001u) {
674  id_ = from.id_;
675  }
676  if (cached_has_bits & 0x00000002u) {
677  supply_ = from.supply_;
678  }
679  _has_bits_[0] |= cached_has_bits;
680  }
681  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
682 }
683 
684 void Node::CopyFrom(const Node& from) {
685 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.Node)
686  if (&from == this) return;
687  Clear();
688  MergeFrom(from);
689 }
690 
691 bool Node::IsInitialized() const {
692  return true;
693 }
694 
695 void Node::InternalSwap(Node* other) {
696  using std::swap;
697  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
698  swap(_has_bits_[0], other->_has_bits_[0]);
699  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
700  PROTOBUF_FIELD_OFFSET(Node, supply_)
701  + sizeof(Node::supply_)
702  - PROTOBUF_FIELD_OFFSET(Node, id_)>(
703  reinterpret_cast<char*>(&id_),
704  reinterpret_cast<char*>(&other->id_));
705 }
706 
707 ::PROTOBUF_NAMESPACE_ID::Metadata Node::GetMetadata() const {
708  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
711 }
712 
713 // ===================================================================
714 
716  public:
717  using HasBits = decltype(std::declval<FlowModel>()._has_bits_);
718  static void set_has_problem_type(HasBits* has_bits) {
719  (*has_bits)[0] |= 1u;
720  }
721 };
722 
723 FlowModel::FlowModel(::PROTOBUF_NAMESPACE_ID::Arena* arena,
724  bool is_message_owned)
725  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
726  node_(arena),
727  arc_(arena) {
728  SharedCtor();
729  if (!is_message_owned) {
730  RegisterArenaDtor(arena);
731  }
732  // @@protoc_insertion_point(arena_constructor:operations_research.FlowModel)
733 }
735  : ::PROTOBUF_NAMESPACE_ID::Message(),
736  _has_bits_(from._has_bits_),
737  node_(from.node_),
738  arc_(from.arc_) {
739  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
740  problem_type_ = from.problem_type_;
741  // @@protoc_insertion_point(copy_constructor:operations_research.FlowModel)
742 }
743 
744 inline void FlowModel::SharedCtor() {
745 problem_type_ = 2;
746 }
747 
749  // @@protoc_insertion_point(destructor:operations_research.FlowModel)
750  if (GetArenaForAllocation() != nullptr) return;
751  SharedDtor();
752  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
753 }
754 
755 inline void FlowModel::SharedDtor() {
756  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
757 }
758 
759 void FlowModel::ArenaDtor(void* object) {
760  FlowModel* _this = reinterpret_cast< FlowModel* >(object);
761  (void)_this;
762 }
763 void FlowModel::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
764 }
765 void FlowModel::SetCachedSize(int size) const {
766  _cached_size_.Set(size);
767 }
768 
770 // @@protoc_insertion_point(message_clear_start:operations_research.FlowModel)
771  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
772  // Prevent compiler warnings about cached_has_bits being unused
773  (void) cached_has_bits;
774 
775  node_.Clear();
776  arc_.Clear();
777  problem_type_ = 2;
778  _has_bits_.Clear();
779  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
780 }
781 
782 const char* FlowModel::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
783 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
784  _Internal::HasBits has_bits{};
785  while (!ctx->Done(&ptr)) {
786  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
787  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
788  switch (tag >> 3) {
789  // repeated .operations_research.Node node = 1;
790  case 1:
791  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
792  ptr -= 1;
793  do {
794  ptr += 1;
795  ptr = ctx->ParseMessage(_internal_add_node(), ptr);
796  CHK_(ptr);
797  if (!ctx->DataAvailable(ptr)) break;
798  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
799  } else goto handle_unusual;
800  continue;
801  // repeated .operations_research.Arc arc = 2;
802  case 2:
803  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
804  ptr -= 1;
805  do {
806  ptr += 1;
807  ptr = ctx->ParseMessage(_internal_add_arc(), ptr);
808  CHK_(ptr);
809  if (!ctx->DataAvailable(ptr)) break;
810  } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
811  } else goto handle_unusual;
812  continue;
813  // optional .operations_research.FlowModel.ProblemType problem_type = 3 [default = MIN_COST_FLOW];
814  case 3:
815  if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
816  ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
817  CHK_(ptr);
818  if (PROTOBUF_PREDICT_TRUE(::operations_research::FlowModel_ProblemType_IsValid(val))) {
819  _internal_set_problem_type(static_cast<::operations_research::FlowModel_ProblemType>(val));
820  } else {
821  ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
822  }
823  } else goto handle_unusual;
824  continue;
825  default: {
826  handle_unusual:
827  if ((tag == 0) || ((tag & 7) == 4)) {
828  CHK_(ptr);
829  ctx->SetLastTag(tag);
830  goto success;
831  }
832  ptr = UnknownFieldParse(tag,
833  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
834  ptr, ctx);
835  CHK_(ptr != nullptr);
836  continue;
837  }
838  } // switch
839  } // while
840 success:
841  _has_bits_.Or(has_bits);
842  return ptr;
843 failure:
844  ptr = nullptr;
845  goto success;
846 #undef CHK_
847 }
848 
849 ::PROTOBUF_NAMESPACE_ID::uint8* FlowModel::_InternalSerialize(
850  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
851  // @@protoc_insertion_point(serialize_to_array_start:operations_research.FlowModel)
852  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
853  (void) cached_has_bits;
854 
855  // repeated .operations_research.Node node = 1;
856  for (unsigned int i = 0,
857  n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
858  target = stream->EnsureSpace(target);
859  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
860  InternalWriteMessage(1, this->_internal_node(i), target, stream);
861  }
862 
863  // repeated .operations_research.Arc arc = 2;
864  for (unsigned int i = 0,
865  n = static_cast<unsigned int>(this->_internal_arc_size()); i < n; i++) {
866  target = stream->EnsureSpace(target);
867  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
868  InternalWriteMessage(2, this->_internal_arc(i), target, stream);
869  }
870 
871  cached_has_bits = _has_bits_[0];
872  // optional .operations_research.FlowModel.ProblemType problem_type = 3 [default = MIN_COST_FLOW];
873  if (cached_has_bits & 0x00000001u) {
874  target = stream->EnsureSpace(target);
875  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
876  3, this->_internal_problem_type(), target);
877  }
878 
879  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
880  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
881  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
882  }
883  // @@protoc_insertion_point(serialize_to_array_end:operations_research.FlowModel)
884  return target;
885 }
886 
887 size_t FlowModel::ByteSizeLong() const {
888 // @@protoc_insertion_point(message_byte_size_start:operations_research.FlowModel)
889  size_t total_size = 0;
890 
891  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
892  // Prevent compiler warnings about cached_has_bits being unused
893  (void) cached_has_bits;
894 
895  // repeated .operations_research.Node node = 1;
896  total_size += 1UL * this->_internal_node_size();
897  for (const auto& msg : this->node_) {
898  total_size +=
899  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
900  }
901 
902  // repeated .operations_research.Arc arc = 2;
903  total_size += 1UL * this->_internal_arc_size();
904  for (const auto& msg : this->arc_) {
905  total_size +=
906  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
907  }
908 
909  // optional .operations_research.FlowModel.ProblemType problem_type = 3 [default = MIN_COST_FLOW];
910  cached_has_bits = _has_bits_[0];
911  if (cached_has_bits & 0x00000001u) {
912  total_size += 1 +
913  ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_problem_type());
914  }
915 
916  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
917  return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
918  _internal_metadata_, total_size, &_cached_size_);
919  }
920  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
921  SetCachedSize(cached_size);
922  return total_size;
923 }
924 
925 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FlowModel::_class_data_ = {
926  ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
927  FlowModel::MergeImpl
928 };
929 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FlowModel::GetClassData() const { return &_class_data_; }
930 
931 void FlowModel::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
932  const ::PROTOBUF_NAMESPACE_ID::Message&from) {
933  static_cast<FlowModel *>(to)->MergeFrom(
934  static_cast<const FlowModel &>(from));
935 }
936 
937 
938 void FlowModel::MergeFrom(const FlowModel& from) {
939 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.FlowModel)
940  GOOGLE_DCHECK_NE(&from, this);
941  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
942  (void) cached_has_bits;
943 
944  node_.MergeFrom(from.node_);
945  arc_.MergeFrom(from.arc_);
946  if (from._internal_has_problem_type()) {
947  _internal_set_problem_type(from._internal_problem_type());
948  }
949  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
950 }
951 
952 void FlowModel::CopyFrom(const FlowModel& from) {
953 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.FlowModel)
954  if (&from == this) return;
955  Clear();
956  MergeFrom(from);
957 }
958 
960  return true;
961 }
962 
963 void FlowModel::InternalSwap(FlowModel* other) {
964  using std::swap;
965  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
966  swap(_has_bits_[0], other->_has_bits_[0]);
967  node_.InternalSwap(&other->node_);
968  arc_.InternalSwap(&other->arc_);
969  swap(problem_type_, other->problem_type_);
970 }
971 
972 ::PROTOBUF_NAMESPACE_ID::Metadata FlowModel::GetMetadata() const {
973  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
976 }
977 
978 // @@protoc_insertion_point(namespace_scope)
979 } // namespace operations_research
980 PROTOBUF_NAMESPACE_OPEN
982  return Arena::CreateMessageInternal< ::operations_research::Arc >(arena);
983 }
984 template<> PROTOBUF_NOINLINE ::operations_research::Node* Arena::CreateMaybeMessage< ::operations_research::Node >(Arena* arena) {
985  return Arena::CreateMessageInternal< ::operations_research::Node >(arena);
986 }
987 template<> PROTOBUF_NOINLINE ::operations_research::FlowModel* Arena::CreateMaybeMessage< ::operations_research::FlowModel >(Arena* arena) {
988  return Arena::CreateMessageInternal< ::operations_research::FlowModel >(arena);
989 }
990 PROTOBUF_NAMESPACE_CLOSE
991 
992 // @@protoc_insertion_point(global_scope)
993 #include <google/protobuf/port_undef.inc>
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ortools_2fgraph_2fflow_5fproblem_2eproto::offsets [] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
static const ClassData _class_data_
static void set_has_capacity(HasBits *has_bits)
friend void swap(Node &a, Node &b)
::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[]
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * FlowModel_ProblemType_descriptor()
static const ClassData _class_data_
void MergeFrom(const Arc &from)
void swap(IdMap< K, V > &a, IdMap< K, V > &b)
Definition: id_map.h:263
static constexpr ProblemType ProblemType_MAX
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE ::operations_research::Arc * Arena::CreateMaybeMessage< ::operations_research::Arc >(Arena *arena)
static constexpr ProblemType LINEAR_SUM_ASSIGNMENT
::PROTOBUF_NAMESPACE_ID::uint8 * _InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
void CopyFrom(const Arc &from)
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto
size_t ByteSizeLong() const final
static void set_has_problem_type(HasBits *has_bits)
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlowModelDefaultTypeInternal _FlowModel_default_instance_
::PROTOBUF_NAMESPACE_ID::uint8 * _InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]
void CopyFrom(const FlowModel &from)
PROTOBUF_ATTRIBUTE_WEAKconst ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable * descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto_getter()
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ArcDefaultTypeInternal _Arc_default_instance_
PROTOBUF_NOINLINE ::operations_research::Node * Arena::CreateMaybeMessage< ::operations_research::Node >(Arena *arena)
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static const ClassData _class_data_
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static constexpr ProblemType ProblemType_MIN
static void set_has_id(HasBits *has_bits)
static constexpr int ProblemType_ARRAYSIZE
void CopyFrom(const Node &from)
static void set_has_head_node_id(HasBits *has_bits)
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDefaultTypeInternal _Node_default_instance_
size_t ByteSizeLong() const final
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
void MergeFrom(const FlowModel &from)
PROTOBUF_NOINLINE ::operations_research::FlowModel * Arena::CreateMaybeMessage< ::operations_research::FlowModel >(Arena *arena)
size_t ByteSizeLong() const final
decltype(std::declval< Arc >()._has_bits_) HasBits
static constexpr ProblemType MAX_FLOW
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
friend void swap(Arc &a, Arc &b)
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet * mutable_unknown_fields()
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
std::pair< int64_t, int64_t > Arc
Definition: search.cc:3383
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
static void set_has_supply(HasBits *has_bits)
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
bool IsInitialized() const final
Collection of objects used to extend the Constraint Solver library.
static void set_has_tail_node_id(HasBits *has_bits)
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto_once
bool IsInitialized() const final
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
static void set_has_unit_cost(HasBits *has_bits)
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fgraph_2fflow_5fproblem_2eproto[3]
decltype(std::declval< FlowModel >()._has_bits_) HasBits
static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema * schemas
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * file_level_enum_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto[1]
decltype(std::declval< Node >()._has_bits_) HasBits
friend void swap(FlowModel &a, FlowModel &b)
int64_t value
#define CHK_(x)
::PROTOBUF_NAMESPACE_ID::uint8 * _InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static constexpr ProblemType MIN_COST_FLOW
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto
void MergeFrom(const Node &from)
bool FlowModel_ProblemType_IsValid(int value)