34 #ifndef GRAPH_GRAPH_VERTEX_H
35 #define GRAPH_GRAPH_VERTEX_H
43 #ifndef GRAPH_GRAPH_GRAPHOBJECT_H
67 typedef std::set<Edge*> ESet;
101 #ifndef AIMS_GRAPH_SIZE_NO_DEPREC_WARNING
103 "the number of edges. In a future release, size() will return the "
104 "number properties as it does in GenericObject")))
190 std::set<Vertex*> neighbours()
const;
210 virtual std::string
type() const CARTO_OVERRIDE
263 void addEdge(
Edge* edge);
269 void removeEdge(
Edge* edge);
299 return _edges.begin();
315 return _edges.begin();
331 return _edges.rbegin();
339 return _edges.rend();
347 return _edges.rbegin();
355 return _edges.rend();
#define __deprecated__(msg)
The abstract base class for all types of edges; edges are created and managed by Graphs.
Default abstract factory for graphs.
The abstract base class for graphs, vertices and edges.
The base class for graphs.
Vertices are created and managed by Graphs.
ESet::reverse_iterator reverse_iterator
Vertex(std::string s)
The programmer should not call the constructor.
bool hasEdge(const Edge *edge) const
Is a given edge attached to this vertex?
std::set< Vertex * > outNeighbours() const
Find the vertices for which this vertex is the source.
size_t edgesSize() const
The edgesSize of a vertex is the number of attached edges.
virtual std::string type() const CARTO_OVERRIDE
iterator begin()
Get the beginning of the edge collection.
ESet::value_type value_type
std::set< Vertex * > inNeighbours() const
Find the vertices for which this vertex is the sink.
std::set< Edge * > edgesTo(const Vertex *vertex) const
Returns the edges linking this vertex to a given vertex.
Vertex * randomNeighbour() const
Return a random neighbour (CAUTION! not perfectly random)
iterator end()
Get the end of the edge collection.
ESet::const_reference const_reference
size_t size() const __attribute__((__deprecated__("use edgesSize() for " "the number of edges. In a future release
virtual Vertex * cloneVertex() const
The programmer should not clone.
ESet::pointer pointer
pointer is absent from MS Visual C++ / Intel Win32
reverse_iterator rend()
Get the end of the reversed edge collection.
ESet::reference reference
ESet::const_reverse_iterator const_reverse_iterator
std::set< Vertex * > neighbours() const
Same as outNeighbours.
ESet::const_iterator const_iterator
reverse_iterator rbegin()
Get the beginning of the reversed edge collection.
Vertex(const Vertex &x)
The programmer should not call the copy constructor.
#define DECLARE_GENERIC_OBJECT_TYPE(T)