2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-31 20:22:09 +00:00

edits, bib additions

[SVN r7748]
This commit is contained in:
Jeremy Siek
2000-09-20 18:29:01 +00:00
parent b3196a64ef
commit 56f4ebbfa6
8 changed files with 77 additions and 38 deletions

View File

@@ -218,6 +218,22 @@ Computer Journal, 10:85-86, 1967.
<EM>New methods to color the vertices of a graph</EM><br>
Communications of the ACM, vol. 22, 1979, pp. 251-256.
<P></P><DT><A NAME="heber99:_saw">33</a>
<DD>G. Heber, R. Biswas, G.R. Gao<BR>
<EM>Self-Avoiding Walks over Adaptive Unstructured Grids</EM><br>
Parallel and Distributed Processing, LNCS 1586,
Springer-Verlag, 1999, pp. 968-977
<P></P><DT><A NAME="ng-raghavan">34</a>
<DD>Esmond G. Ng amd Padma Raghavan<BR>
<EM>Performance of greedy ordering heuristics for sparse {C}holesky factorization</EM><br>
SIAM Journal on Matrix Analysis and Applications (To appear)
<P></P><DT><A NAME="George:evolution">35</a>
<DD>Alan George and Joseph W. H. Liu<BR>
<EM>The Evolution of the Minimum Degree Ordering Algorithm</EM><br>
SIAM Review, March 1989, vol. 31, num. 1, pp. 1-19.
</DL>

View File

@@ -124,7 +124,7 @@ Construct a distance recorder object with distance property accessor
<tr>
<td><tt>
template &lt;class Edge, class Graph&gt;
template &lt;class Edge, class Graph&gt;<br>
void operator()(Edge e, const Graph& g);
</tt></td>
<td>

View File

@@ -123,7 +123,7 @@ Construct a predecessor recorder object with predecessor property accessor
<tr>
<td><tt>
template &lt;class Edge, class Graph&gt;
template &lt;class Edge, class Graph&gt;<br>
void operator()(Edge e, const Graph& g);
</tt></td>
<td>

View File

@@ -145,7 +145,7 @@ Construct a property writer object with the property accessor
<tr>
<td><tt>
template &lt;class X, class Graph&gt;
template &lt;class X, class Graph&gt;<br>
void operator()(X x, const Graph& g);
</tt></td>
<td>

View File

@@ -83,15 +83,17 @@ of <i>L</i> that are not present in the non-zero structure of
<i>A</i>), the ordering has a significant impact on the memory and
computational requirements for the latter stages. However, finding
the optimal ordering for <i>A</i> (in the sense of minimizing fill-in)
has been proven to be NP-complete&nbsp;[] requiring that heuristics be
used for all but simple (or specially structured) cases.
has been proven to be NP-complete&nbsp;[<a
href="bibliography.html#garey79:computers-and-intractability">30</a>]
requiring that heuristics be used for all but simple (or specially
structured) cases.
<P>
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&nbsp;[].
algorithms&nbsp;[<a href="bibliography.html#LIU:MMD">21</a>].
<P>
@@ -138,11 +140,17 @@ namespace boost {
template &lt;class Graph, class Vertex, class Color, class Degree&gt;
Vertex
pseudo_peripheral_pair(Graph& G, const Vertex& u, int& ecc,
Color c, Degree d) {
typedef typename detail::property_accessor_adaptor&lt;Degree&gt;
::type DegreeDecorator;
rcm_queue&lt;Vertex, DegreeDecorator&gt; Q(d);
_breadth_first_search(G, u, Q, null_visitor(), c);
Color color, Degree degree)
{
typename property_traits&lt;Color&gt;::value_type c = get(color, u);
rcm_queue&lt;Vertex, Degree&gt; Q(degree);
typename boost::graph_traits&lt;Graph&gt;::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&lt;&gt;(), 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&lt;Degree&gt;::value_type DS;
typename property_traits&lt;Color&gt;::value_type c = get(color, s);
typedef indirect_cmp&lt;Degree, std::greater&lt;DS&gt; &gt; Compare;
Compare comp(d);
Compare comp(degree);
fenced_priority_queue&lt;Vertex, Compare &gt; Q(comp);
typedef cuthill_mckee_visitor&lt;OutputIterator&gt; CMVisitor;
CMVisitor cm_visitor(inverse_permutation);
bfs_visitor&lt;Color, CMVisitor&gt; visitor(c, cm_visitor);
initialize_graph(G, visitor);
breadth_first_search(G, s, Q, visitor, detail::null_operation() );
typename boost::graph_traits&lt;Graph&gt;::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);
}
</pre>
</td></tr></table>
@@ -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&nbsp;[].
criteria&nbsp;[<a href="bibliography.html#ng-raghavan">34</a>].
<P>
In graph terms, the basic ordering process used by most greedy
@@ -263,12 +273,12 @@ v<sup>1</sup>,...}</i> selected by the algorithm.
One of the most important examples of such an algorithm is the
<I>Minimum Degree</I> algorithm. At each step the minimum degree
algorithm chooses the vertex with minimum degree in the corresponding
graph as <i>v<sup>k</sup></i>.
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&nbsp;[] for a historical survey
of the minimum degree algorithm.
graph as <i>v<sup>k</sup></i>. 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&nbsp;[<A
href="bibliography.html#George:evolution">35</a>] for a historical
survey of the minimum degree algorithm.
<P>
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 <TT>explore()</TT>
traversal. The customized visitor has the function <TT>tree_edge()</TT>
which is to extend partial PSAW in case by case and function
<TT>start()</TT> which is to set up the PSAW for the starting vertex.
<TT>start_vertex()</TT> which is to set up the PSAW for the starting vertex.
<br>
<HR>

View File

@@ -144,7 +144,7 @@ Construct a time stamper object with time property accessor
<tr>
<td><tt>
template &lt;class X, class Graph&gt;
template &lt;class X, class Graph&gt;<br>
void operator()(X x, const Graph& g);
</tt></td>
<td>

View File

@@ -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<IteratorD>::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 <class Vertex>
inline void start(Vertex v) {
template <class Vertex, class Graph>
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 <class Edge, class Graph>
bool explore(Edge e, Graph& G) {
bool tree_edge(Edge e, Graph& G) {
using std::make_pair;
typedef typename boost::graph_traits<Graph>::vertex_descriptor Vertex;
Vertex tau = target(e, G);

View File

@@ -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 <class T>
inline T numeric_limits_max(T) { return std::numeric_limits<T>::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 <class Visitor>
struct base_visitor {
struct null_visitor {
typedef void event_filter;
template <class T, class Graph>
void operator()(T, Graph&) { }
};
struct null_visitor {
// needed for MSVC workaround
template <class Visitor>
struct base_visitor {
typedef void event_filter;
template <class T, class Graph>
void operator()(T, Graph&) { }
@@ -123,7 +126,9 @@ namespace boost {
// predecessor_recorder
template <class PredecessorPA, class Tag>
struct predecessor_recorder {
struct predecessor_recorder
: public base_visitor<predecessor_recorder<PredecessorPA, Tag> >
{
typedef Tag event_filter;
predecessor_recorder(PredecessorPA pa) : m_predecessor(pa) { }
template <class Edge, class Graph>
@@ -142,7 +147,9 @@ namespace boost {
// distance_recorder
template <class DistancePA, class Tag>
struct distance_recorder {
struct distance_recorder
: public base_visitor<distance_recorder<DistancePA, Tag> >
{
typedef Tag event_filter;
distance_recorder(DistancePA pa) : m_distance(pa) { }
template <class Edge, class Graph>
@@ -164,7 +171,9 @@ namespace boost {
template <class TimePA, class TimeT, class Tag>
struct time_stamper {
struct time_stamper
: public base_visitor<time_stamper<TimePA, TimeT, Tag> >
{
typedef Tag event_filter;
time_stamper(TimePA pa, TimeT& t) : m_time_pa(pa), m_time(t) { }
template <class Vertex, class Graph>
@@ -184,7 +193,9 @@ namespace boost {
// property_writer
template <class PA, class OutputIterator, class Tag>
struct property_writer {
struct property_writer
: public base_visitor<property_writer<PA, OutputIterator, Tag> >
{
typedef Tag event_filter;
property_writer(PA pa, OutputIterator out) : m_pa(pa), m_out(out) { }