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>
16#include <google/protobuf/port_def.inc>
18PROTOBUF_PRAGMA_INIT_SEG
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}){}
36 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
38 , supply_(int64_t{0}){}
49 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
118const char descriptor_table_protodef_ortools_2fgraph_2fflow_5fproblem_2eproto[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
119 "\n ortools/graph/flow_problem.proto\022\023oper"
120 "ations_research\"\\\n\003Arc\022\024\n\014tail_node_id\030\001"
121 " \001(\003\022\024\n\014head_node_id\030\002 \001(\003\022\023\n\010capacity\030\003"
122 " \001(\003:\0011\022\024\n\tunit_cost\030\004 \001(\003:\0010\"%\n\004Node\022\n\n"
123 "\002id\030\001 \001(\003\022\021\n\006supply\030\002 \001(\003:\0010\"\367\001\n\tFlowMod"
124 "el\022\'\n\004node\030\001 \003(\0132\031.operations_research.N"
125 "ode\022%\n\003arc\030\002 \003(\0132\030.operations_research.A"
126 "rc\022O\n\014problem_type\030\003 \001(\0162*.operations_re"
127 "search.FlowModel.ProblemType:\rMIN_COST_F"
128 "LOW\"I\n\013ProblemType\022\031\n\025LINEAR_SUM_ASSIGNM"
129 "ENT\020\000\022\014\n\010MAX_FLOW\020\001\022\021\n\rMIN_COST_FLOW\020\002"
133 false,
false, 438, descriptor_table_protodef_ortools_2fgraph_2fflow_5fproblem_2eproto,
"ortools/graph/flow_problem.proto",
160#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
171class Arc::_Internal {
173 using HasBits =
decltype(std::declval<Arc>()._has_bits_);
175 (*has_bits)[0] |= 1u;
178 (*has_bits)[0] |= 2u;
181 (*has_bits)[0] |= 8u;
184 (*has_bits)[0] |= 4u;
189 bool is_message_owned)
190 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
192 if (!is_message_owned) {
193 RegisterArenaDtor(arena);
198 : ::PROTOBUF_NAMESPACE_ID::Message(),
199 _has_bits_(from._has_bits_) {
200 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
201 ::memcpy(&tail_node_id_, &from.tail_node_id_,
202 static_cast<size_t>(
reinterpret_cast<char*
>(&capacity_) -
203 reinterpret_cast<char*
>(&tail_node_id_)) +
sizeof(capacity_));
207void Arc::SharedCtor() {
208::memset(
reinterpret_cast<char*
>(
this) +
static_cast<size_t>(
209 reinterpret_cast<char*
>(&tail_node_id_) -
reinterpret_cast<char*
>(
this)),
210 0,
static_cast<size_t>(
reinterpret_cast<char*
>(&unit_cost_) -
211 reinterpret_cast<char*
>(&tail_node_id_)) +
sizeof(unit_cost_));
212capacity_ = int64_t{1};
217 if (GetArenaForAllocation() !=
nullptr)
return;
219 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
222inline void Arc::SharedDtor() {
223 GOOGLE_DCHECK(GetArenaForAllocation() ==
nullptr);
226void Arc::ArenaDtor(
void*
object) {
227 Arc* _this =
reinterpret_cast< Arc*
>(object);
230void Arc::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
232void Arc::SetCachedSize(
int size)
const {
233 _cached_size_.Set(size);
238 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
240 (void) cached_has_bits;
242 cached_has_bits = _has_bits_[0];
243 if (cached_has_bits & 0x0000000fu) {
244 ::memset(&tail_node_id_, 0,
static_cast<size_t>(
245 reinterpret_cast<char*
>(&unit_cost_) -
246 reinterpret_cast<char*
>(&tail_node_id_)) +
sizeof(unit_cost_));
247 capacity_ = int64_t{1};
250 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
254#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
256 while (!ctx->Done(&ptr)) {
257 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
258 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
262 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 8)) {
264 tail_node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
271 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 16)) {
273 head_node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
280 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 24)) {
282 capacity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
289 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 32)) {
291 unit_cost_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
300 if ((tag == 0) || ((tag & 7) == 4)) {
302 ctx->SetLastTag(tag);
305 ptr = UnknownFieldParse(
307 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
309 CHK_(ptr !=
nullptr);
312 _has_bits_.Or(has_bits);
321 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream)
const {
323 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
324 (void) cached_has_bits;
326 cached_has_bits = _has_bits_[0];
328 if (cached_has_bits & 0x00000001u) {
329 target = stream->EnsureSpace(target);
330 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_tail_node_id(), target);
334 if (cached_has_bits & 0x00000002u) {
335 target = stream->EnsureSpace(target);
336 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_head_node_id(), target);
340 if (cached_has_bits & 0x00000008u) {
341 target = stream->EnsureSpace(target);
342 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_capacity(), target);
346 if (cached_has_bits & 0x00000004u) {
347 target = stream->EnsureSpace(target);
348 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_unit_cost(), target);
351 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
352 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
353 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
361 size_t total_size = 0;
363 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
365 (void) cached_has_bits;
367 cached_has_bits = _has_bits_[0];
368 if (cached_has_bits & 0x0000000fu) {
370 if (cached_has_bits & 0x00000001u) {
371 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_tail_node_id());
375 if (cached_has_bits & 0x00000002u) {
376 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_head_node_id());
380 if (cached_has_bits & 0x00000004u) {
381 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_unit_cost());
385 if (cached_has_bits & 0x00000008u) {
386 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_capacity());
390 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
394 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
399void Arc::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
400 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
402 static_cast<const Arc &
>(from));
408 GOOGLE_DCHECK_NE(&from,
this);
409 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
410 (void) cached_has_bits;
412 cached_has_bits = from._has_bits_[0];
413 if (cached_has_bits & 0x0000000fu) {
414 if (cached_has_bits & 0x00000001u) {
415 tail_node_id_ = from.tail_node_id_;
417 if (cached_has_bits & 0x00000002u) {
418 head_node_id_ = from.head_node_id_;
420 if (cached_has_bits & 0x00000004u) {
421 unit_cost_ = from.unit_cost_;
423 if (cached_has_bits & 0x00000008u) {
424 capacity_ = from.capacity_;
426 _has_bits_[0] |= cached_has_bits;
428 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
433 if (&from ==
this)
return;
442void Arc::InternalSwap(
Arc* other) {
444 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
445 swap(_has_bits_[0], other->_has_bits_[0]);
446 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
447 PROTOBUF_FIELD_OFFSET(
Arc, unit_cost_)
448 +
sizeof(Arc::unit_cost_)
449 - PROTOBUF_FIELD_OFFSET(
Arc, tail_node_id_)>(
450 reinterpret_cast<char*
>(&tail_node_id_),
451 reinterpret_cast<char*
>(&other->tail_node_id_));
452 swap(capacity_, other->capacity_);
456 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
465 using HasBits =
decltype(std::declval<Node>()._has_bits_);
467 (*has_bits)[0] |= 1u;
470 (*has_bits)[0] |= 2u;
475 bool is_message_owned)
476 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
478 if (!is_message_owned) {
479 RegisterArenaDtor(arena);
484 : ::PROTOBUF_NAMESPACE_ID::Message(),
485 _has_bits_(from._has_bits_) {
486 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
487 ::memcpy(&id_, &from.id_,
488 static_cast<size_t>(
reinterpret_cast<char*
>(&supply_) -
489 reinterpret_cast<char*
>(&id_)) +
sizeof(supply_));
493void Node::SharedCtor() {
494::memset(
reinterpret_cast<char*
>(
this) +
static_cast<size_t>(
495 reinterpret_cast<char*
>(&id_) -
reinterpret_cast<char*
>(
this)),
496 0,
static_cast<size_t>(
reinterpret_cast<char*
>(&supply_) -
497 reinterpret_cast<char*
>(&id_)) +
sizeof(supply_));
502 if (GetArenaForAllocation() !=
nullptr)
return;
504 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
507inline void Node::SharedDtor() {
508 GOOGLE_DCHECK(GetArenaForAllocation() ==
nullptr);
511void Node::ArenaDtor(
void*
object) {
512 Node* _this =
reinterpret_cast< Node*
>(object);
515void Node::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
517void Node::SetCachedSize(
int size)
const {
518 _cached_size_.Set(size);
523 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
525 (void) cached_has_bits;
527 cached_has_bits = _has_bits_[0];
528 if (cached_has_bits & 0x00000003u) {
529 ::memset(&id_, 0,
static_cast<size_t>(
530 reinterpret_cast<char*
>(&supply_) -
531 reinterpret_cast<char*
>(&id_)) +
sizeof(supply_));
534 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
538#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
540 while (!ctx->Done(&ptr)) {
541 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
542 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
546 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 8)) {
548 id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
555 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 16)) {
557 supply_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
566 if ((tag == 0) || ((tag & 7) == 4)) {
568 ctx->SetLastTag(tag);
571 ptr = UnknownFieldParse(
573 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
575 CHK_(ptr !=
nullptr);
578 _has_bits_.Or(has_bits);
587 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream)
const {
589 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
590 (void) cached_has_bits;
592 cached_has_bits = _has_bits_[0];
594 if (cached_has_bits & 0x00000001u) {
595 target = stream->EnsureSpace(target);
596 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_id(), target);
600 if (cached_has_bits & 0x00000002u) {
601 target = stream->EnsureSpace(target);
602 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_supply(), target);
605 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
606 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
607 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
615 size_t total_size = 0;
617 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
619 (void) cached_has_bits;
621 cached_has_bits = _has_bits_[0];
622 if (cached_has_bits & 0x00000003u) {
624 if (cached_has_bits & 0x00000001u) {
625 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_id());
629 if (cached_has_bits & 0x00000002u) {
630 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_supply());
634 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
638 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
643void Node::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
644 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
646 static_cast<const Node &
>(from));
652 GOOGLE_DCHECK_NE(&from,
this);
653 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
654 (void) cached_has_bits;
656 cached_has_bits = from._has_bits_[0];
657 if (cached_has_bits & 0x00000003u) {
658 if (cached_has_bits & 0x00000001u) {
661 if (cached_has_bits & 0x00000002u) {
662 supply_ = from.supply_;
664 _has_bits_[0] |= cached_has_bits;
666 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
671 if (&from ==
this)
return;
680void Node::InternalSwap(
Node* other) {
682 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
683 swap(_has_bits_[0], other->_has_bits_[0]);
684 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
685 PROTOBUF_FIELD_OFFSET(
Node, supply_)
686 +
sizeof(Node::supply_)
687 - PROTOBUF_FIELD_OFFSET(
Node, id_)>(
688 reinterpret_cast<char*
>(&id_),
689 reinterpret_cast<char*
>(&other->id_));
693 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
702 using HasBits =
decltype(std::declval<FlowModel>()._has_bits_);
704 (*has_bits)[0] |= 1u;
709 bool is_message_owned)
710 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
714 if (!is_message_owned) {
715 RegisterArenaDtor(arena);
720 : ::PROTOBUF_NAMESPACE_ID::Message(),
721 _has_bits_(from._has_bits_),
724 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
725 problem_type_ = from.problem_type_;
729void FlowModel::SharedCtor() {
735 if (GetArenaForAllocation() !=
nullptr)
return;
737 _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
740inline void FlowModel::SharedDtor() {
741 GOOGLE_DCHECK(GetArenaForAllocation() ==
nullptr);
744void FlowModel::ArenaDtor(
void*
object) {
748void FlowModel::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
750void FlowModel::SetCachedSize(
int size)
const {
751 _cached_size_.Set(size);
756 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
758 (void) cached_has_bits;
764 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
768#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
770 while (!ctx->Done(&ptr)) {
771 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
772 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
776 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 10)) {
780 ptr = ctx->ParseMessage(_internal_add_node(), ptr);
782 if (!ctx->DataAvailable(ptr))
break;
783 }
while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
789 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 18)) {
793 ptr = ctx->ParseMessage(_internal_add_arc(), ptr);
795 if (!ctx->DataAvailable(ptr))
break;
796 }
while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
802 if (PROTOBUF_PREDICT_TRUE(
static_cast<::PROTOBUF_NAMESPACE_ID::uint8
>(tag) == 24)) {
803 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
817 if ((tag == 0) || ((tag & 7) == 4)) {
819 ctx->SetLastTag(tag);
822 ptr = UnknownFieldParse(
824 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
826 CHK_(ptr !=
nullptr);
829 _has_bits_.Or(has_bits);
838 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream)
const {
840 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
841 (void) cached_has_bits;
844 for (
unsigned int i = 0,
845 n =
static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
846 target = stream->EnsureSpace(target);
847 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
848 InternalWriteMessage(1, this->_internal_node(i), target, stream);
852 for (
unsigned int i = 0,
853 n =
static_cast<unsigned int>(this->_internal_arc_size()); i < n; i++) {
854 target = stream->EnsureSpace(target);
855 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
856 InternalWriteMessage(2, this->_internal_arc(i), target, stream);
859 cached_has_bits = _has_bits_[0];
861 if (cached_has_bits & 0x00000001u) {
862 target = stream->EnsureSpace(target);
863 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
864 3, this->_internal_problem_type(), target);
867 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
868 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
869 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
877 size_t total_size = 0;
879 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
881 (void) cached_has_bits;
884 total_size += 1UL * this->_internal_node_size();
885 for (
const auto& msg : this->node_) {
887 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
891 total_size += 1UL * this->_internal_arc_size();
892 for (
const auto& msg : this->arc_) {
894 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
898 cached_has_bits = _has_bits_[0];
899 if (cached_has_bits & 0x00000001u) {
901 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_problem_type());
904 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
908 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
913void FlowModel::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
914 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
922 GOOGLE_DCHECK_NE(&from,
this);
923 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
924 (void) cached_has_bits;
926 node_.MergeFrom(from.node_);
927 arc_.MergeFrom(from.arc_);
928 if (from._internal_has_problem_type()) {
929 _internal_set_problem_type(from._internal_problem_type());
931 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
936 if (&from ==
this)
return;
945void FlowModel::InternalSwap(
FlowModel* other) {
947 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
948 swap(_has_bits_[0], other->_has_bits_[0]);
949 node_.InternalSwap(&other->node_);
950 arc_.InternalSwap(&other->arc_);
951 swap(problem_type_, other->problem_type_);
955 return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
962PROTOBUF_NAMESPACE_OPEN
964 return Arena::CreateMessageInternal< ::operations_research::Arc >(arena);
967 return Arena::CreateMessageInternal< ::operations_research::Node >(arena);
970 return Arena::CreateMessageInternal< ::operations_research::FlowModel >(arena);
972PROTOBUF_NAMESPACE_CLOSE
975#include <google/protobuf/port_undef.inc>
static void set_has_capacity(HasBits *has_bits)
static void set_has_tail_node_id(HasBits *has_bits)
static void set_has_unit_cost(HasBits *has_bits)
static void set_has_head_node_id(HasBits *has_bits)
decltype(std::declval< Arc >()._has_bits_) HasBits
friend void swap(Arc &a, Arc &b)
void MergeFrom(const Arc &from)
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static const ClassData _class_data_
void CopyFrom(const Arc &from)
bool IsInitialized() const final
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
size_t ByteSizeLong() const final
::PROTOBUF_NAMESPACE_ID::uint8 * _InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static void set_has_problem_type(HasBits *has_bits)
decltype(std::declval< FlowModel >()._has_bits_) HasBits
static constexpr ProblemType ProblemType_MAX
friend void swap(FlowModel &a, FlowModel &b)
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static const ClassData _class_data_
static constexpr int ProblemType_ARRAYSIZE
bool IsInitialized() const final
static constexpr ProblemType MIN_COST_FLOW
void CopyFrom(const FlowModel &from)
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
static constexpr ProblemType MAX_FLOW
static constexpr ProblemType ProblemType_MIN
inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet * mutable_unknown_fields()
static constexpr ProblemType LINEAR_SUM_ASSIGNMENT
void MergeFrom(const FlowModel &from)
size_t ByteSizeLong() const final
::PROTOBUF_NAMESPACE_ID::uint8 * _InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static void set_has_id(HasBits *has_bits)
decltype(std::declval< Node >()._has_bits_) HasBits
static void set_has_supply(HasBits *has_bits)
friend void swap(Node &a, Node &b)
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static const ClassData _class_data_
bool IsInitialized() const final
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
void CopyFrom(const Node &from)
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
void MergeFrom(const Node &from)
size_t ByteSizeLong() const final
::PROTOBUF_NAMESPACE_ID::uint8 * _InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static constexpr::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ortools_2fgraph_2fflow_5fproblem_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
PROTOBUF_ATTRIBUTE_WEAKconst ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable * descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto_getter()
::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[]
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto
PROTOBUF_NOINLINE::operations_research::FlowModel * Arena::CreateMaybeMessage< ::operations_research::FlowModel >(Arena *arena)
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto_once
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * file_level_enum_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto[1]
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE::operations_research::Arc * Arena::CreateMaybeMessage< ::operations_research::Arc >(Arena *arena)
PROTOBUF_NOINLINE::operations_research::Node * Arena::CreateMaybeMessage< ::operations_research::Node >(Arena *arena)
::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fgraph_2fflow_5fproblem_2eproto[3]
void swap(IdMap< K, V > &a, IdMap< K, V > &b)
Collection of objects used to extend the Constraint Solver library.
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDefaultTypeInternal _Node_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlowModelDefaultTypeInternal _FlowModel_default_instance_
bool FlowModel_ProblemType_IsValid(int value)
std::pair< int64_t, int64_t > Arc
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ArcDefaultTypeInternal _Arc_default_instance_
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor * FlowModel_ProblemType_descriptor()
static constexpr::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema * schemas
~ArcDefaultTypeInternal()
constexpr ArcDefaultTypeInternal()
~FlowModelDefaultTypeInternal()
constexpr FlowModelDefaultTypeInternal()
~NodeDefaultTypeInternal()
constexpr NodeDefaultTypeInternal()