# HG changeset patch
# User Eviatar Bach
# Date 1294203899 28800
# Node ID bcff8a8fb10fe78088ccf0e33aca797a6489592b
# Parent d152b23009e4811eba04aff095949e25c5f19fef
trac 10560: Fixes spelling errors in generic_graph.py
diff r d152b23009e4 r bcff8a8fb10f sage/graphs/generic_graph.py
 a/sage/graphs/generic_graph.py Tue Dec 28 19:22:59 2010 0800
+++ b/sage/graphs/generic_graph.py Tue Jan 04 21:04:59 2011 0800
@@ 3834,10 +3834,10 @@
def vertex_cut(self, s, t, value_only=True, vertices=False, solver=None, verbose=0):
r"""
 Returns a minimum vertex cut between non adjacent vertices `s` and `t`
+ Returns a minimum vertex cut between nonadjacent vertices `s` and `t`
represented by a list of vertices.
 A vertex cut between two non adjacent vertices is a set `U`
+ A vertex cut between two nonadjacent vertices is a set `U`
of vertices of self such that the graph obtained by removing
`U` from self is disconnected. For more information, see the
`Wikipedia article on cuts
@@ 4134,7 +4134,7 @@
only the size of a minimum vertex cover is returned. Otherwise,
a minimum vertex cover is returned as a list of vertices.
  ``log``  non negative integer (default: ``0``). Set the level
+  ``log``  nonnegative integer (default: ``0``). Set the level
of verbosity you want from the linear program solver. Since the
problem of computing a vertex cover is `NP`complete, its solving
may take some time depending on the graph. A value of 0 means
@@ 4352,7 +4352,7 @@
Given a graph (resp. a digraph) `G` with weighted edges,
the traveling salesman problem consists in finding a
 hamiltonian cycle (resp. circuit) of the graph of
+ Hamiltonian cycle (resp. circuit) of the graph of
minimum cost.
This TSP is one of the most famous NPComplete problems,
@@ 4390,7 +4390,7 @@
EXAMPLES:
 The Heawood graph is known to be hamiltonian::
+ The Heawood graph is known to be Hamiltonian::
sage: g = graphs.HeawoodGraph()
sage: tsp = g.traveling_salesman_problem()
@@ 4413,16 +4413,16 @@
True
On the other hand, the Petersen Graph is known not to
 be hamiltonian::
+ be Hamiltonian::
sage: g = graphs.PetersenGraph()
sage: tsp = g.traveling_salesman_problem()
Traceback (most recent call last):
...
 ValueError: The given graph is not hamiltonian
+ ValueError: The given graph is not Hamiltonian
One easy way to change is is obviously to add to this
 graph the edges corresponding to a hamiltonian cycle.
+ graph the edges corresponding to a Hamiltonian cycle.
If we do this by setting the cost of these new edges
to `2`, while the others are set to `1`, we notice
@@ 4569,18 +4569,18 @@
return tsp
except MIPSolverException:
 raise ValueError("The given graph is not hamiltonian")
+ raise ValueError("The given graph is not Hamiltonian")
def hamiltonian_cycle(self):
r"""
 Returns a hamiltonian cycle/circuit of the current graph/digraph

 A graph (resp. digraph) is said to be hamiltonian
+ Returns a Hamiltonian cycle/circuit of the current graph/digraph
+
+ A graph (resp. digraph) is said to be Hamiltonian
if it contains as a subgraph a cycle (resp. a circuit)
going through all the vertices.
 Computing a hamiltonian cycle/circuit being NPComplete,
+ Computing a Hamiltonian cycle/circuit being NPComplete,
this algorithm could run for some time depending on
the instance.
@@ 4590,19 +4590,19 @@
OUTPUT:
 Returns a hamiltonian cycle/circuit if it exists. Otherwise,
+ Returns a Hamiltonian cycle/circuit if it exists. Otherwise,
raises a ``ValueError`` exception.
NOTE:
 This function, as ``is_hamiltonian``, computes a hamiltonian
+ This function, as ``is_hamiltonian``, computes a Hamiltonian
cycle if it exists : the user should *NOT* test for
 hamiltonicity using ``is_hamiltonian`` before calling this
+ Hamiltonicity using ``is_hamiltonian`` before calling this
function, as it would result in computing it twice.
EXAMPLES:
 The Heawood Graph is known to be hamiltonian ::
+ The Heawood Graph is known to be Hamiltonian ::
sage: g = graphs.HeawoodGraph()
sage: g.hamiltonian_cycle()
@@ 4614,14 +4614,14 @@
sage: g.hamiltonian_cycle()
Traceback (most recent call last):
...
 ValueError: The given graph is not hamiltonian
+ ValueError: The given graph is not Hamiltonian
"""
from sage.numerical.mip import MIPSolverException
try:
return self.traveling_salesman_problem(weighted = False)
except MIPSolverException:
 raise ValueError("The given graph is not hamiltonian")
+ raise ValueError("The given graph is not Hamiltonian")
def flow(self, x, y, value_only=True, integer=False, use_edge_labels=True, vertex_bound=False, method = None, solver=None, verbose=0):
r"""
@@ 11800,7 +11800,7 @@
def layout_tree(self, tree_orientation = "down", tree_root = None, dim = 2, **options):
"""
Computes an ordered tree layout for this graph, which should
 be a tree (no non oriented cycles).
+ be a tree (no nonoriented cycles).
INPUT:
@@ 13856,11 +13856,11 @@
r"""
Tests whether the current graph is Hamiltonian
 A graph (resp. digraph) is said to be hamiltonian
+ A graph (resp. digraph) is said to be Hamiltonian
if it contains as a subgraph a cycle (resp. a circuit)
going through all the vertices.
 Testing for hamiltonicity being NPComplete, this
+ Testing for Hamiltonicity being NPComplete, this
algorithm could run for some time depending on
the instance.
@@ 13870,21 +13870,21 @@
OUTPUT:
 Returns ``True`` if a hamiltonian cycle/circuit exists, and
+ Returns ``True`` if a Hamiltonian cycle/circuit exists, and
``False`` otherwise.
NOTE:
This function, as ``hamiltonian_cycle`` and
 ``traveling_salesman_problem``, computes a hamiltonian
+ ``traveling_salesman_problem``, computes a Hamiltonian
cycle if it exists : the user should *NOT* test for
 hamiltonicity using ``is_hamiltonian`` before calling
+ Hamiltonicity using ``is_hamiltonian`` before calling
``hamiltonian_cycle`` or ``traveling_salesman_problem``
as it would result in computing it twice.
EXAMPLES:
 The Heawood Graph is known to be hamiltonian ::
+ The Heawood Graph is known to be Hamiltonian ::
sage: g = graphs.HeawoodGraph()
sage: g.is_hamiltonian()