Graph: Generic attributed relational graphs


Vertex Class Reference

Vertices are created and managed by Graphs. More...

#include <graph/graph/vertex.h>

Inheritance diagram for Vertex:
Collaboration diagram for Vertex:

Public Types

typedef ESet::value_type value_type
 
typedef ESet::pointer pointer
 pointer is absent from MS Visual C++ / Intel Win32 More...
 
typedef ESet::reference reference
 
typedef ESet::const_reference const_reference
 
typedef ESet::iterator iterator
 
typedef ESet::const_iterator const_iterator
 
typedef ESet::reverse_iterator reverse_iterator
 
typedef
ESet::const_reverse_iterator 
const_reverse_iterator
 
- Public Types inherited from carto::SyntaxedObject< class >
typedef
internal::SyntaxedObjectSwitch
< T, SUPERSUBCLASS(Interface,
T)>::ContentType 
ContentType
 

Public Member Functions

Iterators iterate on the edges
iterator begin ()
 Get the beginning of the edge collection. More...
 
iterator end ()
 Get the end of the edge collection. More...
 
const_iterator begin () const
 Get the beginning of the edge collection. More...
 
const_iterator end () const
 Get the end of the edge collection. More...
 
reverse_iterator rbegin ()
 Get the beginning of the reversed edge collection. More...
 
reverse_iterator rend ()
 Get the end of the reversed edge collection. More...
 
const_reverse_iterator rbegin () const
 Get the beginning of the reversed edge collection. More...
 
const_reverse_iterator rend () const
 Get the end of the reversed edge collection. More...
 
Neighbours
std::set< Vertex * > neighbours () const
 Same as outNeighbours. More...
 
std::set< Vertex * > inNeighbours () const
 Find the vertices for which this vertex is the sink. More...
 
std::set< Vertex * > outNeighbours () const
 Find the vertices for which this vertex is the source. More...
 
VertexrandomNeighbour () const
 Return a random neighbour (CAUTION! not perfectly random) More...
 
- Public Member Functions inherited from GraphObject
virtual ~GraphObject ()
 
- Public Member Functions inherited from carto::SyntaxedObject< class >
 SyntaxedObject (const std::string &s)
 
 SyntaxedObject (const SyntaxedObject &x)
 

Friends

Friends
class Graph
 export addEdge and removeEdge More...
 
class GraphFactory
 export the constructors More...
 

Constructors, Destructor

virtual ~Vertex ()
 
 Vertex (std::string s)
 The programmer should not call the constructor. More...
 
 Vertex (const Vertex &x)
 The programmer should not call the copy constructor. More...
 
virtual VertexcloneVertex () const
 The programmer should not clone. More...
 

Edge handling

size_t size () const __attribute__((__deprecated__("use edgeSize() for ""the number of edges. In a future release
 
size_t size () will return the" "number properties as it does in GenericObject")))
 
size_t edgesSize () const
 The edgesSize of a vertex is the number of attached edges. More...
 
bool hasEdge (const Edge *edge) const
 Is a given edge attached to this vertex? More...
 
std::set< Edge * > edgesTo (const Vertex *vertex) const
 Returns the edges linking this vertex to a given vertex. More...
 

Additional Inherited Members

- Protected Member Functions inherited from GraphObject
 GraphObject (const std::string &s)
 The programmer should not call the constructor of an abstract base class. More...
 
 GraphObject (const GraphObject &x)
 

Detailed Description

Vertices are created and managed by Graphs.

See Graph for vertex creation.

Definition at line 63 of file vertex.h.

Member Typedef Documentation

typedef ESet::const_iterator Vertex::const_iterator

Definition at line 79 of file vertex.h.

typedef ESet::const_reference Vertex::const_reference

Definition at line 77 of file vertex.h.

typedef ESet::const_reverse_iterator Vertex::const_reverse_iterator

Definition at line 81 of file vertex.h.

typedef ESet::iterator Vertex::iterator

Definition at line 78 of file vertex.h.

typedef ESet::pointer Vertex::pointer

pointer is absent from MS Visual C++ / Intel Win32

Definition at line 74 of file vertex.h.

typedef ESet::reference Vertex::reference

Definition at line 76 of file vertex.h.

typedef ESet::reverse_iterator Vertex::reverse_iterator

Definition at line 80 of file vertex.h.

typedef ESet::value_type Vertex::value_type

Definition at line 71 of file vertex.h.

Constructor & Destructor Documentation

virtual Vertex::~Vertex ( )
virtual
Vertex::Vertex ( std::string  s)
protected

The programmer should not call the constructor.

Parameters
ssyntactic attribute of the new vertex
See also
Graph for creating vertices
Vertex::Vertex ( const Vertex x)
protected

The programmer should not call the copy constructor.

Parameters
xvertex to clone
See also
Graph for creating vertices

Member Function Documentation

Vertex::iterator Vertex::begin ( )
inline

Get the beginning of the edge collection.

Returns
an iterator pointing to the beginning of the edge collection

Definition at line 290 of file vertex.h.

References begin().

Referenced by begin().

Vertex::const_iterator Vertex::begin ( ) const
inline

Get the beginning of the edge collection.

Returns
a const_iterator pointing to the beginning of the edge collection

Definition at line 306 of file vertex.h.

virtual Vertex* Vertex::cloneVertex ( ) const
protectedvirtual

The programmer should not clone.

Returns
a copy of this vertex
See also
Graph for creating vertices
size_t Vertex::edgesSize ( ) const

The edgesSize of a vertex is the number of attached edges.

Returns
the number of edges attached to the vertex
std::set<Edge*> Vertex::edgesTo ( const Vertex vertex) const

Returns the edges linking this vertex to a given vertex.

Parameters
vertexis the sink vertex
Returns
the set of vertices for which this vertex is the source and vertex is the sink
Vertex::iterator Vertex::end ( )
inline

Get the end of the edge collection.

Returns
an iterator pointing to the end of the edge collection

Definition at line 298 of file vertex.h.

Vertex::const_iterator Vertex::end ( ) const
inline

Get the end of the edge collection.

Returns
a const_iterator pointing to the end of the edge collection

Definition at line 314 of file vertex.h.

bool Vertex::hasEdge ( const Edge edge) const

Is a given edge attached to this vertex?

Parameters
edgetested edge
Returns
true if the edge is attached to this vertex
std::set<Vertex*> Vertex::inNeighbours ( ) const

Find the vertices for which this vertex is the sink.

Returns
the set of vertices for which this vertex is the sink
std::set< Vertex * > Vertex::neighbours ( ) const
inline

Same as outNeighbours.

Still don't know why it works with directed edges!

Definition at line 354 of file vertex.h.

std::set<Vertex*> Vertex::outNeighbours ( ) const

Find the vertices for which this vertex is the source.

Returns
the set of vertices for which this vertex is the source
Vertex* Vertex::randomNeighbour ( ) const

Return a random neighbour (CAUTION! not perfectly random)

Returns
a random neighbour
Vertex::reverse_iterator Vertex::rbegin ( )
inline

Get the beginning of the reversed edge collection.

Returns
a reverse_iterator pointing to the beginning of the reversed edge collection

Definition at line 322 of file vertex.h.

Vertex::const_reverse_iterator Vertex::rbegin ( ) const
inline

Get the beginning of the reversed edge collection.

Returns
a const_reverse_iterator pointing to the end of the reversed edge collection

Definition at line 338 of file vertex.h.

Vertex::reverse_iterator Vertex::rend ( )
inline

Get the end of the reversed edge collection.

Returns
a reverse_iterator pointing to the end of the reversed edge collection

Definition at line 330 of file vertex.h.

Vertex::const_reverse_iterator Vertex::rend ( ) const
inline

Get the end of the reversed edge collection.

Returns
a const_reverse_iterator pointing to the end of the reversed edge collection

Definition at line 346 of file vertex.h.

size_t Vertex::size ( ) const
Deprecated:
{specialization deprecated because ambiguous: use edgeSize() for the number of edges. In a future release, size() will return the number properties as it does in GenericObject}
size_t Vertex::size ( )

Friends And Related Function Documentation

friend class Graph
friend

export addEdge and removeEdge

Definition at line 241 of file vertex.h.

friend class GraphFactory
friend

export the constructors

Definition at line 243 of file vertex.h.


The documentation for this class was generated from the following file: