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

« back to all changes in this revision

Viewing changes to engine/manifold/nlensspace.h

  • Committer: Package Import Robot
  • Author(s): Ben Burton
  • Date: 2011-09-10 07:17:25 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: package-import@ubuntu.com-20110910071725-97n90tywdq60w2cr
Tags: 4.90-1
* New upstream release!
* The user interface has been ported from KDE3 to KDE4 (closes: #556318).
  Re-enabled the GUI as a result.
* The build system has been ported from autotools to cmake.
* The new upstream release builds fine on amd64 (closes: #624882).
* Moved the users' handbook into regina-normal-doc.
* Upgraded several suggests/recommends.  Upgraded regina-normal-mpi to
  depend on mpi-default-bin, and regina-normal to depend on both graphviz
  and regina-normal-doc (which the GUI expends to be present).  Upgraded
  regina-normal to recommend gap.
* Bumped standards-version to 3.9.2.0 (no changes required).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *  Regina - A Normal Surface Theory Calculator                           *
5
5
 *  Computational Engine                                                  *
6
6
 *                                                                        *
7
 
 *  Copyright (c) 1999-2009, Ben Burton                                   *
 
7
 *  Copyright (c) 1999-2011, Ben Burton                                   *
8
8
 *  For further details contact Ben Burton (bab@debian.org).              *
9
9
 *                                                                        *
10
10
 *  This program is free software; you can redistribute it and/or         *
26
26
 
27
27
/* end stub */
28
28
 
29
 
/*! \file nlensspace.h
30
 
 *  \brief Deals with general Lens spaces.
 
29
/*! \file manifold/nlensspace.h
 
30
 *  \brief Deals with general lens spaces.
31
31
 */
32
32
 
33
33
#ifndef __NLENSSPACE_H
35
35
#define __NLENSSPACE_H
36
36
#endif
37
37
 
 
38
#include "regina-core.h"
38
39
#include "nmanifold.h"
39
40
 
40
41
namespace regina {
45
46
 */
46
47
 
47
48
/**
48
 
 * Represents a general Lens space.
 
49
 * Represents a general lens space.
 
50
 *
 
51
 * The lens space L(\a p,\a q) is the 3-manifold you get by
 
52
 * \a p/q Dehn surgery on the unknot.  For instance, L(1,0) and L(1,1)
 
53
 * are the 3-sphere, L(0,1) is the product S^1 x S^2, and L(\a p,1) is the
 
54
 * circle bundle over S^2 with Euler class \a p.  In L(\a p,\a q) if you
 
55
 * take a generator \a g of H_1 and evaluate the torsion linking form on it,
 
56
 * then <\a g,\a g> = [+/- \a r^2 \a q/\a p] in Q/Z where \a r is an
 
57
 * integer.
49
58
 *
50
59
 * All optional NManifold routines are implemented for this class.
51
60
 *
52
61
 * \testpart
53
62
 */
54
 
class NLensSpace : public NManifold {
 
63
class REGINA_API NLensSpace : public NManifold {
55
64
    private:
56
65
        unsigned long p;
57
 
            /**< The first parameter of the Lens space. */
 
66
            /**< The first parameter of the lens space. */
58
67
        unsigned long q;
59
 
            /**< The second parameter of the Lens space.  This will
 
68
            /**< The second parameter of the lens space.  This will
60
69
                 always be stored in reduced form. */
61
70
 
62
71
    public:
63
72
        /**
64
 
         * Creates a new Lens space with the given parameters.
 
73
         * Creates a new lens space with the given parameters.
 
74
         * See the class notes for details.
65
75
         *
66
76
         * \pre The two given parameters are coprime (have a gcd of 1).
67
77
         *
68
 
         * @param newP the first parameter \a p of the Lens space L(p,q).
69
 
         * @param newQ the second parameter \a q of the Lens space L(p,q).
 
78
         * @param newP the first parameter \a p of the lens space L(p,q).
 
79
         * @param newQ the second parameter \a q of the lens space L(p,q).
70
80
         * Note that there are no range restrictions whatsoever on this
71
81
         * parameter.
72
82
         */
73
83
        NLensSpace(unsigned long newP, unsigned long newQ);
74
84
        /**
75
 
         * Creates a clone of the given Lens space.
 
85
         * Creates a clone of the given lens space.
76
86
         *
77
 
         * @param cloneMe the Lens space to clone.
 
87
         * @param cloneMe the lens space to clone.
78
88
         */
79
89
        NLensSpace(const NLensSpace& cloneMe);
80
90
        /**
81
 
         * Destroys this Lens space.
 
91
         * Destroys this lens space.
82
92
         */
83
93
        virtual ~NLensSpace();
84
94
        /**
85
 
         * Returns the first parameter \a p of this Lens space L(p,q).
 
95
         * Returns the first parameter \a p of this lens space L(p,q).
 
96
         * See the class notes for details.
86
97
         *
87
98
         * @return the first parameter.
88
99
         */
89
100
        unsigned long getP() const;
90
101
        /**
91
 
         * Returns the second parameter \a q of this Lens space L(p,q).
 
102
         * Returns the second parameter \a q of this lens space L(p,q).
 
103
         * See the class notes for details.
 
104
         *
92
105
         * The value of \a q returned will be the smallest \a q between
93
106
         * 0 and <i>p</i>-1 inclusive that produces the same 3-manifold
94
 
         * as this Lens space.  Thus it might not be the value of \a q
95
 
         * that was used to initialise this Lens space.
 
107
         * as this lens space.  This means it might not be the value of \a q
 
108
         * that was used to initialise this lens space.
96
109
         */
97
110
        unsigned long getQ() const;
98
111
        /**
99
 
         * Determines whether this and the given Lens space represent
100
 
         * the same 3-manifold.  Note that this may be true even if they
101
 
         * were initialised with different parameters.
 
112
         * Determines whether this and the given lens space are
 
113
         * homeomorphic 3-manifolds.  Note that this may be true
 
114
         * even if they were initialised with different parameters.
102
115
         *
103
 
         * @param compare the Lens space with which this will be compared.
104
 
         * @return \c true if and only if this and the given Lens space
 
116
         * @param compare the lens space with which this will be compared.
 
117
         * @return \c true if and only if this and the given lens space
105
118
         * are homeomorphic.
106
119
         */
107
120
        bool operator == (const NLensSpace& compare) const;
113
126
 
114
127
    private:
115
128
        /**
116
 
         * Reduces the second parameter \a q to the smallest equivalent value.
 
129
         * Reduces the second parameter \a q to the smallest non-negative
 
130
         * value that gives the same (i.e., a homeomorphic) 3-manifold.
117
131
         */
118
132
        void reduce();
119
133
};