2
/**************************************************************************
4
* Regina - A Normal Surface Theory Calculator *
5
* Computational Engine *
7
* Copyright (c) 1999-2004, Ben Burton *
8
* For further details contact Ben Burton (bab@debian.org). *
10
* This program is free software; you can redistribute it and/or *
11
* modify it under the terms of the GNU General Public License as *
12
* published by the Free Software Foundation; either version 2 of the *
13
* License, or (at your option) any later version. *
15
* This program is distributed in the hope that it will be useful, but *
16
* WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18
* General Public License for more details. *
20
* You should have received a copy of the GNU General Public *
21
* License along with this program; if not, write to the Free *
22
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
23
* MA 02111-1307, USA. *
25
**************************************************************************/
30
* \brief Deals with knots and links in S^3.
46
* \addtogroup knot Knots and Links
47
* Knots and links in the 3-sphere.
52
* Represents knots and links in S^3 and allows the construction of
53
* triangulations from them.
55
* A knot/link can be presented in one of two ways: Dowker notation
56
* which works for knots only, or using an embedded of a sign planar
57
* graph in a plane which works for both knots and links.
59
* Once a knot or link is created ideal and finite triangulations of
60
* the complement can be constructed.
62
* \warning This class is incomplete and at the present time should not
65
* \ifacespython Will not be present until this class is functional.
67
* @author David Letscher
71
unsigned numComponents;
72
/**< Stores the number of components of the link. */
73
unsigned numCrossings;
74
/**< Stores the number of crossings in the knot/link. */
75
std::list<std::list<int> > black, white;
76
/**< Stores the internal representations of the black
77
* and white regions. */
79
/**< Indicates if the input represents a valid knot or link. */
83
* Creates the empty link.
88
* Creates a knot using its Dowker notation or a spanning surface
91
* @param s a string storing the Dowker notation for the knot or
92
* the spanning surface representation of a link.
94
NKnot(const std::string& s);
97
* Returns true if a valid knot or link was created.
99
* @return the validity of the knot.
101
bool isValid() const;
104
* Creates a triangulation of the knot complement. Both ideal and finite
105
* triangulations are possible.
107
* @param ideal is true if an ideal triangulation should be constructed
108
* (default to /c true).
110
* @return the triangulation of the knot complement.
112
NTriangulation *getTriang(bool ideal=true);
119
// Inline functions for NKnot
121
bool NKnot::isValid() const {
125
} // namespace regina