graph_analysis
Public Types | Public Member Functions | Protected Attributes | List of all members
graph_analysis::TypedGraph< T, G > Class Template Reference

#include <TypedGraph.hpp>

Inheritance diagram for graph_analysis::TypedGraph< T, G >:
Inheritance graph
[legend]
Collaboration diagram for graph_analysis::TypedGraph< T, G >:
Collaboration graph
[legend]

Public Types

typedef T graph_t
 
- Public Types inherited from graph_analysis::BaseGraph
enum  ImplementationType { BOOST_DIRECTED_GRAPH, LEMON_DIRECTED_GRAPH, SNAP_DIRECTED_GRAPH, IMPLEMENTATION_TYPE_END }
 
typedef shared_ptr< BaseGraph > Ptr
 

Public Member Functions

 TypedGraph (BaseGraph::ImplementationType type, bool directed=true)
 
virtual ~TypedGraph ()
 
graph_t & raw ()
 
const graph_t & raw () const
 
- Public Member Functions inherited from graph_analysis::BaseGraph
virtual ~BaseGraph ()
 Default deconstructor. More...
 
void addObserver (const BaseGraphObserver::Ptr &observer)
 
void removeObserver (const BaseGraphObserver::Ptr &observer)
 
void transactionEvent (TransactionType eventType)
 issue a transaction event The transaction event is passed to all observers, which can implement the respective response to the transaction. E.g. rollback, hold-and-forward, etc. More...
 
virtual BaseGraph::Ptr copy () const
 
BaseGraph::Ptr clone () const
 
BaseGraph::Ptr cloneEdges () const
 
virtual BaseGraph::Ptr newInstance () const
 
ImplementationType getImplementationType () const
 
std::string getImplementationTypeName () const
 
bool empty () const
 tests whether the graph is void/empty More...
 
GraphElementId addVertex (const Vertex::Ptr &vertex)
 Add a vertex. More...
 
GraphElementId getVertexId (const Vertex::Ptr &vertex) const
 Get the vertex id for this graph. More...
 
virtual Vertex::Ptr getVertex (GraphElementId id) const
 Get the vertex by id. More...
 
void removeVertex (const Vertex::Ptr &vertex)
 Remove vertex In order to reimplement, call the base function first BaseGraph::addVertex(v) More...
 
GraphElementId addEdge (const Edge::Ptr &edge)
 Add an edge Cannot be reimplemented directly, but see addEdge(Edge::Ptr, GraphElementId, GraphElementId) More...
 
void removeEdge (const Edge::Ptr &edge)
 
virtual size_t removeEdges (const Vertex::Ptr &a, const Vertex::Ptr &b)
 
GraphElementId addHyperEdge (const HyperEdge::Ptr &hyperEdge)
 
void removeHyperEdge (const HyperEdge::Ptr &hyperEdge)
 
bool contains (const Edge::Ptr &edge) const
 
bool contains (const Vertex::Ptr &vertex) const
 
GraphElementId getEdgeId (const Edge::Ptr &edge) const
 Get the edge id for this graph. More...
 
virtual Edge::Ptr getEdge (GraphElementId id) const
 Get the edge by id. More...
 
virtual std::vector< Edge::Ptr > getEdges (const Vertex::Ptr &source, const Vertex::Ptr &target) const
 Get edge by given vertices. More...
 
template<typename T >
std::vector< shared_ptr< T > > getEdges (const Vertex::Ptr &source, const Vertex::Ptr &target) const
 Get edges by given vertices and return only edges of a given type that end at target Type should be a subclass of Edge!! If dynamic_pointer_cast returns null pointer, object is not added. More...
 
template<typename T >
std::vector< shared_ptr< T > > getVertices () const
 Get all vertices of a given type Type should be a subclass of vertex If dynamic_pointer_cast returns null pointer, object is not added. More...
 
GraphId getId () const
 
virtual VertexIterator::Ptr getVertexIterator () const
 
virtual BaseIterable< VertexIterator::Ptr, BaseGraph, Vertex::Ptr > vertices ()
 
virtual EdgeIterator::Ptr getEdgeIterator () const
 
virtual BaseIterable< EdgeIterator::Ptr, BaseGraph, Edge::Ptr > edges ()
 
virtual std::vector< Vertex::Ptr > getAllVertices () const
 
virtual std::vector< Edge::Ptr > getAllEdges () const
 
virtual EdgeIterator::Ptr getEdgeIterator (const Vertex::Ptr &vertex) const
 
void clear ()
 
size_t size () const
 
size_t order () const
 
virtual EdgeIterator::Ptr getOutEdgeIterator (const Vertex::Ptr &vertex) const
 
virtual EdgeIterator::Ptr getInEdgeIterator (const Vertex::Ptr &vertex) const
 
std::vector< Edge::Ptr > getInEdges (const Vertex::Ptr &vertex) const
 
std::vector< Edge::Ptr > getOutEdges (const Vertex::Ptr &vertex) const
 
SpecializedIterable< EdgeIterator::Ptr, BaseGraph, Edge::Ptr, Vertex::Ptr > inEdges (const Vertex::Ptr &vertex) const
 
SpecializedIterable< EdgeIterator::Ptr, BaseGraph, Edge::Ptr, Vertex::Ptr > outEdges (const Vertex::Ptr &vertex) const
 
bool isUndirected () const
 
bool isDirected () const
 
- Public Member Functions inherited from graph_analysis::VertexIterable
virtual ~VertexIterable ()
 
virtual uint64_t getVertexCount () const
 
- Public Member Functions inherited from graph_analysis::EdgeIterable
virtual ~EdgeIterable ()
 
virtual uint64_t getEdgeCount () const
 
- Public Member Functions inherited from graph_analysis::Algorithms
virtual ~Algorithms ()
 
virtual shared_ptr< SubGraph > identifyConnectedComponents (const shared_ptr< BaseGraph > &baseGraph) const
 
virtual bool isConnected () const
 

Protected Attributes

graph_t mGraph
 

Additional Inherited Members

- Static Public Member Functions inherited from graph_analysis::BaseGraph
static Ptr getInstance (ImplementationType type=LEMON_DIRECTED_GRAPH)
 
static SubGraph::Ptr getSubGraph (const Ptr &graph)
 
static SubGraph::Ptr applyFilters (const Ptr &graph, const Filter< Vertex::Ptr >::Ptr &vertexFilter, const Filter< Edge::Ptr >::Ptr &edgeFilter)
 
- Static Public Attributes inherited from graph_analysis::BaseGraph
static std::map< ImplementationType, std::string > ImplementationTypeTxt
 
- Protected Member Functions inherited from graph_analysis::BaseGraph
 BaseGraph (ImplementationType type, bool directed)
 
virtual GraphElementId addVertexInternal (const Vertex::Ptr &)
 
virtual void removeVertexInternal (const Vertex::Ptr &)
 
virtual GraphElementId addEdgeInternal (const Edge::Ptr &edge, GraphElementId sourceVertexId, GraphElementId edgeVertexId)
 
virtual void removeEdgeInternal (const Edge::Ptr &)
 
virtual SubGraph::Ptr createSubGraph (const Ptr &baseGraph) const
 

Member Typedef Documentation

◆ graph_t

template<typename T , typename G = BaseGraph>
typedef T graph_analysis::TypedGraph< T, G >::graph_t

Constructor & Destructor Documentation

◆ TypedGraph()

template<typename T , typename G = BaseGraph>
graph_analysis::TypedGraph< T, G >::TypedGraph ( BaseGraph::ImplementationType  type,
bool  directed = true 
)
inline

◆ ~TypedGraph()

template<typename T , typename G = BaseGraph>
virtual graph_analysis::TypedGraph< T, G >::~TypedGraph ( )
inlinevirtual

Member Function Documentation

◆ raw() [1/2]

template<typename T , typename G = BaseGraph>
graph_t& graph_analysis::TypedGraph< T, G >::raw ( )
inline

Return underlying raw graph instance

◆ raw() [2/2]

template<typename T , typename G = BaseGraph>
const graph_t& graph_analysis::TypedGraph< T, G >::raw ( ) const
inline

Member Data Documentation

◆ mGraph

template<typename T , typename G = BaseGraph>
graph_t graph_analysis::TypedGraph< T, G >::mGraph
protected

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