# HG changeset patch
# User Nathann Cohen
# Date 1269341571 3600
# Node ID f17430f5f6f16cd7968ddd265b53d545d69408f0
# Parent 9de022253f37a53a8319d6964e4113db7988ac21
#8513: small fixes in the docstrings of generic graph and undirected graph classes
diff r 9de022253f37 r f17430f5f6f1 sage/graphs/generic_graph.py
 a/sage/graphs/generic_graph.py Mon Mar 22 20:44:52 2010 +0100
+++ b/sage/graphs/generic_graph.py Tue Mar 23 11:52:51 2010 +0100
@@ 2916,9 +2916,9 @@
itself has no cut vertices. Two distinct blocks cannot overlap in
more than a single cut vertex.
 OUTPUT: ( B, C ), where B is a list of blocks each is a list of
 vertices and the blocks are the corresponding induced subgraphs
 and C is a list of cut vertices.
+ OUTPUT: ``( B, C )``, where ``B`` is a list of blocks each is
+ a list of vertices and the blocks are the corresponding induced
+ subgraphsand ``C`` is a list of cut vertices.
EXAMPLES::
@@ 2949,16 +2949,16 @@
...
NotImplementedError: ...
 ALGORITHM: 8.3.8 in [1]. Notice that the termination condition on
 line (23) of the algorithm uses "p[v] == 0" which in the book
 means that the parent is undefined; in this case, v must be the
 root s. Since our vertex names start with 0, we substitute instead
 the condition "v == s". This is the terminating condition used
+ ALGORITHM: 8.3.8 in [Jungnickel05]_. Notice that the termination condition on
+ line (23) of the algorithm uses ``p[v] == 0`` which in the book
+ means that the parent is undefined; in this case, `v` must be the
+ root `s`. Since our vertex names start with `0`, we substitute instead
+ the condition ``v == s``. This is the terminating condition used
in the general Depth First Search tree in Algorithm 8.2.1.
REFERENCE:
  [1] D. Jungnickel, Graphs, Networks and Algorithms,
+ .. [Jungnickel05] D. Jungnickel, Graphs, Networks and Algorithms,
Springer, 2005.
"""
if not self: # empty graph
@@ 3826,10 +3826,10 @@
This function returns a list of such paths.
 NOTE:

 This function is topological : it does not take the eventual
 weights of the edges into account.
+ .. NOTE::
+
+ This function is topological : it does not take the eventual
+ weights of the edges into account.
EXAMPLE:
@@ 6583,9 +6583,9 @@
ordered list.
The clustering coefficient of a graph is the fraction of possible
 triangles that are triangles, c_i = triangles_i /
 (k_i\*(k_i1)/2) where k_i is the degree of vertex i, [1]. A
 coefficient for the whole graph is the average of the c_i.
+ triangles that are triangles, `c_i = triangles_i /
+ (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]. A
+ coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
triangles, T = 3\*triangles/triads, [HSSNX]_.
@@ 6622,9 +6622,9 @@
Returns the average clustering coefficient.
The clustering coefficient of a graph is the fraction of possible
 triangles that are triangles, c_i = triangles_i /
 (k_i\*(k_i1)/2) where k_i is the degree of vertex i, [1]. A
 coefficient for the whole graph is the average of the c_i.
+ triangles that are triangles, `c_i = triangles_i /
+ (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]. A
+ coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
triangles, T = 3\*triangles/triads, [1].
@@ 6648,9 +6648,9 @@
ordered list.
The clustering coefficient of a graph is the fraction of possible
 triangles that are triangles, c_i = triangles_i /
 (k_i\*(k_i1)/2) where k_i is the degree of vertex i, [1]. A
 coefficient for the whole graph is the average of the c_i.
+ triangles that are triangles, `c_i = triangles_i /
+ (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]. A
+ coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
triangles, T = 3\*triangles/triads, [1].
@@ 6697,15 +6697,15 @@
graph.
The clustering coefficient of a graph is the fraction of possible
 triangles that are triangles, c_i = triangles_i /
 (k_i\*(k_i1)/2) where k_i is the degree of vertex i, [1]. A
 coefficient for the whole graph is the average of the c_i.
+ triangles that are triangles, `c_i = triangles_i /
+ (k_i\*(k_i1)/2)` where `k_i` is the degree of vertex `i`, [1]. A
+ coefficient for the whole graph is the average of the `c_i`.
Transitivity is the fraction of all possible triangles which are
triangles, T = 3\*triangles/triads, [1].
REFERENCE:
  [1] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX
+ .. [1] Aric Hagberg, Dan Schult and Pieter Swart. NetworkX
documentation. [Online] Available:
https://networkx.lanl.gov/reference/networkx/
@@ 8526,10 +8526,10 @@
"""
Returns the Cartesian product of self and other.
 The Cartesian product of G and H is the graph L with vertex set
 V(L) equal to the Cartesian product of the vertices V(G) and V(H),
 and ((u,v), (w,x)) is an edge iff either  (u, w) is an edge of
 self and v = x, or  (v, x) is an edge of other and u = w.
+ The Cartesian product of `G` and `H` is the graph `L` with vertex set
+ `V(L)` equal to the Cartesian product of the vertices `V(G)` and `V(H)`,
+ and `((u,v), (w,x))` is an edge iff either  `(u, w)` is an edge of
+ self and `v = x`, or  `(v, x)` is an edge of other and `u = w`.
EXAMPLES::
@@ 8573,10 +8573,10 @@
Returns the tensor product, also called the categorical product, of
self and other.
 The tensor product of G and H is the graph L with vertex set V(L)
 equal to the Cartesian product of the vertices V(G) and V(H), and
 ((u,v), (w,x)) is an edge iff  (u, w) is an edge of self, and 
 (v, x) is an edge of other.
+ The tensor product of `G` and `H` is the graph `L` with vertex set `V(L)`
+ equal to the Cartesian product of the vertices `V(G)` and `V(H)`, and
+ `((u,v), (w,x))` is an edge iff  `(u, w)` is an edge of self, and 
+ `(v, x)` is an edge of other.
EXAMPLES::
diff r 9de022253f37 r f17430f5f6f1 sage/graphs/graph.py
 a/sage/graphs/graph.py Mon Mar 22 20:44:52 2010 +0100
+++ b/sage/graphs/graph.py Tue Mar 23 11:52:51 2010 +0100
@@ 1411,11 +1411,11 @@
as a Graph object.
 When no solution exists, returns ``False``
 NOTES:
+ .. NOTE::
  This algorithm computes the degreeconstrained subgraph of minimum weight.
  If the graph's edges are weighted, these are taken into account.
  This problem can be solved in polynomial time.
+  This algorithm computes the degreeconstrained subgraph of minimum weight.
+  If the graph's edges are weighted, these are taken into account.
+  This problem can be solved in polynomial time.
EXAMPLES:
@@ 1491,10 +1491,10 @@
A digraph representing an orientation of the current graph.
 NOTES:
+ .. NOTE::
  This method assumes the graph is connected.
  This algorithm works in O(m).
+  This method assumes the graph is connected.
+  This algorithm works in O(m).
EXAMPLE:
@@ 2163,10 +2163,10 @@
by a list of vertices. A clique is an induced complete subgraph, and a
maximal clique is one not contained in a larger one.
 NOTES:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
ALGORITHM:
@@ 2223,10 +2223,10 @@
by a list of vertices. A clique is an induced complete subgraph, and a
maximum clique is one of maximal order.
 NOTES:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
ALGORITHM:
@@ 2262,10 +2262,10 @@
"""
Returns the vertex set of a maximal order complete subgraph.
 NOTE:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
ALGORITHM:
@@ 2289,10 +2289,10 @@
Returns the order of the largest clique of the graph (the clique
number).
 NOTE:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use ``to_undirected``
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use ``to_undirected``
+ to convert a digraph to an undirected graph.
INPUT:
@@ 2334,10 +2334,10 @@
Returns a list of the number of maximal cliques containing each
vertex. (Returns a single value if only one input vertex).
 NOTES:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
INPUT:
@@ 2387,10 +2387,10 @@
edges between maximal cliques with common members in the original
graph.
 NOTES:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
INPUT:
@@ 2417,10 +2417,10 @@
graph. Right and left vertices are connected if the bottom vertex
belongs to the clique represented by a top vertex.
 NOTES:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
EXAMPLES::
@@ 2442,10 +2442,10 @@
Returns a maximal independent set, which is a set of vertices which
induces an empty subgraph. Uses Cliquer [NisOst2003]_.
 NOTES:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
EXAMPLES::
@@ 2462,10 +2462,10 @@
Returns a list of sizes of the largest maximal cliques containing
each vertex. (Returns a single value if only one input vertex).
 NOTES:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
INPUT:
@@ 2535,10 +2535,10 @@
Returns the cliques containing each vertex, represented as a list
of lists. (Returns a single list if only one input vertex).
 NOTE:
+ .. NOTE::
  Currently only implemented for undirected graphs. Use to_undirected
 to convert a digraph to an undirected graph.
+ Currently only implemented for undirected graphs. Use to_undirected
+ to convert a digraph to an undirected graph.
INPUT: