Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2e3ea5c
Preparation for new SFS constructions.
AlexHe98 Nov 9, 2025
9517735
More preparation.
AlexHe98 Nov 10, 2025
089f6ba
Private polygon() routine.
AlexHe98 Nov 10, 2025
7c451be
Make orientable() minimal.
AlexHe98 Nov 10, 2025
c1571be
Test and fix new version of orientable().
AlexHe98 Nov 10, 2025
8895bd6
Make LinkTest recognise another trefoil complement iso sig.
AlexHe98 Nov 10, 2025
72f68cc
Test that orientable() actually returns minimal triangulations.
AlexHe98 Nov 10, 2025
b54ddaa
Make nonOrientable() minimal.
AlexHe98 Nov 10, 2025
f75036e
Update python skeleton test that uses nonOrientable().
AlexHe98 Nov 10, 2025
71281f4
Merge branch 'master' into construct-sfs
AlexHe98 Nov 11, 2025
227c197
TriSolidTorus (part 1).
AlexHe98 Mar 2, 2026
3686a3b
TriSolidTorus (part 2): constructor.
AlexHe98 Mar 2, 2026
f5ca357
TriSolidTorus (part 3): whoops.
AlexHe98 Mar 2, 2026
2767eb5
TriSolidTorus (part 4): boundary square queries.
AlexHe98 Mar 2, 2026
e04d02c
TriSolidTorus (part 5): flipSlope().
AlexHe98 Mar 3, 2026
e0726c2
TriSolidTorus (part 6): orientedJoin().
AlexHe98 Mar 3, 2026
409416b
OrientableCircleBundle.
AlexHe98 Mar 3, 2026
571cec9
Construct any orientable SFS (part 1).
AlexHe98 Mar 3, 2026
2009077
Construct any orientable SFS (part 2): circle bundles (ie, b_ == 0 an…
AlexHe98 Mar 3, 2026
4406060
Construct any orientable SFS (part 3): test existing constructions (p…
AlexHe98 Mar 3, 2026
4fd2623
Construct any orientable SFS (part 4): test existing constructions (p…
AlexHe98 Mar 4, 2026
3cc256d
Construct any orientable SFS (part 5): test existing constructions (p…
AlexHe98 Mar 4, 2026
d29f846
Merge branch 'main' into construct-sfs
AlexHe98 Mar 8, 2026
2e027ed
Construct any orientable SFS (part 6): test existing constructions (p…
AlexHe98 Mar 9, 2026
5d09e66
Construct any orientable SFS (part 7): test and fix circle bundles wi…
AlexHe98 Mar 9, 2026
80c4a4a
???
AlexHe98 Mar 9, 2026
eadf488
Construct any orientable SFS (part 8): fix it.
AlexHe98 Mar 9, 2026
2debcc9
Construct any orientable SFS (part 9): make layerRoles_ static conste…
AlexHe98 Mar 10, 2026
7033be5
Construct any orientable SFS (part 10): generic construction (part 1).
AlexHe98 Mar 10, 2026
0d27792
Construct any orientable SFS (part 11): generic construction (part 2).
AlexHe98 Mar 10, 2026
b31e430
Construct any orientable SFS (part 12): generic construction (part 3).
AlexHe98 Mar 11, 2026
8f08cdb
Construct any orientable SFS (part 13): generic construction (part 4).
AlexHe98 Mar 11, 2026
cd79662
Construct any orientable SFS (part 14): generic construction (part 5).
AlexHe98 Mar 11, 2026
6a2b283
Construct any orientable SFS (part 15): generic construction (part 6).
AlexHe98 Mar 11, 2026
48b0d09
Construct any orientable SFS (part 16): generic construction (part 7).
AlexHe98 Mar 11, 2026
fa74961
Strengthen reduce() for bounded orientable SFS. But this breaks some …
AlexHe98 Mar 11, 2026
581f445
Revert change to reduce(), and modify SFS tests instead.
AlexHe98 Mar 12, 2026
82c6752
Update SFSpace class notes to reflect the changes to construct().
AlexHe98 Mar 15, 2026
e8727b6
Change unsigned longs to size_t in SFSpace.
AlexHe98 Mar 15, 2026
053fd90
Make Example<2>::polygon() public. Also, replace unsigned with size_t…
AlexHe98 Mar 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
786 changes: 722 additions & 64 deletions engine/manifold/sfs.cpp

Large diffs are not rendered by default.

61 changes: 30 additions & 31 deletions engine/manifold/sfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,8 @@ std::ostream& operator << (std::ostream& out, const SFSFibre& f);
* The Manifold routines homology() and construct() are only
* implemented in some cases. The homology() routine is
* implemented if and only if the base orbifold has no punctures.
* The construct() routine is implemented only for lens spaces and
* Seifert fibred spaces over the 2-sphere without punctures or reflector
* boundaries.
* The construct() routine is implemented if and only if the Seifert fibred
* space is orientable.
*
* This class implements C++ move semantics and adheres to the C++ Swappable
* requirement. It is designed to avoid deep copies wherever possible,
Expand Down Expand Up @@ -381,25 +380,25 @@ class SFSpace : public Manifold {
private:
Class class_;
/**< Indicates which of the classes above this space belongs to. */
unsigned long genus_;
size_t genus_;
/**< The genus of the base orbifold. For non-orientable
base orbifolds this is the non-orientable genus. */
unsigned long punctures_;
size_t punctures_;
/**< The number of punctures in the base orbifold whose
boundaries are fibre-preserving. This only counts
ordinary boundary components, not reflector boundary
components. */
unsigned long puncturesTwisted_;
size_t puncturesTwisted_;
/**< The number of punctures in the base orbifold whose
boundaries are fibre-reversing. This only counts
ordinary boundary components, not reflector boundary
components. */
unsigned long reflectors_;
size_t reflectors_;
/**< The number of reflector boundary components in the
base orbifold whose boundaries are fibre-preserving.
These are in addition to the regular boundary components
described by \a punctures_. */
unsigned long reflectorsTwisted_;
size_t reflectorsTwisted_;
/**< The number of reflector boundary components in the
base orbifold whose boundaries are fibre-reversing.
These are in addition to the regular boundary components
Expand All @@ -409,7 +408,7 @@ class SFSpace : public Manifold {
/**< The exceptional fibres. This list will be sorted, and will
only contain fibres for which \a alpha and \a beta are
coprime and 0 ≤ \a beta < \a alpha > 1. */
unsigned long nFibres_;
size_t nFibres_;
/**< The size of the \a fibres_ list, used to avoid calling
the linear time fibres_.size(). */
long b_;
Expand Down Expand Up @@ -457,9 +456,9 @@ class SFSpace : public Manifold {
* components of the base orbifold. These are in addition to
* the ordinary boundary components described by \a puncturesTwisted.
*/
SFSpace(Class useClass, unsigned long genus,
unsigned long punctures = 0, unsigned long puncturesTwisted = 0,
unsigned long reflectors = 0, unsigned long reflectorsTwisted = 0);
SFSpace(Class useClass, size_t genus,
size_t punctures = 0, size_t puncturesTwisted = 0,
size_t reflectors = 0, size_t reflectorsTwisted = 0);
/**
* Creates a new copy of the given Seifert fibred space.
*/
Expand Down Expand Up @@ -520,7 +519,7 @@ class SFSpace : public Manifold {
*
* \return the genus of the base orbifold.
*/
unsigned long baseGenus() const;
size_t baseGenus() const;
/**
* Returns whether or not the base surface is orientable.
* Reflector boundary components of the base orbifold are not
Expand Down Expand Up @@ -576,7 +575,7 @@ class SFSpace : public Manifold {
*
* \return the total number of punctures.
*/
unsigned long punctures() const;
size_t punctures() const;
/**
* Returns the number of punctures of the given type in the base
* orbifold. In other words, this routine returns the number of
Expand All @@ -598,15 +597,15 @@ class SFSpace : public Manifold {
* torus boundaries).
* \return the number of punctures of the given type.
*/
unsigned long punctures(bool twisted) const;
size_t punctures(bool twisted) const;
/**
* Returns the total number of reflector boundary components of the
* base orbifold. This includes both twisted and untwisted
* reflector boundaries.
*
* \return the total number of reflector boundary components.
*/
unsigned long reflectors() const;
size_t reflectors() const;
/**
* Returns the number of reflector boundary components of the
* given type in the base orbifold. This either counts only twisted
Expand All @@ -617,7 +616,7 @@ class SFSpace : public Manifold {
* \c false if only untwisted reflector boundaries should be counted.
* \return the number of reflector boundaries of the given type.
*/
unsigned long reflectors(bool twisted) const;
size_t reflectors(bool twisted) const;

/**
* Returns the number of exceptional fibres in this Seifert fibred
Expand All @@ -628,7 +627,7 @@ class SFSpace : public Manifold {
*
* \return the number of exceptional fibres.
*/
unsigned long fibreCount() const;
size_t fibreCount() const;
/**
* Returns the requested exceptional fibre. Fibres are stored
* in sorted order by \a alpha (the index) and then by \a beta.
Expand All @@ -641,7 +640,7 @@ class SFSpace : public Manifold {
* 0 and getFibreCount()-1 inclusive.
* \return the requested fibre.
*/
SFSFibre fibre(unsigned long which) const;
SFSFibre fibre(size_t which) const;

/**
* Returns the obstruction constant \a b for this Seifert fibred
Expand Down Expand Up @@ -715,7 +714,7 @@ class SFSpace : public Manifold {
* if the new punctures should be untwisted.
* \param nPunctures the number of new punctures to insert.
*/
void addPuncture(bool twisted = false, unsigned long nPunctures = 1);
void addPuncture(bool twisted = false, size_t nPunctures = 1);
/**
* Adds one or more new reflector boundary components to the base
* orbifold. The new reflector boundaries may be twisted or
Expand All @@ -737,7 +736,7 @@ class SFSpace : public Manifold {
* \c false if the new reflector boundaries should be untwisted.
* \param nReflectors the number of new reflector boundaries to add.
*/
void addReflector(bool twisted = false, unsigned long nReflectors = 1);
void addReflector(bool twisted = false, size_t nReflectors = 1);

/**
* Adds the given fibre to this Seifert fibred space.
Expand Down Expand Up @@ -916,7 +915,7 @@ class SFSpace : public Manifold {
* Writes a particular countable feature of the base orbifold to
* the given output stream in either TeX or plain format.
*/
static void writeBaseExtraCount(std::ostream& out, unsigned long count,
static void writeBaseExtraCount(std::ostream& out, size_t count,
const char* object, bool tex);

/**
Expand Down Expand Up @@ -982,9 +981,9 @@ inline SFSpace::SFSpace() : class_(Class::o1), genus_(0),
nFibres_(0), b_(0) {
}

inline SFSpace::SFSpace(SFSpace::Class useClass, unsigned long genus,
unsigned long punctures, unsigned long puncturesTwisted,
unsigned long reflectors, unsigned long reflectorsTwisted) :
inline SFSpace::SFSpace(SFSpace::Class useClass, size_t genus,
size_t punctures, size_t puncturesTwisted,
size_t reflectors, size_t reflectorsTwisted) :
class_(useClass), genus_(genus),
punctures_(punctures), puncturesTwisted_(puncturesTwisted),
reflectors_(reflectors), reflectorsTwisted_(reflectorsTwisted),
Expand All @@ -1007,7 +1006,7 @@ inline SFSpace::Class SFSpace::baseClass() const {
return class_;
}

inline unsigned long SFSpace::baseGenus() const {
inline size_t SFSpace::baseGenus() const {
return genus_;
}

Expand All @@ -1026,23 +1025,23 @@ inline bool SFSpace::fibreNegating() const {
class_ == Class::bo1 || class_ == Class::bn2);
}

inline unsigned long SFSpace::punctures() const {
inline size_t SFSpace::punctures() const {
return punctures_ + puncturesTwisted_;
}

inline unsigned long SFSpace::punctures(bool twisted) const {
inline size_t SFSpace::punctures(bool twisted) const {
return (twisted ? puncturesTwisted_ : punctures_);
}

inline unsigned long SFSpace::reflectors() const {
inline size_t SFSpace::reflectors() const {
return reflectors_ + reflectorsTwisted_;
}

inline unsigned long SFSpace::reflectors(bool twisted) const {
inline size_t SFSpace::reflectors(bool twisted) const {
return (twisted ? reflectorsTwisted_ : reflectors_);
}

inline unsigned long SFSpace::fibreCount() const {
inline size_t SFSpace::fibreCount() const {
return nFibres_;
}

Expand Down
Loading