A simple students project implementing Dinic's Algorithm to compute the max flow/min cut of a network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
616 B

#include "Vertex.h"
Vertex::Vertex() {}
Vertex::Vertex(const int &id) : m_id(id) {}
VertexID Vertex::getID() const {
return m_id;
}
std::vector<Arc> Vertex::getOutgoingArcs() const {
return m_outgoing_arcs;
}
int Vertex::getLevel() const {
return m_level;
}
bool Vertex::visited() const {
return m_visited;
}
bool Vertex::hasDefinedLevel() const {
return m_level != UNDEF_LEVEL;
}
void Vertex::addOutgoingArc(const Arc &arc) {
m_outgoing_arcs.push_back(arc);
}
void Vertex::setLevel(const int &level) {
m_level = level;
}
void Vertex::setVisited(const bool &visited) {
m_visited = visited;
}