1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
/**************************************************************************
* *
* Regina - A Normal Surface Theory Calculator *
* Computational Engine *
* *
* Copyright (c) 1999-2008, Ben Burton *
* For further details contact Ben Burton (bab@debian.org). *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public *
* License along with this program; if not, write to the Free *
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
**************************************************************************/
/* end stub */
#include <sstream>
#include "subcomplex/naugtrisolidtorus.h"
#include "subcomplex/nblockedsfs.h"
#include "subcomplex/nblockedsfsloop.h"
#include "subcomplex/nblockedsfspair.h"
#include "subcomplex/nblockedsfstriple.h"
#include "subcomplex/nl31pillow.h"
#include "subcomplex/nlayeredchainpair.h"
#include "subcomplex/nlayeredlensspace.h"
#include "subcomplex/nlayeredloop.h"
#include "subcomplex/nlayeredsurfacebundle.h"
#include "subcomplex/npluggedtorusbundle.h"
#include "subcomplex/nplugtrisolidtorus.h"
#include "subcomplex/nsnappeacensustri.h"
#include "subcomplex/ntrivialtri.h"
#include "triangulation/ntriangulation.h"
namespace regina {
std::string NStandardTriangulation::getName() const {
std::ostringstream ans;
writeName(ans);
return ans.str();
}
std::string NStandardTriangulation::getTeXName() const {
std::ostringstream ans;
writeTeXName(ans);
return ans.str();
}
NStandardTriangulation* NStandardTriangulation::isStandardTriangulation(
NComponent* comp) {
NStandardTriangulation* ans;
if ((ans = NTrivialTri::isTrivialTriangulation(comp)))
return ans;
if ((ans = NL31Pillow::isL31Pillow(comp)))
return ans;
if ((ans = NLayeredLensSpace::isLayeredLensSpace(comp)))
return ans;
if ((ans = NLayeredLoop::isLayeredLoop(comp)))
return ans;
if ((ans = NLayeredChainPair::isLayeredChainPair(comp)))
return ans;
if ((ans = NAugTriSolidTorus::isAugTriSolidTorus(comp)))
return ans;
if ((ans = NPlugTriSolidTorus::isPlugTriSolidTorus(comp)))
return ans;
if ((ans = NLayeredSolidTorus::isLayeredSolidTorus(comp)))
return ans;
if ((ans = NSnapPeaCensusTri::isSmallSnapPeaCensusTri(comp)))
return ans;
return 0;
}
NStandardTriangulation* NStandardTriangulation::isStandardTriangulation(
NTriangulation* tri) {
if (tri->getNumberOfComponents() != 1)
return 0;
// Do what we can through components.
NStandardTriangulation* ans;
if ((ans = isStandardTriangulation(tri->getComponent(0))))
return ans;
// Run tests that require entire triangulations.
if ((ans = NBlockedSFS::isBlockedSFS(tri)))
return ans;
if ((ans = NLayeredTorusBundle::isLayeredTorusBundle(tri)))
return ans;
// Save non-geometric graph manifolds until last.
if ((ans = NBlockedSFSLoop::isBlockedSFSLoop(tri)))
return ans;
if ((ans = NBlockedSFSPair::isBlockedSFSPair(tri)))
return ans;
if ((ans = NBlockedSFSTriple::isBlockedSFSTriple(tri)))
return ans;
if ((ans = NPluggedTorusBundle::isPluggedTorusBundle(tri)))
return ans;
// Nup.
return 0;
}
} // namespace regina
|