Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
minor typos etc
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase committed Aug 3, 2015
1 parent 3eeca75 commit 7331311
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/sage/combinat/designs/twographs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
:delim: |
:meth:`~TwoGraph.is_regular` | returns True if the inc. system is regular twograph
:meth:`~TwoGraph.complement` | returns the complement of self
:meth:`~TwoGraph.descendant` | returns the descendant graph at `w`
:meth:`~TwoGraph.complement` | returns the complement of self
:meth:`~TwoGraph.descendant` | returns the descendant graph at `w`
This module's functions are the following :
Expand Down Expand Up @@ -83,7 +83,7 @@ def is_regular(self, alpha=False, check=False):
sage: p.is_regular(alpha=True)
(False, 0)
sage: p.is_regular()
False
False
"""
if check:
if not is_twograph(self):
Expand All @@ -106,11 +106,11 @@ def descendant(self, v):
(9, 4, 1, 2)
"""
from sage.graphs.graph import Graph
edges = map(lambda y: frozenset(filter(lambda z: z != v, y)),
edges = map(lambda y: frozenset(filter(lambda z: z != v, y)),
filter(lambda x: v in x, self.blocks()))
V = filter(lambda x: x != v, self.ground_set())
return Graph([V, lambda i, j: frozenset((i,j)) in edges])

def complement(self):
"""
the complement
Expand All @@ -131,7 +131,7 @@ def complement(self):
def is_twograph(T):
"""
True if the incidence system is a two-graph
EXAMPLES::
sage: p=graphs.PetersenGraph().twograph()
Expand Down
6 changes: 3 additions & 3 deletions src/sage/graphs/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:meth:`~Graph.join` | Returns the join of self and other.
:meth:`~Graph.seidel_switching` | Returns Seidel switching w.r.t. a subset of vertices.
:meth:`~Graph.seidel_adjacency_matrix` | Returns Seidel adjacency matrix of self.
:meth:`~Graph.twograph` | Returns the two-graph of self.
:meth:`~Graph.twograph` | Returns :class:`two-graph <sage.combinat.designs.twographs.TwoGraph>` of self.
**Distances:**
Expand Down Expand Up @@ -5047,11 +5047,11 @@ def twograph(self):
sage: T8.is_isomorphic(C)
False
"""
from sage.combinat.designs.twographs import TwoGraph
from sage.combinat.designs.twographs import TwoGraph
from itertools import combinations
from sage.misc.functional import is_odd

return TwoGraph(filter(lambda t:
return TwoGraph(filter(lambda t:
is_odd(sum([i in self.neighbors(j) for i,j in combinations(t, 2)])),
combinations(self.vertices(), 3)))

Expand Down

0 comments on commit 7331311

Please sign in to comment.