RepastHPC  2.3.1
Public Member Functions | List of all members
repast::UndirectedVertex< V, E > Class Template Reference

A vertex in an undirected network. More...

#include <UndirectedVertex.h>

Inheritance diagram for repast::UndirectedVertex< V, E >:
repast::Vertex< V, E >

Public Member Functions

 UndirectedVertex (boost::shared_ptr< V > item)
 
virtual boost::shared_ptr< E > removeEdge (Vertex< V, E > *other, EdgeType type)
 Removes the edge of the specified type between this Vertex and the specified Vertex. More...
 
virtual boost::shared_ptr< E > findEdge (Vertex< V, E > *other, EdgeType type)
 Finds the edge of the specified type between this Vertex and the specified vertex. More...
 
virtual void addEdge (Vertex< V, E > *other, boost::shared_ptr< E > edge, EdgeType type)
 Adds an edge of the specified type between this Vertex and the specified vertex. More...
 
virtual void successors (std::vector< V * > &out)
 Gets the successors of this Vertex. More...
 
virtual void predecessors (std::vector< V * > &out)
 Gets the predecessors of this Vertex. More...
 
virtual void adjacent (std::vector< V * > &out)
 Gets the Vertices adjacent to this Vertex. More...
 
virtual void edges (EdgeType type, std::vector< boost::shared_ptr< E > > &out)
 Gets all the edges of the specified type in which this Vertex participates and return them in out. More...
 
int inDegree ()
 Gets the in degree of this Vertex. More...
 
int outDegree ()
 Gets the out degree of this Vertex. More...
 
- Public Member Functions inherited from repast::Vertex< V, E >
 Vertex (boost::shared_ptr< V > item)
 Creates a Vertex that contains the specified item. More...
 
boost::shared_ptr< V > item () const
 Gets the item that this Vertex contains. More...
 

Additional Inherited Members

- Public Types inherited from repast::Vertex< V, E >
enum  EdgeType { INCOMING, OUTGOING }
 Enum the identifies whether an edge is incoming or outgoing.
 
typedef boost::unordered_map< Vertex< V, E > *, boost::shared_ptr< E >, HashVertex< V, E > > AdjListMap
 Typedef for the adjacency list map that contains the other Vertices that this Vertex links to.
 
typedef AdjListMap::iterator AdjListMapIterator
 
- Protected Member Functions inherited from repast::Vertex< V, E >
boost::shared_ptr< E > removeEdge (Vertex< V, E > *other, AdjListMap *adjMap)
 
void getItems (AdjListMap *adjMap, std::vector< V * > &out)
 
void edges (AdjListMap *adjMap, std::vector< boost::shared_ptr< E > > &out)
 
- Protected Attributes inherited from repast::Vertex< V, E >
boost::shared_ptr< V > ptr
 

Detailed Description

template<typename V, typename E>
class repast::UndirectedVertex< V, E >

A vertex in an undirected network.

Template Parameters
Vthe vertex type
Ethe edge type. The edge type must be or extend RepastEdge.

Member Function Documentation

◆ addEdge()

template<typename V , typename E >
void repast::UndirectedVertex< V, E >::addEdge ( Vertex< V, E > *  other,
boost::shared_ptr< E >  edge,
EdgeType  type 
)
virtual

Adds an edge of the specified type between this Vertex and the specified vertex.

Parameters
edgethe edge to add
otherthe other end of the edge
typethe type of edge to add

Implements repast::Vertex< V, E >.

◆ adjacent()

template<typename V , typename E >
void repast::UndirectedVertex< V, E >::adjacent ( std::vector< V * > &  out)
virtual

Gets the Vertices adjacent to this Vertex.

Parameters
[out]thevector where the adjacent vectors will be put

Implements repast::Vertex< V, E >.

◆ edges()

template<typename V , typename E >
void repast::UndirectedVertex< V, E >::edges ( EdgeType  type,
std::vector< boost::shared_ptr< E > > &  out 
)
virtual

Gets all the edges of the specified type in which this Vertex participates and return them in out.

Parameters
typethe type of edges to get
[out]wherethe edges will be put.

Implements repast::Vertex< V, E >.

◆ findEdge()

template<typename V , typename E >
boost::shared_ptr< E > repast::UndirectedVertex< V, E >::findEdge ( Vertex< V, E > *  other,
EdgeType  type 
)
virtual

Finds the edge of the specified type between this Vertex and the specified vertex.

Parameters
otherthe other end of the edge
typethe type of edge to remove
Returns
the found edge, or 0.

Implements repast::Vertex< V, E >.

◆ inDegree()

template<typename V , typename E >
int repast::UndirectedVertex< V, E >::inDegree ( )
virtual

Gets the in degree of this Vertex.

Returns
the in degree of this Vertex.

Implements repast::Vertex< V, E >.

◆ outDegree()

template<typename V , typename E >
int repast::UndirectedVertex< V, E >::outDegree ( )
virtual

Gets the out degree of this Vertex.

Returns
the out degree of this Vertex.

Implements repast::Vertex< V, E >.

◆ predecessors()

template<typename V , typename E >
void repast::UndirectedVertex< V, E >::predecessors ( std::vector< V * > &  out)
virtual

Gets the predecessors of this Vertex.

Parameters
[out]thevector where any predecessors will be put

Implements repast::Vertex< V, E >.

◆ removeEdge()

template<typename V , typename E >
boost::shared_ptr< E > repast::UndirectedVertex< V, E >::removeEdge ( Vertex< V, E > *  other,
EdgeType  type 
)
virtual

Removes the edge of the specified type between this Vertex and the specified Vertex.

Parameters
otherthe other end of the edge
typethe type of edge to remove
Returns
the removed edge if such an edge was found, otherwise 0.

Implements repast::Vertex< V, E >.

◆ successors()

template<typename V , typename E >
void repast::UndirectedVertex< V, E >::successors ( std::vector< V * > &  out)
virtual

Gets the successors of this Vertex.

Parameters
[out]thevector where any successors will be put

Implements repast::Vertex< V, E >.


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