~ubuntu-branches/ubuntu/vivid/regina-normal/vivid-proposed

« back to all changes in this revision

Viewing changes to engine/engine/knot/nknot.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2006-10-29 22:25:06 UTC
  • mfrom: (3.1.7 edgy)
  • Revision ID: james.westby@ubuntu.com-20061029222506-1y63yl1k6pwhhpwq
Tags: 4.3.1-3
Removed www-browser as an alternative to konqueror in regina-normal-doc
recommendations, since the GUI needs konqueror specifically to open the
API docs from the help menu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/**************************************************************************
3
 
 *                                                                        *
4
 
 *  Regina - A Normal Surface Theory Calculator                           *
5
 
 *  Computational Engine                                                  *
6
 
 *                                                                        *
7
 
 *  Copyright (c) 1999-2004, Ben Burton                                   *
8
 
 *  For further details contact Ben Burton (bab@debian.org).              *
9
 
 *                                                                        *
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.                       *
14
 
 *                                                                        *
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.                              *
19
 
 *                                                                        *
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.                                                   *
24
 
 *                                                                        *
25
 
 **************************************************************************/
26
 
 
27
 
/* end stub */
28
 
 
29
 
/*! \file nknot.h
30
 
 *  \brief Deals with knots and links in S^3.
31
 
 */
32
 
 
33
 
#ifndef __NKNOT_H
34
 
#ifndef __DOXYGEN
35
 
#define __NKNOT_H
36
 
#endif
37
 
 
38
 
#include <string>
39
 
#include <list>
40
 
 
41
 
namespace regina {
42
 
 
43
 
class NTriangulation;
44
 
 
45
 
/**
46
 
 * \addtogroup knot Knots and Links
47
 
 * Knots and links in the 3-sphere.
48
 
 * @{
49
 
 */
50
 
 
51
 
/**
52
 
 * Represents knots and links in S^3 and allows the construction of
53
 
 * triangulations from them.
54
 
 *
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.
58
 
 *
59
 
 * Once a knot or link is created ideal and finite triangulations of
60
 
 * the complement can be constructed.
61
 
 *
62
 
 * \warning This class is incomplete and at the present time should not
63
 
 * be used!
64
 
 *
65
 
 * \ifacespython Will not be present until this class is functional.
66
 
 *
67
 
 * @author David Letscher
68
 
 */
69
 
class NKnot {
70
 
    private:
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. */
78
 
        bool valid;
79
 
            /**< Indicates if the input represents a valid knot or link. */
80
 
 
81
 
    public:
82
 
        /**
83
 
         * Creates the empty link.
84
 
         */
85
 
        NKnot();
86
 
 
87
 
        /**
88
 
         * Creates a knot using its Dowker notation or a spanning surface
89
 
         * representation.
90
 
         *
91
 
         * @param s a string storing the Dowker notation for the knot or
92
 
         * the spanning surface representation of a link.
93
 
         */
94
 
        NKnot(const std::string& s);
95
 
 
96
 
        /**
97
 
         * Returns true if a valid knot or link was created.
98
 
         *
99
 
         * @return the validity of the knot.
100
 
         */
101
 
        bool isValid() const;
102
 
 
103
 
        /**
104
 
         * Creates a triangulation of the knot complement.  Both ideal and finite
105
 
         * triangulations are possible.
106
 
         *
107
 
         * @param ideal is true if an ideal triangulation should be constructed
108
 
         * (default to /c true).
109
 
         *
110
 
         * @return the triangulation of the knot complement.
111
 
         */
112
 
        NTriangulation *getTriang(bool ideal=true);
113
 
 
114
 
    private:
115
 
};
116
 
 
117
 
/*@}*/
118
 
 
119
 
// Inline functions for NKnot
120
 
 
121
 
bool NKnot::isValid() const {
122
 
    return valid;
123
 
}
124
 
 
125
 
} // namespace regina
126
 
 
127
 
#endif
128