diff --git a/src/python/basic_graph.cpp b/src/python/basic_graph.cpp index 3f7fefc5..f0a97ed8 100644 --- a/src/python/basic_graph.cpp +++ b/src/python/basic_graph.cpp @@ -493,6 +493,7 @@ void export_basic_graph(const char* name) class_ >(name) // Constructors .def(init()) + .def("is_directed", &Graph::is_directed) // Vertex List Graph concept .def("num_vertices", &Graph::num_vertices) .add_property("vertices", range(&Graph::vertices_begin, diff --git a/src/python/basic_graph.hpp b/src/python/basic_graph.hpp index 99ebf202..d1428757 100644 --- a/src/python/basic_graph.hpp +++ b/src/python/basic_graph.hpp @@ -209,7 +209,10 @@ class basic_graph basic_graph(); basic_graph(const std::string& filename, graph_file_kind kind); - + + bool is_directed() const + { return is_convertible::value; } + Vertex add_vertex(); void clear_vertex(Vertex vertex); void remove_vertex(Vertex vertex);