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.
 
 
 

32 lines
646 B

#pragma once
#include "Arc.h"
#include "GraphParser.h"
#define UNDEF_LEVEL -1
class Vertex {
public:
Vertex();
Vertex(const int &id);
VertexID getID() const;
std::vector<Arc> getOutgoingArcs() const;
int getLevel() const;
bool visited() const;
bool hasDefinedLevel() const;
void addOutgoingArc(const Arc &arc);
void setLevel(const int &level);
void setVisited(const bool &visited = true);
private:
VertexID m_id;
int m_level;
bool m_visited;
std::vector<Arc> m_outgoing_arcs;
};
inline bool operator<(const Vertex& lhs, const Vertex& rhs) {
return lhs.getID() < rhs.getID();
}