From 5ce0418131c99828ced3e16f64e627e167e4a181 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 14 Mar 2005 16:27:52 +0000 Subject: [PATCH] Added is_directed member function [SVN r27651] --- src/python/basic_graph.cpp | 1 + src/python/basic_graph.hpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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);