File kernel/src/utils/SiconosTools/SiconosGraph.hpp

Contents

File kernel/src/utils/SiconosTools/SiconosGraph.hpp#

Go to the source code of this file

Template class to define a graph of Siconos object.

Note: this needs documentation

Defines

BOOST_NO_HASH#

Enums

enum vertex_properties_t#

Values:

enumerator vertex_properties#
enum edge_properties_t#

Values:

enumerator edge_properties#
enum graph_properties_t#

Values:

enumerator graph_properties#
enum vertex_siconos_bundle_t#

Values:

enumerator vertex_siconos_bundle#
enum edge_siconos_bundle_t#

Values:

enumerator edge_siconos_bundle#
template<class V, class E, class VProperties, class EProperties, class GProperties>
class SiconosGraph

Public Types

typedef boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS> proxy_graph_t#
typedef boost::graph_traits<proxy_graph_t>::edge_descriptor EDescriptor#
typedef boost::graph_traits<proxy_graph_t>::vertex_descriptor VDescriptor#
typedef boost::adjacency_list<boost::listS, boost::listS, boost::undirectedS, boost::property<vertex_siconos_bundle_t, V, boost::property<boost::vertex_color_t, boost::default_color_type, boost::property<boost::vertex_index_t, size_t, boost::property<vertex_properties_t, VProperties>>>>, boost::property<edge_siconos_bundle_t, E, boost::property<boost::edge_color_t, boost::default_color_type, boost::property<boost::edge_index_t, size_t, boost::property<edge_properties_t, EProperties>>>>, boost::property<graph_properties_t, GProperties>> graph_t#
typedef V vertex_t#
typedef E edge_t#
typedef boost::graph_traits<graph_t>::edge_iterator EIterator#
typedef boost::graph_traits<graph_t>::vertex_iterator VIterator#
typedef boost::graph_traits<graph_t>::out_edge_iterator OEIterator#
typedef boost::graph_traits<graph_t>::adjacency_iterator AVIterator#
typedef boost::property_map<graph_t, edge_siconos_bundle_t>::type EBundleAccess#
typedef boost::property_map<graph_t, vertex_siconos_bundle_t>::type VBundleAccess#
typedef boost::property_map<graph_t, boost::edge_color_t>::type EColorAccess#
typedef boost::property_map<graph_t, boost::vertex_color_t>::type VColorAccess#
typedef boost::property_map<graph_t, boost::edge_index_t>::type EIndexAccess#
typedef boost::property_map<graph_t, boost::vertex_index_t>::type VIndexAccess#
typedef boost::property_map<graph_t, edge_properties_t>::type EPropertiesAccess#
typedef boost::property_map<graph_t, vertex_properties_t>::type VPropertiesAccess#
typedef std::unordered_map<V, VDescriptor> VMap#

Public Functions

inline SiconosGraph()

default constructor

inline ~SiconosGraph()#
inline const graph_t &storage() const#
inline std::pair<EDescriptor, bool> edge(VDescriptor u, VDescriptor v) const#
inline bool edge_exists(const VDescriptor &vd1, const VDescriptor &vd2) const#
inline std::pair<EDescriptor, EDescriptor> edges(VDescriptor u, VDescriptor v) const#
inline bool is_edge(const VDescriptor &vd1, const VDescriptor &vd2, const E &e_bundle) const#
inline bool adjacent_vertex_exists(const VDescriptor &vd) const#
inline size_t size() const#
inline size_t vertices_number() const#
inline size_t edges_number() const#
inline V &bundle(const VDescriptor &vd)#
inline const V &bundle(const VDescriptor &vd) const#
inline E &bundle(const EDescriptor &ed)#
inline const E &bundle(const EDescriptor &ed) const#
inline boost::default_color_type &color(const VDescriptor &vd)#
inline const boost::default_color_type &color(const VDescriptor &vd) const#
inline boost::default_color_type &color(const EDescriptor &ed)#
inline const boost::default_color_type &color(const EDescriptor &ed) const#
inline GProperties &properties()#
inline size_t &index(const VDescriptor &vd)#
inline const size_t &index(const VDescriptor &vd) const#
inline size_t &index(const EDescriptor &ed)#
inline const size_t &index(const EDescriptor &ed) const#
inline VProperties &properties(const VDescriptor &vd)#
inline EProperties &properties(const EDescriptor &ed)#
inline bool is_vertex(const V &vertex) const#
inline const VDescriptor &descriptor(const V &vertex) const#
inline std::pair<VIterator, VIterator> vertices() const#
inline VIterator begin() const#
inline VIterator end() const#
inline std::pair<AVIterator, AVIterator> adjacent_vertices(const VDescriptor &vd) const#
inline std::pair<EIterator, EIterator> edges() const#
inline std::pair<OEIterator, OEIterator> out_edges(const VDescriptor &vd) const#
inline VDescriptor target(const EDescriptor &ed) const#
inline VDescriptor source(const EDescriptor &ed) const#
inline VDescriptor add_vertex(const V &vertex_bundle)#
template<class G>
inline void copy_vertex(const V &vertex_bundle, G &og)#
inline void remove_vertex(const V &vertex_bundle)#
inline EDescriptor add_edge(const VDescriptor &vd1, const VDescriptor &vd2, const E &e_bundle)#
template<class AdjointG>
inline std::pair<EDescriptor, typename AdjointG::VDescriptor> add_edge(const VDescriptor &vd1, const VDescriptor &vd2, const E &e_bundle, AdjointG &ag)#
inline void remove_edge(const EDescriptor &ed)#
template<class AdjointG>
inline void remove_edge(const EDescriptor &ed, AdjointG &ag)#
template<class Predicate>
inline void remove_out_edge_if(const VDescriptor &vd, const Predicate &pred)

Remove all the out-edges of vertex u for which the predicate p returns true.

This expression is only required when the graph also models IncidenceGraph.

template<class Predicate>
inline void remove_in_edge_if(const VDescriptor &vd, const Predicate &pred)

Remove all the in-edges of vertex u for which the predicate p returns true.

This expression is only required when the graph also models IncidenceGraph.

template<class Predicate>
inline void remove_edge_if(const VDescriptor &vd, const Predicate &pred)

Remove all the in-edges of vertex u for which the predicate p returns true.

This expression is only required when the graph also models IncidenceGraph.

inline int stamp() const#
inline void update_vertices_indices()#
inline void update_edges_indices()#
inline void clear()#
inline VMap vertex_descriptor_map() const#
inline void display() const#
inline bool state_assert() const#
inline bool adjacent_vertices_ok() const#

Public Members

int _stamp#
VMap vertex_descriptor#

Protected Types

typedef void serializable#

Protected Attributes

graph_t g#

Private Functions

SiconosGraph(const SiconosGraph&)#

Friends

friend class boost::serialization::access
template<typename Archive>
friend void siconos_io(Archive&, SiconosGraph<V, E, VProperties, EProperties, GProperties>&, const unsigned int)#
namespace boost#

Functions

BOOST_INSTALL_PROPERTY(vertex, properties)#
BOOST_INSTALL_PROPERTY(edge, properties)#
BOOST_INSTALL_PROPERTY(graph, properties)#
BOOST_INSTALL_PROPERTY(vertex, siconos_bundle)#
BOOST_INSTALL_PROPERTY(edge, siconos_bundle)#