diff --git a/docs/bibliography.html b/docs/bibliography.html index 853ffd47..5ced986b 100644 --- a/docs/bibliography.html +++ b/docs/bibliography.html @@ -218,6 +218,22 @@ Computer Journal, 10:85-86, 1967. New methods to color the vertices of a graph
Communications of the ACM, vol. 22, 1979, pp. 251-256. +

33 +
G. Heber, R. Biswas, G.R. Gao
+Self-Avoiding Walks over Adaptive Unstructured Grids
+Parallel and Distributed Processing, LNCS 1586, +Springer-Verlag, 1999, pp. 968-977 + + +

34 +
Esmond G. Ng amd Padma Raghavan
+Performance of greedy ordering heuristics for sparse {C}holesky factorization
+SIAM Journal on Matrix Analysis and Applications (To appear) + +

35 +
Alan George and Joseph W. H. Liu
+The Evolution of the Minimum Degree Ordering Algorithm
+SIAM Review, March 1989, vol. 31, num. 1, pp. 1-19. diff --git a/docs/distance_recorder.html b/docs/distance_recorder.html index 39344193..b6f18929 100644 --- a/docs/distance_recorder.html +++ b/docs/distance_recorder.html @@ -124,7 +124,7 @@ Construct a distance recorder object with distance property accessor -template <class Edge, class Graph> +template <class Edge, class Graph>
void operator()(Edge e, const Graph& g);
diff --git a/docs/predecessor_recorder.html b/docs/predecessor_recorder.html index 1902e791..6298b534 100644 --- a/docs/predecessor_recorder.html +++ b/docs/predecessor_recorder.html @@ -123,7 +123,7 @@ Construct a predecessor recorder object with predecessor property accessor -template <class Edge, class Graph> +template <class Edge, class Graph>
void operator()(Edge e, const Graph& g);
diff --git a/docs/property_writer.html b/docs/property_writer.html index e77e3d1b..2945cba4 100644 --- a/docs/property_writer.html +++ b/docs/property_writer.html @@ -145,7 +145,7 @@ Construct a property writer object with the property accessor -template <class X, class Graph> +template <class X, class Graph>
void operator()(X x, const Graph& g);
diff --git a/docs/sparse_matrix_ordering.html b/docs/sparse_matrix_ordering.html index 0b5f23ae..83856167 100644 --- a/docs/sparse_matrix_ordering.html +++ b/docs/sparse_matrix_ordering.html @@ -83,15 +83,17 @@ of L that are not present in the non-zero structure of A), the ordering has a significant impact on the memory and computational requirements for the latter stages. However, finding the optimal ordering for A (in the sense of minimizing fill-in) -has been proven to be NP-complete [] requiring that heuristics be -used for all but simple (or specially structured) cases. +has been proven to be NP-complete [30] +requiring that heuristics be used for all but simple (or specially +structured) cases.

A widely used but rather simple ordering algorithm is a variant of the Cuthill-McKee orderings, the reverse Cuthill-McKee ordering algorithm. This algorithm can be used as a preordering method to improve ordering in more sophisticated methods such as minimum degree -algorithms []. +algorithms [21].

@@ -138,11 +140,17 @@ namespace boost { template <class Graph, class Vertex, class Color, class Degree> Vertex pseudo_peripheral_pair(Graph& G, const Vertex& u, int& ecc, - Color c, Degree d) { - typedef typename detail::property_accessor_adaptor<Degree> - ::type DegreeDecorator; - rcm_queue<Vertex, DegreeDecorator> Q(d); - _breadth_first_search(G, u, Q, null_visitor(), c); + Color color, Degree degree) + { + typename property_traits<Color>::value_type c = get(color, u); + + rcm_queue<Vertex, Degree> Q(degree); + + typename boost::graph_traits<Graph>::vertex_iterator ui, ui_end; + for (tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui) + put(color, *ui, white(c)); + breadth_first_search(G, u, Q, bfs_visitor<>(), color); + ecc = Q.eccentricity(); return Q.spouse(); } @@ -198,19 +206,21 @@ from GGCL can be reused. cuthill_mckee_ordering(Graph& G, Vertex s, OutputIterator inverse_permutation, - Color c, Degree d) + Color color, Degree degree) { typedef typename property_traits<Degree>::value_type DS; + typename property_traits<Color>::value_type c = get(color, s); typedef indirect_cmp<Degree, std::greater<DS> > Compare; - Compare comp(d); + Compare comp(degree); fenced_priority_queue<Vertex, Compare > Q(comp); typedef cuthill_mckee_visitor<OutputIterator> CMVisitor; CMVisitor cm_visitor(inverse_permutation); - bfs_visitor<Color, CMVisitor> visitor(c, cm_visitor); - initialize_graph(G, visitor); - breadth_first_search(G, s, Q, visitor, detail::null_operation() ); + typename boost::graph_traits<Graph>::vertex_iterator ui, ui_end; + for (tie(ui, ui_end) = vertices(G); ui != ui_end; ++ui) + put(color, *ui, white(c)); + breadth_first_search(G, s, Q, cm_visitor, color); } @@ -231,7 +241,7 @@ wide use is based on a greedy approach such that the ordering is chosen to minimize some quantity at each step of a simulated -step symmetric Gaussian elimination process. The algorithms using such an approach are typically distinguished by their greedy minimization -criteria []. +criteria [34].

In graph terms, the basic ordering process used by most greedy @@ -263,12 +273,12 @@ v1,...} selected by the algorithm. One of the most important examples of such an algorithm is the Minimum Degree algorithm. At each step the minimum degree algorithm chooses the vertex with minimum degree in the corresponding -graph as vk. -A number of enhancements to the basic minimum degree algorithm have -been developed, such as the use of a quotient graph representation, -mass elimination, incomplete degree update, multiple elimination, and -external degree. See [] for a historical survey -of the minimum degree algorithm. +graph as vk. A number of enhancements to the basic +minimum degree algorithm have been developed, such as the use of a +quotient graph representation, mass elimination, incomplete degree +update, multiple elimination, and external degree. See [35] for a historical +survey of the minimum degree algorithm.

The BGL implementation of the Minimum Degree algorithm closely follows @@ -355,9 +365,9 @@ edge between two vertices in the dual graph. By using a dual graph of a mesh, one way to implement the algorithm family of constructing a PSAW is to reuse BGL algorithms such as BFS and DFS with a customized visitor to provide operations during -traversal. The customized visitor has the function explore() +traversal. The customized visitor has the function tree_edge() which is to extend partial PSAW in case by case and function -start() which is to set up the PSAW for the starting vertex. +start_vertex() which is to set up the PSAW for the starting vertex.


diff --git a/docs/time_stamper.html b/docs/time_stamper.html index 95455734..39ad3cd0 100644 --- a/docs/time_stamper.html +++ b/docs/time_stamper.html @@ -144,7 +144,7 @@ Construct a time stamper object with time property accessor -template <class X, class Graph> +template <class X, class Graph>
void operator()(X x, const Graph& g);
diff --git a/include/boost/graph/detail/self_avoiding_walk.hpp b/include/boost/graph/detail/self_avoiding_walk.hpp index 706a8ac6..220a7f31 100644 --- a/include/boost/graph/detail/self_avoiding_walk.hpp +++ b/include/boost/graph/detail/self_avoiding_walk.hpp @@ -158,7 +158,9 @@ namespace boost { * a point though. */ template < class TriangleDecorator, class HList, class IteratorD> - class SAW_visitor : public null_visitor { + class SAW_visitor + : public bfs_visitor<>, public dfs_visitor<> + { typedef typename boost::property_traits::value_type iter; /*use boost shared_ptr*/ typedef typename HList::element_type::value_type::second_type Line; @@ -169,8 +171,8 @@ namespace boost { inline SAW_visitor(TriangleDecorator _td, HList _hlist, IteratorD ia) : td(_td), hlist(_hlist), iter_d(ia) {} - template - inline void start(Vertex v) { + template + inline void start_vertex(Vertex v, Graph&) { Line l1; l1.first = SAW_SENTINAL; l1.second = SAW_SENTINAL; @@ -186,7 +188,7 @@ namespace boost { w(i) ^ w(i+1): the line or point w go over from w(i) to w(i+1) */ template - bool explore(Edge e, Graph& G) { + bool tree_edge(Edge e, Graph& G) { using std::make_pair; typedef typename boost::graph_traits::vertex_descriptor Vertex; Vertex tau = target(e, G); diff --git a/include/boost/graph/visitors.hpp b/include/boost/graph/visitors.hpp index f36c4f50..0df8c93b 100644 --- a/include/boost/graph/visitors.hpp +++ b/include/boost/graph/visitors.hpp @@ -35,6 +35,8 @@ namespace boost { + // This is a bit more convenient than std::numeric_limits because + // you don't have to explicitly provide type T. template inline T numeric_limits_max(T) { return std::numeric_limits::max(); } @@ -64,15 +66,16 @@ namespace boost { struct false_tag { enum { num = FALSE_TAG }; }; //======================================================================== - // base_visitor and null_visitor + // null_visitor and base_visitor - template - struct base_visitor { + struct null_visitor { typedef void event_filter; template void operator()(T, Graph&) { } }; - struct null_visitor { + // needed for MSVC workaround + template + struct base_visitor { typedef void event_filter; template void operator()(T, Graph&) { } @@ -123,7 +126,9 @@ namespace boost { // predecessor_recorder template - struct predecessor_recorder { + struct predecessor_recorder + : public base_visitor > + { typedef Tag event_filter; predecessor_recorder(PredecessorPA pa) : m_predecessor(pa) { } template @@ -142,7 +147,9 @@ namespace boost { // distance_recorder template - struct distance_recorder { + struct distance_recorder + : public base_visitor > + { typedef Tag event_filter; distance_recorder(DistancePA pa) : m_distance(pa) { } template @@ -164,7 +171,9 @@ namespace boost { template - struct time_stamper { + struct time_stamper + : public base_visitor > + { typedef Tag event_filter; time_stamper(TimePA pa, TimeT& t) : m_time_pa(pa), m_time(t) { } template @@ -184,7 +193,9 @@ namespace boost { // property_writer template - struct property_writer { + struct property_writer + : public base_visitor > + { typedef Tag event_filter; property_writer(PA pa, OutputIterator out) : m_pa(pa), m_out(out) { }