Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90046764
boost_graph_converter.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Oct 28, 19:52
Size
1 KB
Mime Type
text/x-c++
Expires
Wed, Oct 30, 19:52 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21979551
Attached To
rAKA akantu
boost_graph_converter.hh
View Options
#ifndef AKANTU_BOOST_GRAPH_CONVERTER_HH_
#define AKANTU_BOOST_GRAPH_CONVERTER_HH_
/* -------------------------------------------------------------------------- */
#include "element.hh"
/* -------------------------------------------------------------------------- */
#include <boost/graph/adjacency_list.hpp>
#include <map>
#include <unordered_map>
/* -------------------------------------------------------------------------- */
namespace akantu {
class Mesh;
} // namespace akantu
namespace akantu {
class BoostGraphConverter {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
BoostGraphConverter(const Mesh & mesh);
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
void toGraphviz(const std::string & filename) const;
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
enum EdgeType {
_none,
_up,
_down,
};
using Graph = boost::adjacency_list<>;
using vertex_descriptor = boost::graph_traits<Graph>::vertex_descriptor;
using edge_descriptor = boost::graph_traits<Graph>::edge_descriptor;
using VertexInfo = std::map<vertex_descriptor, Element>;
using EdgeInfo = std::map<edge_descriptor, EdgeType>;
Graph graph;
std::map<Element, Int> element_to_vertex;
VertexInfo vertex_to_element;
EdgeInfo edge_type;
};
} // namespace akantu
#endif // AKANTU_BOOST_GRAPH_CONVERTER_HH_
Event Timeline
Log In to Comment