source: src/graph/topology/graph_topology.cc @ db7589

Revision db7589, 1.9 KB checked in by Tiago de Paula Peixoto <tiago@…>, 4 years ago (diff)
Move graph component code from 'stats' to 'topology' module
  • Property mode set to 100644
Line 
1// graph-tool -- a general graph modification and manipulation thingy
2//
3// Copyright (C) 2007  Tiago de Paula Peixoto <tiago@forked.de>
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 3
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18#include <boost/python.hpp>
19#include "graph.hh"
20
21using namespace boost;
22using namespace boost::python;
23using namespace graph_tool;
24
25bool check_isomorphism(GraphInterface& gi1, GraphInterface& gi2,
26                       boost::any iso_map);
27
28bool get_kruskal_spanning_tree(GraphInterface& gi, boost::any weight_map,
29                               boost::any tree_map);
30
31bool get_prim_spanning_tree(GraphInterface& gi, size_t root,
32                            boost::any weight_map, boost::any tree_map);
33
34void topological_sort(GraphInterface& gi, vector<int32_t>& sort);
35
36bool denominator_tree(GraphInterface& gi, size_t entry, boost::any pred_map);
37
38void transitive_closure(GraphInterface& gi, GraphInterface& tcgi);
39
40void export_components();
41
42BOOST_PYTHON_MODULE(libgraph_tool_topology)
43{
44    def("check_isomorphism", &check_isomorphism);
45    def("get_kruskal_spanning_tree", &get_kruskal_spanning_tree);
46    def("get_prim_spanning_tree", &get_prim_spanning_tree);
47    def("topological_sort", &topological_sort);
48    def("denominator_tree", &denominator_tree);
49    def("transitive_closure", &transitive_closure);
50    export_components();
51}
Note: See TracBrowser for help on using the repository browser.