From 7c446ad0d43335a207c3be5a15860e7ede6a6eb2 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 4 Mar 2005 14:53:56 +0000 Subject: [PATCH] Copyrightify and licensify [SVN r27552] --- build/python/Jamfile | 36 ++++++++++++++++---------- src/python/basic_graph.cpp | 13 ++++++++++ src/python/basic_graph.hpp | 8 ++++++ src/python/betweenness_centrality.cpp | 8 ++++++ src/python/bfs_events.hpp | 9 +++++++ src/python/breadth_first_search.cpp | 8 ++++++ src/python/digraph.cpp | 8 ++++++ src/python/digraph.hpp | 8 ++++++ src/python/dijkstra_events.hpp | 8 ++++++ src/python/dijkstra_shortest_paths.cpp | 8 ++++++ src/python/done.cpp | 8 ++++++ src/python/done.hpp | 8 ++++++ src/python/graph.cpp | 8 ++++++ src/python/graph.hpp | 8 ++++++ src/python/graphviz.cpp | 8 ++++++ src/python/module.cpp | 14 ++++++++++ src/python/page_rank.cpp | 8 ++++++ src/python/queue.hpp | 8 ++++++ src/python/visitor.hpp | 8 ++++++ 19 files changed, 179 insertions(+), 13 deletions(-) diff --git a/build/python/Jamfile b/build/python/Jamfile index 0c6ab427..e14149f0 100644 --- a/build/python/Jamfile +++ b/build/python/Jamfile @@ -1,16 +1,26 @@ +# Copyright 2005 The Trustees of Indiana University. + +# Use, modification and distribution is subject to the Boost Software +# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# Authors: Douglas Gregor +# Andrew Lumsdaine + subproject libs/graph/build/python ; - SEARCH on python.jam = $(BOOST_BUILD_PATH) ; - include python.jam ; +SEARCH on python.jam = $(BOOST_BUILD_PATH) ; +include python.jam ; - extension bgl - : ../../src/python/graph.cpp # sources - ../../src/python/digraph.cpp - ../../src/python/graphviz.cpp - ../../src/python/module.cpp - ../../src/python/betweenness_centrality.cpp - ../../src/python/page_rank.cpp - ../../src/python/done.cpp - ../../src/python/breadth_first_search.cpp - ../../../python/build/boost_python # dependencies - ; +extension bgl +: ../../src/python/graph.cpp # sources + ../../src/python/digraph.cpp + ../../src/python/graphviz.cpp + ../../src/python/module.cpp + ../../src/python/betweenness_centrality.cpp + ../../src/python/page_rank.cpp + ../../src/python/done.cpp + ../../src/python/breadth_first_search.cpp + ../../src/python/dijkstra_shortest_paths.cpp + ../../../python/build/boost_python # dependencies + ; diff --git a/src/python/basic_graph.cpp b/src/python/basic_graph.cpp index db1b12fb..bdb6b287 100644 --- a/src/python/basic_graph.cpp +++ b/src/python/basic_graph.cpp @@ -1,4 +1,13 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "basic_graph.hpp" +#include "point2d.hpp" namespace boost { @@ -509,6 +518,8 @@ void export_basic_graph(const char* name) .def("get_vertex_string_map", &Graph::template get_vertex_map) .def("get_vertex_object_map", &Graph::template get_vertex_map) + .def("get_vertex_point2d_map", + &Graph::template get_vertex_map) // Edge property maps .def("has_edge_map", &Graph::has_vertex_map) .def("get_edge_index_map", &Graph::get_edge_index_map) @@ -561,6 +572,8 @@ void export_basic_graph(const char* name) declare_property_map > ::declare("vertex_color_map"); + declare_property_map > + ::declare("vertex_point2d_map"); // Edge property maps declare_readable_property_map diff --git a/src/python/basic_graph.hpp b/src/python/basic_graph.hpp index 8614437f..14cfeb5a 100644 --- a/src/python/basic_graph.hpp +++ b/src/python/basic_graph.hpp @@ -1,3 +1,11 @@ +// Copyright 2004-5 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #ifndef BOOST_GRAPH_BASIC_GRAPH_HPP #define BOOST_GRAPH_BASIC_GRAPH_HPP diff --git a/src/python/betweenness_centrality.cpp b/src/python/betweenness_centrality.cpp index 268324df..d2d80032 100644 --- a/src/python/betweenness_centrality.cpp +++ b/src/python/betweenness_centrality.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "graph.hpp" #include "digraph.hpp" #include diff --git a/src/python/bfs_events.hpp b/src/python/bfs_events.hpp index 3aa52b02..f0cb6f23 100644 --- a/src/python/bfs_events.hpp +++ b/src/python/bfs_events.hpp @@ -1,3 +1,12 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine + BGL_PYTHON_EVENT(initialize_vertex, vertex_descriptor) BGL_PYTHON_EVENT(discover_vertex, vertex_descriptor) BGL_PYTHON_EVENT(examine_vertex, vertex_descriptor) diff --git a/src/python/breadth_first_search.cpp b/src/python/breadth_first_search.cpp index af8e3c7e..ebcc485d 100644 --- a/src/python/breadth_first_search.cpp +++ b/src/python/breadth_first_search.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include #include "graph.hpp" #include "digraph.hpp" diff --git a/src/python/digraph.cpp b/src/python/digraph.cpp index f91f9934..70c2d305 100644 --- a/src/python/digraph.cpp +++ b/src/python/digraph.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "digraph.hpp" #include "basic_graph.cpp" diff --git a/src/python/digraph.hpp b/src/python/digraph.hpp index c0cf5508..c11648af 100644 --- a/src/python/digraph.hpp +++ b/src/python/digraph.hpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #ifndef BOOST_GRAPH_PYTHON_DIGRAPH_HPP #define BOOST_GRAPH_PYTHON_DIGRAPH_HPP diff --git a/src/python/dijkstra_events.hpp b/src/python/dijkstra_events.hpp index 84937304..9199b7b6 100644 --- a/src/python/dijkstra_events.hpp +++ b/src/python/dijkstra_events.hpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine BGL_PYTHON_EVENT(initialize_vertex, vertex_descriptor) BGL_PYTHON_EVENT(examine_vertex, vertex_descriptor) BGL_PYTHON_EVENT(examine_edge, edge_descriptor) diff --git a/src/python/dijkstra_shortest_paths.cpp b/src/python/dijkstra_shortest_paths.cpp index f35afbe7..9dc785e4 100644 --- a/src/python/dijkstra_shortest_paths.cpp +++ b/src/python/dijkstra_shortest_paths.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include #include "graph.hpp" #include "digraph.hpp" diff --git a/src/python/done.cpp b/src/python/done.cpp index 9ed56569..fd350e20 100644 --- a/src/python/done.cpp +++ b/src/python/done.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "done.hpp" #include diff --git a/src/python/done.hpp b/src/python/done.hpp index a35c51ba..f4218d30 100644 --- a/src/python/done.hpp +++ b/src/python/done.hpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #ifndef BOOST_GRAPH_PYTHON_DONE_HPP #define BOOST_GRAPH_PYTHON_DONE_HPP diff --git a/src/python/graph.cpp b/src/python/graph.cpp index 9bc4986a..e7b2b33a 100644 --- a/src/python/graph.cpp +++ b/src/python/graph.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "graph.hpp" #include "basic_graph.cpp" #include diff --git a/src/python/graph.hpp b/src/python/graph.hpp index 07259bf5..818d2583 100644 --- a/src/python/graph.hpp +++ b/src/python/graph.hpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #ifndef BOOST_GRAPH_PYTHON_GRAPH_HPP #define BOOST_GRAPH_PYTHON_GRAPH_HPP diff --git a/src/python/graphviz.cpp b/src/python/graphviz.cpp index 6b662e4b..de4ee012 100644 --- a/src/python/graphviz.cpp +++ b/src/python/graphviz.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "basic_graph.hpp" #include #include diff --git a/src/python/module.cpp b/src/python/module.cpp index 81d01e40..bf16be7d 100644 --- a/src/python/module.cpp +++ b/src/python/module.cpp @@ -1,7 +1,16 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "basic_graph.cpp" #include "graph.hpp" #include "digraph.hpp" #include +#include "point2d.hpp" namespace boost { namespace graph { namespace python { @@ -35,6 +44,11 @@ BOOST_PYTHON_MODULE(bgl) .value("black", color_traits::black()) ; + enum_("Point2D") + .def("x", &point2d::x) + .def("y", &point2d::y) + ; + export_Graph(); export_Digraph(); export_betweenness_centrality(); diff --git a/src/python/page_rank.cpp b/src/python/page_rank.cpp index b61ed645..d4e3d5cc 100644 --- a/src/python/page_rank.cpp +++ b/src/python/page_rank.cpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #include "digraph.hpp" #include #include "done.hpp" diff --git a/src/python/queue.hpp b/src/python/queue.hpp index 200f1aa2..8086c42b 100644 --- a/src/python/queue.hpp +++ b/src/python/queue.hpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine #ifndef BOOST_GRAPH_PYTHON_QUEUE_HPP #define BOOST_GRAPH_PYTHON_QUEUE_HPP diff --git a/src/python/visitor.hpp b/src/python/visitor.hpp index e400fd00..c8c08256 100644 --- a/src/python/visitor.hpp +++ b/src/python/visitor.hpp @@ -1,3 +1,11 @@ +// Copyright 2005 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Douglas Gregor +// Andrew Lumsdaine template class BGL_PYTHON_VISITOR {