Newer
Older
// Copyright (c) 2017 Czech Technical University in Prague | Faculty of Information Technology. All rights reserved.
#pragma once
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <alib/set>
#include <alib/pair>
#include <alib/vector>
#include <functional>
#include "GridBase.hpp"
namespace grid {
template<typename TCoordinate, typename TEdge>
class GridInterface : public GridBase {
// ---------------------------------------------------------------------------------------------------------------------
public:
using coordinate_type = TCoordinate;
using edge_type = TEdge;
using node_type = ext::pair<TCoordinate, TCoordinate>;
// ---------------------------------------------------------------------------------------------------------------------
virtual size_t nodeCount() const = 0;
virtual size_t edgeCount() const = 0;
// ---------------------------------------------------------------------------------------------------------------------
virtual ext::set<node_type> getNodes() const = 0;
virtual ext::vector<TEdge> getEdges() const = 0;
// ---------------------------------------------------------------------------------------------------------------------
virtual ext::set<node_type> successors(const node_type &n) const = 0;
virtual ext::vector<TEdge> successorEdges(const node_type &n) const = 0;
virtual ext::set<node_type> predecessors(const node_type &n) const = 0;
virtual ext::vector<TEdge> predecessorEdges(const node_type &n) const = 0;
// ---------------------------------------------------------------------------------------------------------------------
virtual std::string name() const = 0;
// ---------------------------------------------------------------------------------------------------------------------
};
// =====================================================================================================================
}