Class Graph2D

Inheritance Relationships

Base Type

Class Documentation

class Graph2D : public f2c::types::Graph

Public Functions

Graph2D &addDirectedEdge(const Point &from, const Point &to, int64_t cost)
Graph2D &addEdge(const Point &i, const Point &j, int64_t cost)
Graph2D &addDirectedEdge(const Point &from, const Point &to)
Graph2D &addEdge(const Point &i, const Point &j)
Graph2D &addDirectedEdge(const Point &from, const Point &to, Graph2D &short_path_g)
Graph2D &addEdge(const Point &i, const Point &j, Graph2D &short_path_g)
Graph2D &removeDirectedEdge(const Point &from, const Point &to)
Graph2D &removeEdge(const Point &i, const Point &j)
size_t numNodes() const
std::vector<Point> getNodes() const
size_t nodeToIndex(const Point &p) const
Point indexToNode(size_t id) const
std::vector<std::vector<Point>> allPathsBetween(const Point &from, const Point &to) const
std::vector<Point> shortestPath(const Point &from, const Point &to, int64_t INF = 1 << 30)
int64_t shortestPathCost(const Point &from, const Point &to, int64_t INF = 1 << 30)
Graph &addDirectedEdge(size_t from, size_t to, int64_t cost)
Graph &addEdge(size_t i, size_t j, int64_t cost)
Graph &removeDirectedEdge(size_t from, size_t to)
Graph &removeEdge(size_t i, size_t j)
std::vector<std::vector<size_t>> allPathsBetween(size_t from, size_t to) const
std::vector<size_t> shortestPath(size_t from, size_t to, int64_t INF = 1e15)
int64_t shortestPathCost(size_t from, size_t to, int64_t INF = 1e15)

Protected Attributes

std::unordered_map<Point, size_t> nodes_to_index_
std::unordered_map<size_t, Point> index_to_nodes_