#17030: Knot Theory as a part of GSoC 2014.
-------------------------------------+-------------------------------------
Reporter: amitjamadagni | Owner: amitjamadagni
Type: task | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: algebraic | Resolution:
topology | Merged in:
Keywords: | Reviewers: Miguel Marco
Authors: Amit Jamadagni, | Work issues:
Miguel Marco | Commit:
Report Upstream: N/A | 013330510468c160af37fb3048c2e5a8cc1aa0eb
Branch: | Stopgaps:
u/amitjamadagni/ticket/17030 |
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by jhpalmieri):
You should add this to the reference manual using changes like these:
{{{
#!diff
diff --git a/src/doc/en/reference/index.rst
b/src/doc/en/reference/index.rst
index 662a079..c5e2211 100644
--- a/src/doc/en/reference/index.rst
+++ b/src/doc/en/reference/index.rst
@@ -69,6 +69,7 @@ Geometry and Topology
* :doc:`Cell Complexes and their Homology <homology/index>`
* :doc:`Differential Forms <tensor/index>`
* :doc:`Parametrized Surfaces <riemannian_geometry/index>`
+* :doc:`Knot Theory <knots/index>`
Number Theory, Algebraic Geometry
---------------------------------
diff --git a/src/doc/en/reference/knots/conf.py
b/src/doc/en/reference/knots/conf.py
new file mode 120000
index 0000000..2bdf7e6
--- /dev/null
+++ b/src/doc/en/reference/knots/conf.py
@@ -0,0 +1 @@
+../conf_sub.py
\ No newline at end of file
diff --git a/src/doc/en/reference/knots/index.rst
b/src/doc/en/reference/knots/index.rst
new file mode 100644
index 0000000..229ccac
--- /dev/null
+++ b/src/doc/en/reference/knots/index.rst
@@ -0,0 +1,9 @@
+Knot theory
+===========
+
+.. toctree::
+ :maxdepth: 2
+
+ sage/knots/link
+
+.. include:: ../footer.txt
}}}
(It may not be clear from this, but `src/doc/en/reference/knots/conf.py`
is a symlink pointing to `src/doc/en/reference/conf_sub.py`.) Once you do
this, you will find that the documentation is a mess: indentations are
wrong, etc. For example, here are some changes I found by looking at the
first few methods:
{{{
#!diff
diff --git a/src/sage/knots/link.py b/src/sage/knots/link.py
index 6259df0..3ed2dd6 100644
--- a/src/sage/knots/link.py
+++ b/src/sage/knots/link.py
@@ -44,18 +44,18 @@ class Link:
2. Oriented Gauss Code
3. Planar Diagram Code
- EXAMPLES::
-
- sage: B = BraidGroup(8)
- sage: L = Link(B([1, 2, 1, -2,-1]))
- sage: L
- Link with 2 components represented by 5 crossings
- sage: L = Link([[[-1, +2, -3, 4, +5, +1, -2, +6, +7, 3, -4, -7,
-6,-5]],[-1, -1, -1, -1, 1, -1, 1]])
- sage: L
- Knot represented by 7 crossings
- sage: L =
Link([[1,8,2,7],[8,4,9,5],[3,9,4,10],[10,1,7,6],[5,3,6,2]])
- sage: L
- Link with 2 components represented by 5 crossings
+ EXAMPLES::
+
+ sage: B = BraidGroup(8)
+ sage: L = Link(B([1, 2, 1, -2,-1]))
+ sage: L
+ Link with 2 components represented by 5 crossings
+ sage: L = Link([[[-1, +2, -3, 4, +5, +1, -2, +6, +7, 3, -4, -7,
-6,-5]],[-1, -1, -1, -1, 1, -1, 1]])
+ sage: L
+ Knot represented by 7 crossings
+ sage: L =
Link([[1,8,2,7],[8,4,9,5],[3,9,4,10],[10,1,7,6],[5,3,6,2]])
+ sage: L
+ Link with 2 components represented by 5 crossings
"""
def __init__(self, data):
@@ -70,6 +70,8 @@ class Link:
Generators of the braid group are used to generate the link.
+ EXAMPLES::
+
sage: B = BraidGroup(8)
sage: L = Link(B([-1, -1, -1, -2,1, -2,3,-2,3]))
sage: L
@@ -92,6 +94,8 @@ class Link:
anti-clockwise, -1 if the direction from the leaving over-cross
to the
leaving under-cross is clockwise.
+ EXAMPLES::
+
# for knots there is only a single component so the input is
as follows
sage: L = Link([[[-1, +2, 3, -4, 5, -6, 7, 8, -2, -5, +6, +1,
-8, -3, 4, -7]],[-1,-1,-
sage: L
@@ -240,8 +244,10 @@ class Link:
r"""
Return the oriented gauss code of the link. The oriented gauss
code has two parts
+
a. The gauss code
b. The orientation of each crossing
+
The following orientation was taken into consideration for
consturction
of knots:
}}}
(And now I just saw that "construction" is misspelled in the last
sentence.)
Doctest coverage is not yet 100%:
{{{
$ sage --coverage src/sage/knots/link.py
------------------------------------------------------------------------
SCORE src/sage/knots/link.py: 85.3% (29 of 34)
Missing documentation:
* line 1686: def _rule_1_(over)
* line 1701: def _rule_2_(over)
* line 1714: def _pd_error_(pd)
* line 1728: def _bracket_(pd_code)
* line 1768: def _rule_4_(rest, c_1, c_2)
------------------------------------------------------------------------
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17030#comment:41>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.