Go to the documentation of this file. 1 #ifndef GRAPH_ANALYSIS_ALGORITHMS_CONSTRAINT_VIOLATION_HPP
2 #define GRAPH_ANALYSIS_ALGORITHMS_CONSTRAINT_VIOLATION_HPP
10 namespace algorithms {
38 static std::map<Type, std::string>
TypeTxt;
141 std::string
toString(
size_t indent = 0)
const;
147 static std::string
toString(
const std::vector<ConstraintViolation>& flaws,
size_t indent = 0);
153 static std::string
toString(
const std::set<uint32_t>& commodities);
158 std::set<uint32_t> mCommodities;
167 #endif // GRAPH_ANALYSIS_ALGORITHMS_CONSTRAINT_VIOLATION_HPP
int32_t getDelta() const
Definition: ConstraintViolation.hpp:128
Type
Definition: ConstraintViolation.hpp:21
const Edge::Ptr & getEdge() const
Definition: ConstraintViolation.hpp:122
@ TotalTransFlow
Definition: ConstraintViolation.hpp:34
@ TotalMinFlow
Definition: ConstraintViolation.hpp:31
@ FlowBalance
Inflow does not equal Outflow.
Definition: ConstraintViolation.hpp:23
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
shared_ptr< Edge > Ptr
Definition: Edge.hpp:21
Representation of ConstraintViolation in a min-cost flow problem.
Definition: ConstraintViolation.hpp:18
ConstraintViolation(const MultiCommodityVertex::Ptr &v, uint32_t commodity, int32_t delta, uint32_t inFlow, uint32_t outFlow, Type type=MinFlow)
Definition: ConstraintViolation.cpp:14
uint32_t getInFlow() const
Definition: ConstraintViolation.hpp:96
const std::set< uint32_t > & getCommodities() const
Definition: ConstraintViolation.hpp:108
uint32_t getOutFlow() const
Definition: ConstraintViolation.hpp:102
@ TransFlow
Definition: ConstraintViolation.hpp:28
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
Type getType() const
Definition: ConstraintViolation.hpp:134
shared_ptr< MultiCommodityEdge > Ptr
Definition: MultiCommodityEdge.hpp:17
const Vertex::Ptr & getVertex() const
Definition: ConstraintViolation.hpp:115
static std::map< Type, std::string > TypeTxt
The string representation for each type.
Definition: ConstraintViolation.hpp:38
shared_ptr< MultiCommodityVertex > Ptr
Definition: MultiCommodityVertex.hpp:20
@ MinFlow
The minimum required flow (for a single commodity) is not available.
Definition: ConstraintViolation.hpp:25
uint32_t getCommodity() const
Definition: ConstraintViolation.cpp:106
std::string toString(size_t indent=0) const
Definition: ConstraintViolation.cpp:60