On 06.04.2015 08:54, Guillaume Gay wrote:
> Hi all,
>
> I'm using graph-tool to model mesh-like elements (cells in a
> biological tissue). As the model evolves towards more complicated
> geometries, I'd very much like to access some of the underlying GCAL
> objects not ported to graph-tool (such as faces).  For now I rely on a
> somehow cumbersome dual propertymaps/pandas data manipulation.
>
> I was wondering how this could go, but don't know from which end I
> shell read the code in graph-tool. Also would some kind of plugin
> architecture be possible (i.e. compiling the relevant Cpp bindings as
> a shared object compatible with graph-tool)?

It is entirely possible to write such C++ plugins for graph-tool; I do
it all the time for my own stuff. However, this is still entirely
undocumented.

I plan to write this documentation, with a least a simple example, soon.
(I will give a small graph-tool tutorial talk in the next NetSci in
June, and I want to have this done by then.)

In the mean time, you can peak at how the PageRank code is implemented,
which is fact a rather complete yet not too long example of how to
extend graph-tool:

The C++ part:

https://git.skewed.de/count0/graph-tool/blob/master/src/graph/centrality/graph_pagerank.hh
https://git.skewed.de/count0/graph-tool/blob/master/src/graph/centrality/graph_pagerank.cc

The python part:

https://git.skewed.de/count0/graph-tool/blob/master/src/graph_tool/centrality/__init__.py#L62

You need to know how to use the BGL and Boost python.

Best,
Tiago

--
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to