Regina Calculation Engine
Classes | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
Miscellaneous Utilities

Miscellaneous helper classes and functions. More...

Classes

class  regina::BitManipulatorByType< T >
 Contains implementation details for BitManipulator where we optimise according to the underlying data type. More...
 
class  regina::BitManipulatorBySize< T, size >
 Contains implementation details for BitManipulator where we optimise according to the size of the underlying data type. More...
 
class  regina::BitManipulator< T >
 An optimised class for bitwise analysis and manipulation of native data types. More...
 
class  regina::Bitmask
 A bitmask that can store arbitrarily many true-or-false bits. More...
 
class  regina::Bitmask1< T >
 A small but extremely fast bitmask class that can store up to 8 * sizeof(T) true-or-false bits. More...
 
class  regina::Bitmask2< T, U >
 A small but extremely fast bitmask class that can store up to 8 * sizeof(T) + 8 * sizeof(U) true-or-false bits. More...
 
class  regina::BoolSet
 A set of booleans. More...
 
class  regina::Flags< T >
 A class representing a bitwise combination of flags defined by an enumeration type. More...
 
class  regina::i18n::Locale
 A simple class with static routines for querying information about the current locale. More...
 
class  regina::i18n::IConvStreamBuffer
 An output stream buffer that translates between character encodings. More...
 
class  regina::i18n::IConvStream
 An output stream that converts between character encodings. More...
 
struct  regina::IsReginaInteger< T >
 Determines if the type T is one of Regina's own integer types. More...
 
struct  regina::IntOfSize< bytes >
 Gives access to native integer types that hold exactly k bytes, where k may be any compile-time constant. More...
 
struct  regina::IntOfMinSize< bytes >
 Gives access to native integer types that hold at least k bytes, where k may be any compile-time constant. More...
 
class  regina::ListOnCall< T >
 Offers a hard-coded list of expensive objects that should only be created if they are required. More...
 
class  regina::MarkedElement
 A base class for elements of MarkedVector. More...
 
class  regina::MarkedVector< T >
 A vector of objects with fast, space-efficient reverse lookup of array indices. More...
 
class  regina::mem_istream
 An input stream that reads an array of characters in memory. More...
 
class  regina::mem_streambuf
 A stream buffer that provides the implementation details for mem_istream. More...
 
struct  regina::FuncNew< T >
 An adaptable generator used to create objects using default constructors. More...
 
struct  regina::FuncNewCopyPtr< T >
 An adaptable unary function used to create objects using copy constructors. More...
 
struct  regina::FuncNewCopyRef< T >
 An adaptable unary function used to create objects using copy constructors. More...
 
struct  regina::FuncNewClonePtr< T >
 An adaptable unary function used to create objects using the clone() method. More...
 
struct  regina::FuncDelete< T >
 An adaptable unary function used to deallocate objects. More...
 
class  regina::StoreValue< T >
 A Property storage policy indicating that the property should be held by value. More...
 
class  regina::StoreConstPtr< T >
 A Property storage policy indicating that the property should be held by constant pointer. More...
 
class  regina::StoreManagedPtr< T >
 A Property storage policy indicating that the property should be held by pointer and that the property wrapper will also take responsibility for memory management. More...
 
class  regina::Property< T, Storage >
 Stores a calculable property of an object. More...
 
class  regina::LessDeref< T, Comp >
 An adaptable binary function used to compare the objects to which pointers are pointing. More...
 
class  regina::Qitmask1< T >
 A small but extremely fast "base 4 bitmask" class that can store up to 8 * sizeof(T) "qits", each equal to 0, 1, 2 or 3. More...
 
class  regina::Qitmask2< T, U >
 A small but extremely fast "base 4 bitmask" class that can store up to 8 * sizeof(T) + 8 * sizeof(U) "qits", each equal to 0, 1, 2 or 3. More...
 
class  regina::RandomEngine
 Offers threadsafe access to Regina's global uniform random bit generator. More...
 
struct  regina::Returns< ReturnType_ >
 A convenience base class for a non-void function object, which does nothing beyond provide a ReturnType typedef. More...
 
class  regina::HasReturnType< T >
 Internal to ReturnsTraits. More...
 
struct  regina::ReturnsTraitsImplementation< T, hasReturnType >
 Provides the implementation of ReturnsTraits. More...
 
struct  regina::ReturnsTraits< T >
 Helper class to assist with compile-time analysis of Regina's function objects. More...
 
struct  regina::NewFunction< Base >
 A function object that creates a new object subclassed from Base, where the particular subclass is chosen according to the template argument to operator(). More...
 
class  regina::SafePointeeBase< T >
 A base class for objects of type T to be referenceable by a SafePtr. More...
 
class  regina::SafePtr< T >
 A reference counted smart pointer that supports alternate models of ownership. More...
 
class  regina::LightweightSequence< T >
 A lightweight class for storing a random-access sequence of objects. More...
 
struct  regina::LightweightSequence< T >::Less
 A binary function object that compares sequences lexicographically, for use in containers that hold pointers to sequences. More...
 
class  regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >
 A binary function object for comparing subsequences, for use in associative containers whose keys are pointers to sequences. More...
 
class  regina::TrieSet< T >
 A trie-like data structure for storing and retriving sets. More...
 
class  regina::Tritmask1< T >
 A small but extremely fast "ternary bitmask" class that can store up to 8 * sizeof(T) "trits", each equal to 0, 1 or 2. More...
 
class  regina::Tritmask2< T, U >
 A small but extremely fast "ternary bitmask" class that can store up to 8 * sizeof(T) + 8 * sizeof(U) "trits", each equal to 0, 1 or 2. More...
 
class  regina::xml::XMLPropertyDict
 Represents a map from property names to property values. More...
 
class  regina::xml::XMLParserCallback
 Provides the callbacks for an XMLParser. More...
 
class  regina::xml::XMLParser
 Used to parse an entire XML file. More...
 

Macros

#define INT128_AVAILABLE
 Defined if and only if native 128-bit arithmetic is available on this platform. More...
 

Typedefs

typedef Bitmask1< unsigned char > regina::BitmaskLen8
 A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 8 true-or-false bits. More...
 
typedef Bitmask1< unsigned int > regina::BitmaskLen16
 A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 16 true-or-false bits. More...
 
typedef InternalBitmaskLen32 ::Type regina::BitmaskLen32
 A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 32 true-or-false bits. More...
 
typedef InternalBitmaskLen64 ::Type regina::BitmaskLen64
 A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 64 true-or-false bits. More...
 
typedef BoolSet regina::NBoolSet
 Deprecated typedef for backward compatibility. More...
 
typedef T regina::Flags< T >::Enum
 The underlying enumeration type. More...
 
typedef void regina::IntOfSize< bytes >::type
 A native signed integer type with exactly k bytes, where k is the template parameter. More...
 
typedef void regina::IntOfSize< bytes >::utype
 A native unsigned integer type with exactly k bytes, where k is the template parameter. More...
 
typedef IntOfSize< nextPowerOfTwo(bytes)>::type regina::IntOfMinSize< bytes >::type
 A native signed integer type with at least k bytes, where k is the template parameter. More...
 
typedef IntOfSize< nextPowerOfTwo(bytes)>::utype regina::IntOfMinSize< bytes >::utype
 A native unsigned integer type with at least k bytes, where k is the template parameter. More...
 
typedef std::list< const T * >::const_iterator regina::ListOnCall< T >::iterator
 An iterator over this list. More...
 
typedef T * regina::FuncNew< T >::result_type
 The return type for this generator. More...
 
typedef const T * regina::FuncNewCopyPtr< T >::argument_type
 The argument type for this unary function. More...
 
typedef T * regina::FuncNewCopyPtr< T >::result_type
 The return type for this unary function. More...
 
typedef const T & regina::FuncNewCopyRef< T >::argument_type
 The argument type for this unary function. More...
 
typedef T * regina::FuncNewCopyRef< T >::result_type
 The return type for this unary function. More...
 
typedef const T * regina::FuncNewClonePtr< T >::argument_type
 The argument type for this unary function. More...
 
typedef T * regina::FuncNewClonePtr< T >::result_type
 The return type for this unary function. More...
 
typedef T * regina::FuncDelete< T >::argument_type
 The argument type for this unary function. More...
 
typedef void regina::FuncDelete< T >::result_type
 The return type for this unary function. More...
 
typedef const T & regina::StoreValue< T >::InitType
 The type by which new values for the underlying property are passed. More...
 
typedef const T & regina::StoreValue< T >::QueryType
 The type by which the property value is returned to the user. More...
 
typedef const T * regina::StoreConstPtr< T >::InitType
 The type by which new values for the underlying property are passed. More...
 
typedef const T * regina::StoreConstPtr< T >::QueryType
 The type by which the property value is returned to the user. More...
 
typedef T * regina::StoreManagedPtr< T >::InitType
 The type by which new values for the underlying property are passed. More...
 
typedef const T * regina::StoreManagedPtr< T >::QueryType
 The type by which the property value is returned to the user. More...
 
typedef Storage< T >::InitType regina::Property< T, Storage >::InitType
 The type by which new values for the underlying property are passed. More...
 
typedef Storage< T >::QueryType regina::Property< T, Storage >::QueryType
 The type by which the property value is returned to the user. More...
 
typedef const T * regina::LessDeref< T, Comp >::first_argument_type
 The first argument type for this binary function. More...
 
typedef const T * regina::LessDeref< T, Comp >::second_argument_type
 The second argument type for this binary function. More...
 
typedef bool regina::LessDeref< T, Comp >::result_type
 The result type for this binary comparison function. More...
 
typedef Qitmask1< unsigned char > regina::QitmaskLen8
 A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 8 true-or-false bits. More...
 
typedef Qitmask1< unsigned int > regina::QitmaskLen16
 A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 16 true-or-false bits. More...
 
typedef InternalQitmaskLen32 ::Type regina::QitmaskLen32
 A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 32 true-or-false bits. More...
 
typedef InternalQitmaskLen64 ::Type regina::QitmaskLen64
 A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 64 true-or-false bits. More...
 
typedef ReturnType_ regina::Returns< ReturnType_ >::ReturnType
 Indicates the return type for a function object. More...
 
typedef T regina::SafePointeeBase< T >::SafePointeeType
 The type of object being pointed to. More...
 
typedef T regina::SafePtr< T >::element_type
 The pointee type. More...
 
typedef T * regina::LightweightSequence< T >::iterator
 An iterator type for read-write access to the elements of a sequence. More...
 
typedef const T * regina::LightweightSequence< T >::const_iterator
 An iterator type for read-only access to the elements of a sequence. More...
 
typedef Tritmask1< unsigned char > regina::TritmaskLen8
 A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 8 true-or-false bits. More...
 
typedef Tritmask1< unsigned int > regina::TritmaskLen16
 A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 16 true-or-false bits. More...
 
typedef InternalTritmaskLen32 ::Type regina::TritmaskLen32
 A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 32 true-or-false bits. More...
 
typedef InternalTritmaskLen64 ::Type regina::TritmaskLen64
 A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 64 true-or-false bits. More...
 

Enumerations

enum  { regina::BitManipulatorByType< T >::specialised = 0 }
 
enum  { regina::BitManipulatorBySize< T, size >::specialised = 0 }
 
enum  { regina::BitManipulator< T >::specialised }
 
enum  { regina::HasReturnType< T >::value = (sizeof(test<T>(0)) == sizeof(yes)) }
 

Functions

size_t regina::base64Length (size_t bytes)
 Returns the number of base64 characters required to encode the given number of bytes. More...
 
bool regina::isBase64 (char ch)
 Determines whether the given character is a base64 printable character as used by the base64 routines in Regina. More...
 
void regina::base64Encode (const char *in, size_t inlen, char *out, size_t outlen)
 Encodes the given sequence of raw bytes in base64, and writes the results into a preallocated output buffer. More...
 
size_t regina::base64Encode (const char *in, size_t inlen, char **out)
 Encodes the given sequence of raw bytes in base64, and passes back a newly allocated array containing the results. More...
 
bool regina::base64Decode (const char *in, size_t inlen, char *out, size_t *outlen)
 Decodes the given sequence of base64 characters, and writes the resulting raw bytes into a preallocated output buffer. More...
 
bool regina::base64Decode (const char *in, size_t inlen, char **out, size_t *outlen)
 Decodes the given sequence of base64 characters, and passes back a newly allocated array containing the results. More...
 
static T regina::BitManipulatorByType< T >::nextPermutation (T x)
 Returns the next largest integer with the same number of true bits as x. More...
 
static int regina::BitManipulatorBySize< T, size >::bits (T x)
 Returns the number of bits that are set to 1 in the given integer. More...
 
static int regina::BitManipulator< T >::firstBit (T x)
 Returns the index of the first true bit in the given integer, or -1 if the given integer is zero. More...
 
static int regina::BitManipulator< T >::lastBit (T x)
 Returns the index of the last true bit in the given integer, or -1 if the given integer is zero. More...
 
 regina::Bitmask::Bitmask ()
 Creates a new invalid bitmask. More...
 
 regina::Bitmask::Bitmask (size_t length)
 Creates a new bitmask of the given length with all bits set to false. More...
 
 regina::Bitmask::Bitmask (const Bitmask &cloneMe)
 Creates a clone of the given bitmask. More...
 
 regina::Bitmask::~Bitmask ()
 Destroys this bitmask. More...
 
bool regina::Bitmask::get (size_t index) const
 Returns the value of the given bit of this bitmask. More...
 
void regina::Bitmask::set (size_t index, bool value)
 Sets the given bit of this bitmask to the given value. More...
 
template<typename ForwardIterator >
void regina::Bitmask::set (ForwardIterator indexBegin, ForwardIterator indexEnd, bool value)
 Sets all bits in the given sorted list to the given value. More...
 
void regina::Bitmask::reset ()
 Sets all bits of this bitmask to false. More...
 
void regina::Bitmask::reset (size_t length)
 Resizes this bitmask to the given length and sets all bits to false. More...
 
Bitmaskregina::Bitmask::operator= (const Bitmask &other)
 Sets this bitmask to a copy of the given bitmask. More...
 
void regina::Bitmask::truncate (size_t numBits)
 Leaves the first numBits bits of this bitmask intact, but sets all subsequent bits to false. More...
 
Bitmaskregina::Bitmask::operator&= (const Bitmask &other)
 Sets this to the intersection of this and the given bitmask. More...
 
Bitmaskregina::Bitmask::operator|= (const Bitmask &other)
 Sets this to the union of this and the given bitmask. More...
 
Bitmaskregina::Bitmask::operator^= (const Bitmask &other)
 Sets this to the exclusive disjunction (XOR) of this and the given bitmask. More...
 
Bitmaskregina::Bitmask::operator-= (const Bitmask &other)
 Sets this to the set difference of this and the given bitmask. More...
 
void regina::Bitmask::flip ()
 Negates every bit in this bitmask. More...
 
bool regina::Bitmask::operator== (const Bitmask &other) const
 Determines whether this and the given bitmask are identical. More...
 
bool regina::Bitmask::lessThan (const Bitmask &other) const
 Determines whether this bitmask appears strictly before the given bitmask when bitmasks are sorted in lexicographical order. More...
 
bool regina::Bitmask::operator<= (const Bitmask &other) const
 Determines whether this bitmask is entirely contained within the given bitmask. More...
 
bool regina::Bitmask::inUnion (const Bitmask &x, const Bitmask &y) const
 Determines whether this bitmask is entirely contained within the union of the two given bitmasks. More...
 
bool regina::Bitmask::containsIntn (const Bitmask &x, const Bitmask &y) const
 Determines whether this bitmask contains the intersection of the two given bitmasks. More...
 
size_t regina::Bitmask::bits () const
 Returns the number of bits currently set to true in this bitmask. More...
 
long regina::Bitmask::firstBit () const
 Returns the index of the first true bit in this bitmask, or -1 if there are no true bits. More...
 
long regina::Bitmask::lastBit () const
 Returns the index of the last true bit in this bitmask, or -1 if there are no true bits. More...
 
bool regina::Bitmask::atMostOneBit () const
 Determines whether at most one bit is set to true in this bitmask. More...
 
std::ostream & regina::operator<< (std::ostream &out, const Bitmask &mask)
 Writes the given bitmask to the given output stream as a sequence of zeroes and ones. More...
 
template<typename T >
std::ostream & regina::operator<< (std::ostream &out, const Bitmask1< T > &mask)
 Writes the given bitmask to the given output stream as a sequence of zeroes and ones. More...
 
 regina::Bitmask1< T >::Bitmask1 ()
 Creates a new bitmask with all bits set to false. More...
 
 regina::Bitmask1< T >::Bitmask1 (size_t)
 Creates a new bitmask with all bits set to false. More...
 
 regina::Bitmask1< T >::Bitmask1 (const Bitmask1< T > &cloneMe)=default
 Creates a clone of the given bitmask. More...
 
void regina::Bitmask1< T >::reset ()
 Sets all bits of this bitmask to false. More...
 
void regina::Bitmask1< T >::reset (size_t)
 Sets all bits of this bitmask to false. More...
 
Bitmask1< T > & regina::Bitmask1< T >::operator= (const Bitmask1< T > &other)=default
 Sets this bitmask to a copy of the given bitmask. More...
 
void regina::Bitmask1< T >::truncate (size_t numBits)
 Leaves the first numBits bits of this bitmask intact, but sets all subsequent bits to false. More...
 
bool regina::Bitmask1< T >::get (size_t index) const
 Returns the value of the given bit of this bitmask. More...
 
void regina::Bitmask1< T >::set (size_t index, bool value)
 Sets the given bit of this bitmask to the given value. More...
 
template<typename ForwardIterator >
void regina::Bitmask1< T >::set (ForwardIterator indexBegin, ForwardIterator indexEnd, bool value)
 Sets all bits in the given sorted list to the given value. More...
 
Bitmask1< T > & regina::Bitmask1< T >::operator&= (const Bitmask1< T > &other)
 Sets this to the intersection of this and the given bitmask. More...
 
Bitmask1< T > & regina::Bitmask1< T >::operator|= (const Bitmask1< T > &other)
 Sets this to the union of this and the given bitmask. More...
 
Bitmask1< T > & regina::Bitmask1< T >::operator^= (const Bitmask1< T > &other)
 Sets this to the exclusive disjunction (XOR) of this and the given bitmask. More...
 
Bitmask1< T > & regina::Bitmask1< T >::operator-= (const Bitmask1< T > &other)
 Sets this to the set difference of this and the given bitmask. More...
 
void regina::Bitmask1< T >::flip ()
 Negates every bit in this bitmask. More...
 
bool regina::Bitmask1< T >::operator== (const Bitmask1< T > &other) const
 Determines whether this and the given bitmask are identical. More...
 
bool regina::Bitmask1< T >::lessThan (const Bitmask1< T > &other) const
 Determines whether this bitmask appears strictly before the given bitmask when bitmasks are sorted in lexicographical order. More...
 
bool regina::Bitmask1< T >::operator<= (const Bitmask1< T > &other) const
 Determines whether this bitmask is entirely contained within the given bitmask. More...
 
bool regina::Bitmask1< T >::inUnion (const Bitmask1< T > &x, const Bitmask1< T > &y) const
 Determines whether this bitmask is entirely contained within the union of the two given bitmasks. More...
 
bool regina::Bitmask1< T >::containsIntn (const Bitmask1< T > &x, const Bitmask1< T > &y) const
 Determines whether this bitmask contains the intersection of the two given bitmasks. More...
 
size_t regina::Bitmask1< T >::bits () const
 Returns the number of bits currently set to true in this bitmask. More...
 
long regina::Bitmask1< T >::firstBit () const
 Returns the index of the first true bit in this bitmask, or -1 if there are no true bits. More...
 
long regina::Bitmask1< T >::lastBit () const
 Returns the index of the last true bit in this bitmask, or -1 if there are no true bits. More...
 
bool regina::Bitmask1< T >::atMostOneBit () const
 Determines whether at most one bit is set to true in this bitmask. More...
 
template<typename T , typename U >
std::ostream & regina::operator<< (std::ostream &out, const Bitmask2< T, U > &mask)
 Writes the given bitmask to the given output stream as a sequence of zeroes and ones. More...
 
 regina::Bitmask2< T, U >::Bitmask2 ()
 Creates a new bitmask with all bits set to false. More...
 
 regina::Bitmask2< T, U >::Bitmask2 (size_t)
 Creates a new bitmask with all bits set to false. More...
 
 regina::Bitmask2< T, U >::Bitmask2 (const Bitmask2< T, U > &cloneMe)=default
 Creates a clone of the given bitmask. More...
 
void regina::Bitmask2< T, U >::reset ()
 Sets all bits of this bitmask to false. More...
 
void regina::Bitmask2< T, U >::reset (size_t)
 Sets all bits of this bitmask to false. More...
 
Bitmask2< T, U > & regina::Bitmask2< T, U >::operator= (const Bitmask2< T, U > &other)=default
 Sets this bitmask to a copy of the given bitmask. More...
 
void regina::Bitmask2< T, U >::truncate (size_t numBits)
 Leaves the first numBits bits of this bitmask intact, but sets all subsequent bits to false. More...
 
bool regina::Bitmask2< T, U >::get (size_t index) const
 Returns the value of the given bit of this bitmask. More...
 
void regina::Bitmask2< T, U >::set (size_t index, bool value)
 Sets the given bit of this bitmask to the given value. More...
 
template<typename ForwardIterator >
void regina::Bitmask2< T, U >::set (ForwardIterator indexBegin, ForwardIterator indexEnd, bool value)
 Sets all bits in the given sorted list to the given value. More...
 
Bitmask2< T, U > & regina::Bitmask2< T, U >::operator&= (const Bitmask2< T, U > &other)
 Sets this to the intersection of this and the given bitmask. More...
 
Bitmask2< T, U > & regina::Bitmask2< T, U >::operator|= (const Bitmask2< T, U > &other)
 Sets this to the union of this and the given bitmask. More...
 
Bitmask2< T, U > & regina::Bitmask2< T, U >::operator^= (const Bitmask2< T, U > &other)
 Sets this to the exclusive disjunction (XOR) of this and the given bitmask. More...
 
Bitmask2< T, U > & regina::Bitmask2< T, U >::operator-= (const Bitmask2< T, U > &other)
 Sets this to the set difference of this and the given bitmask. More...
 
void regina::Bitmask2< T, U >::flip ()
 Negates every bit in this bitmask. More...
 
bool regina::Bitmask2< T, U >::operator== (const Bitmask2< T, U > &other) const
 Determines whether this and the given bitmask are identical. More...
 
bool regina::Bitmask2< T, U >::lessThan (const Bitmask2< T, U > &other) const
 Determines whether this bitmask appears strictly before the given bitmask when bitmasks are sorted in lexicographical order. More...
 
bool regina::Bitmask2< T, U >::operator<= (const Bitmask2< T, U > &other) const
 Determines whether this bitmask is entirely contained within the given bitmask. More...
 
bool regina::Bitmask2< T, U >::inUnion (const Bitmask2< T, U > &x, const Bitmask2< T, U > &y) const
 Determines whether this bitmask is entirely contained within the union of the two given bitmasks. More...
 
bool regina::Bitmask2< T, U >::containsIntn (const Bitmask2< T, U > &x, const Bitmask2< T, U > &y) const
 Determines whether this bitmask contains the intersection of the two given bitmasks. More...
 
size_t regina::Bitmask2< T, U >::bits () const
 Returns the number of bits currently set to true in this bitmask. More...
 
long regina::Bitmask2< T, U >::firstBit () const
 Returns the index of the first true bit in this bitmask, or -1 if there are no true bits. More...
 
long regina::Bitmask2< T, U >::lastBit () const
 Returns the index of the last true bit in this bitmask, or -1 if there are no true bits. More...
 
bool regina::Bitmask2< T, U >::atMostOneBit () const
 Determines whether at most one bit is set to true in this bitmask. More...
 
 regina::BoolSet::BoolSet ()
 Creates a new empty set. More...
 
 regina::BoolSet::BoolSet (bool member)
 Creates a set containing a single member as given. More...
 
 regina::BoolSet::BoolSet (const BoolSet &cloneMe)=default
 Creates a set equal to the given set. More...
 
 regina::BoolSet::BoolSet (bool insertTrue, bool insertFalse)
 Creates a set specifying whether true and/or false should be a member. More...
 
bool regina::BoolSet::hasTrue () const
 Determines if true is a member of this set. More...
 
bool regina::BoolSet::hasFalse () const
 Determines if false is a member of this set. More...
 
bool regina::BoolSet::contains (bool value) const
 Determines if the given boolean is a member of this set. More...
 
void regina::BoolSet::insertTrue ()
 Inserts true into this set if it is not already present. More...
 
void regina::BoolSet::insertFalse ()
 Inserts false into this set if it is not already present. More...
 
void regina::BoolSet::removeTrue ()
 Removes true from this set if it is present. More...
 
void regina::BoolSet::removeFalse ()
 Removes false from this set if it is present. More...
 
void regina::BoolSet::empty ()
 Removes all elements from this set. More...
 
void regina::BoolSet::fill ()
 Places both true and false into this set if they are not already present. More...
 
bool regina::BoolSet::operator== (const BoolSet &other) const
 Determines if this set is equal to the given set. More...
 
bool regina::BoolSet::operator!= (const BoolSet &other) const
 Determines if this set is not equal to the given set. More...
 
bool regina::BoolSet::operator< (const BoolSet &other) const
 Determines if this set is a proper subset of the given set. More...
 
bool regina::BoolSet::operator> (const BoolSet &other) const
 Determines if this set is a proper superset of the given set. More...
 
bool regina::BoolSet::operator<= (const BoolSet &other) const
 Determines if this set is a subset of (possibly equal to) the given set. More...
 
bool regina::BoolSet::operator>= (const BoolSet &other) const
 Determines if this set is a superset of (possibly equal to) the given set. More...
 
BoolSetregina::BoolSet::operator= (const BoolSet &cloneMe)=default
 Sets this set to be identical to the given set. More...
 
BoolSetregina::BoolSet::operator= (bool member)
 Sets this set to the single member set containing the given element. More...
 
BoolSetregina::BoolSet::operator|= (const BoolSet &other)
 Sets this set to be the union of this and the given set. More...
 
BoolSetregina::BoolSet::operator&= (const BoolSet &other)
 Sets this set to be the intersection of this and the given set. More...
 
BoolSetregina::BoolSet::operator^= (const BoolSet &other)
 Sets this set to be the symmetric difference of this and the given set. More...
 
BoolSet regina::BoolSet::operator| (const BoolSet &other) const
 Returns the union of this set with the given set. More...
 
BoolSet regina::BoolSet::operator& (const BoolSet &other) const
 Returns the intersection of this set with the given set. More...
 
BoolSet regina::BoolSet::operator^ (const BoolSet &other) const
 Returns the symmetric difference of this set and the given set. More...
 
BoolSet regina::BoolSet::operator~ () const
 Returns the complement of this set. More...
 
unsigned char regina::BoolSet::byteCode () const
 Returns the byte code representing this boolean set. More...
 
void regina::BoolSet::setByteCode (unsigned char code)
 Sets this boolean set to that represented by the given byte code. More...
 
static BoolSet regina::BoolSet::fromByteCode (unsigned char code)
 Creates a boolean set from the given byte code. More...
 
std::ostream & regina::operator<< (std::ostream &out, const BoolSet &set)
 Writes the given boolean set to the given output stream. More...
 
 regina::Flags< T >::Flags ()
 Creates an empty flag set, with no flags set at all. More...
 
 regina::Flags< T >::Flags (T init)
 Creates a flag set initialised to the given value. More...
 
 regina::Flags< T >::Flags (const Flags< T > &init)=default
 Creates a clone of the given flag set. More...
 
int regina::Flags< T >::intValue () const
 Returns the integer representation of this set. More...
 
static Flags< T > regina::Flags< T >::fromInt (int value)
 Returns the set corresponding to the given integer value. More...
 
bool regina::Flags< T >::has (T flag) const
 Returns whether the given flag is set. More...
 
bool regina::Flags< T >::has (const Flags< T > &rhs) const
 Returns whether all of the flags in the given set are set. More...
 
bool regina::Flags< T >::operator== (T rhs) const
 Determines whether this set is precisely equal to the given flag. More...
 
bool regina::Flags< T >::operator== (const Flags< T > &rhs) const
 Determines whether this set is precisely equal to the given flag set. More...
 
bool regina::Flags< T >::operator!= (T rhs) const
 Determines whether this set is not equal to the given flag. More...
 
bool regina::Flags< T >::operator!= (const Flags< T > &rhs) const
 Determines whether this set is not equal to the given flag set. More...
 
Flags< T > & regina::Flags< T >::operator= (T rhs)
 Sets this flag set to contain precisely the given flag only. More...
 
Flags< T > & regina::Flags< T >::operator= (const Flags< T > &rhs)=default
 Sets this flag set to contain a copy of the given flag set. More...
 
Flags< T > & regina::Flags< T >::operator|= (T rhs)
 Changes this flag set by taking a bitwise OR with the given flag. More...
 
Flags< T > & regina::Flags< T >::operator|= (const Flags< T > &rhs)
 Changes this flag set by taking a bitwise OR with the given flag set. More...
 
Flags< T > & regina::Flags< T >::operator&= (T rhs)
 Changes this flag set by taking a bitwise AND with the given flag. More...
 
Flags< T > & regina::Flags< T >::operator&= (const Flags< T > &rhs)
 Changes this flag set by taking a bitwise AND with the given flag set. More...
 
Flags< T > & regina::Flags< T >::operator^= (T rhs)
 Changes this flag set by taking a bitwise XOR with the given flag. More...
 
Flags< T > & regina::Flags< T >::operator^= (const Flags< T > &rhs)
 Changes this flag set by taking a bitwise XOR with the given flag set. More...
 
Flags< T > regina::Flags< T >::operator| (T rhs) const
 Returns the bitwise OR of this set and the given flag. More...
 
Flags< T > regina::Flags< T >::operator| (const Flags< T > &rhs) const
 Returns the bitwise OR of this and the given flag set. More...
 
Flags< T > regina::Flags< T >::operator& (T rhs) const
 Returns the bitwise AND of this set and the given flag. More...
 
Flags< T > regina::Flags< T >::operator& (const Flags< T > &rhs) const
 Returns the bitwise AND of this and the given flag set. More...
 
Flags< T > regina::Flags< T >::operator^ (T rhs) const
 Returns the bitwise XOR of this set and the given flag. More...
 
Flags< T > regina::Flags< T >::operator^ (const Flags< T > &rhs) const
 Returns the bitwise XOR of this and the given flag set. More...
 
void regina::Flags< T >::clear (T rhs)
 Clears all bits from this set that appear in the given flag. More...
 
void regina::Flags< T >::clear (const Flags< T > &rhs)
 Clears all bits from this set that appear in the given set. More...
 
void regina::Flags< T >::ensureOne (T default_, T other)
 Adjust this set so that exactly one and only one of the two given flags are included. More...
 
void regina::Flags< T >::ensureOne (T default_, T second, T last)
 Adjust this set so that exactly one and only one of the three given flags are included. More...
 
void regina::Flags< T >::ensureOne (T default_, T second, T third, T last)
 Adjust this set so that exactly one and only one of the four given flags are included. More...
 
std::string::const_iterator regina::i18n::utf8ValidTo (const std::string &s)
 Identifies the longest prefix of the given string that is valid UTF-8. More...
 
const char * regina::i18n::utf8ValidTo (const char *s)
 Identifies the longest prefix of the given string that is valid UTF-8. More...
 
static const char * regina::i18n::Locale::codeset ()
 Returns the character encoding used in the current locale. More...
 
 regina::i18n::IConvStreamBuffer::IConvStreamBuffer ()
 Creates a new stream buffer. More...
 
 regina::i18n::IConvStreamBuffer::~IConvStreamBuffer ()
 Destroys this stream buffer. More...
 
IConvStreamBufferregina::i18n::IConvStreamBuffer::open (std::ostream &dest, const char *srcCode, const char *destCode)
 Opens a new stream buffer that wraps around the given output stream. More...
 
IConvStreamBufferregina::i18n::IConvStreamBuffer::close () throw ()
 Closes this stream buffer. More...
 
int_type regina::i18n::IConvStreamBuffer::overflow (int_type c)
 Sends buffered data to the destination output stream, converting between character sets en route. More...
 
int_type regina::i18n::IConvStreamBuffer::underflow ()
 Simply returns EOF (since this is not an input stream). More...
 
int regina::i18n::IConvStreamBuffer::sync ()
 Flushes all output buffers. More...
 
 regina::i18n::IConvStreamBuffer::IConvStreamBuffer (const IConvStreamBuffer &)=delete
 
IConvStreamBufferregina::i18n::IConvStreamBuffer::operator= (const IConvStreamBuffer &)=delete
 
 regina::i18n::IConvStream::IConvStream (std::ostream &dest, const char *srcCode, const char *destCode)
 Creates a new IConvStream; see the class notes for details. More...
 
 regina::i18n::IConvStream::IConvStream (const IConvStream &)=delete
 
IConvStreamregina::i18n::IConvStream::operator= (const IConvStream &)=delete
 
template<typename IntType >
constexpr int regina::bitsRequired (IntType n)
 Returns the number of bits required to store integers in the range 0,...,n-1. More...
 
template<typename IntType >
constexpr IntType regina::nextPowerOfTwo (IntType n)
 Returns the smallest integer power of two that is greater than or equal to the given argument n. More...
 
 regina::ListOnCall< T >::ListOnCall ()
 Creates a new list structure. More...
 
virtual regina::ListOnCall< T >::~ListOnCall ()
 Destroys this list and all of the items it contains. More...
 
iterator regina::ListOnCall< T >::begin () const
 Returns an iterator pointing to the first item in this list. More...
 
iterator regina::ListOnCall< T >::end () const
 Returns an iterator pointing past the end of this list (i.e., just after the last item). More...
 
 regina::ListOnCall< T >::ListOnCall (const ListOnCall &)=delete
 
ListOnCallregina::ListOnCall< T >::operator= (const ListOnCall &)=delete
 
void regina::ListOnCall< T >::insert (T *item)
 Adds the given item to the end of this list. More...
 
virtual void regina::ListOnCall< T >::initialise ()=0
 Fills this list with items. More...
 
size_t regina::MarkedElement::markedIndex () const
 Returns the index at which this object is stored in an MarkedVector. More...
 
 regina::MarkedVector< T >::MarkedVector ()
 Constructs a new empty vector. More...
 
 regina::MarkedVector< T >::MarkedVector (MarkedVector &&) noexcept=default
 Moves the contents of the given vector into this new vector. More...
 
MarkedVectorregina::MarkedVector< T >::operator= (MarkedVector &&) noexcept=default
 Moves the contents of the given vector into this vector. More...
 
const std::vector< T * > & regina::MarkedVector< T >::operator() () const
 Casts this vector to a const std::vector, thus providing access to the entire const functionality of std::vector. More...
 
void regina::MarkedVector< T >::push_back (T *item)
 Pushes the given item onto the end of this vector. More...
 
std::vector< T * >::iterator regina::MarkedVector< T >::erase (typename std::vector< T * >::iterator pos)
 Erases the item at the given position in this vector. More...
 
std::vector< T * >::iterator regina::MarkedVector< T >::erase (typename std::vector< T * >::iterator first, typename std::vector< T * >::iterator last)
 Erases all items in the given range in this vector. More...
 
void regina::MarkedVector< T >::swap (MarkedVector< T > &other)
 Swaps the contents of this and the given vector. More...
 
template<typename Iterator >
void regina::MarkedVector< T >::refill (Iterator begin, Iterator end)
 Empties this vector and refills it with the given range of items. More...
 
 regina::MarkedVector< T >::MarkedVector (const MarkedVector &)=delete
 
MarkedVectorregina::MarkedVector< T >::operator= (const MarkedVector &)=delete
 
 regina::mem_istream::mem_istream (const char *begin, const char *end)
 Initialies an input stream that reads from the given array of characters. More...
 
 regina::mem_istream::~mem_istream ()
 Destructor. More...
 
 regina::mem_istream::mem_istream (const mem_istream &)=delete
 
mem_istreamregina::mem_istream::operator= (const mem_istream &)=delete
 
 regina::mem_streambuf::mem_streambuf (const char *begin, const char *end)
 Initialies a read-only stream buffer that reads from the given array of characters. More...
 
 regina::mem_streambuf::mem_streambuf (const mem_streambuf &)=delete
 
mem_streambufregina::mem_streambuf::operator= (const mem_streambuf &)=delete
 
int_type regina::mem_streambuf::underflow () override
 
int_type regina::mem_streambuf::uflow () override
 
int_type regina::mem_streambuf::pbackfail (int_type ch) override
 
std::streamsize regina::mem_streambuf::xsgetn (char *s, std::streamsize n) override
 
std::streamsize regina::mem_streambuf::showmanyc () override
 
pos_type regina::mem_streambuf::seekpos (pos_type pos, std::ios_base::openmode which) override
 
pos_type regina::mem_streambuf::seekoff (off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which) override
 
T * regina::FuncNew< T >::operator() () const
 Creates a new object using the default constructor. More...
 
T * regina::FuncNewCopyPtr< T >::operator() (const T *ptr) const
 Creates a new object using the copy constructor. More...
 
T * regina::FuncNewCopyRef< T >::operator() (const T &obj) const
 Creates a new object using the copy constructor. More...
 
T * regina::FuncNewClonePtr< T >::operator() (const T *ptr) const
 Creates a new object using the clone() method. More...
 
void regina::FuncDelete< T >::operator() (T *ptr) const
 Calls delete upon the given pointer. More...
 
void regina::writeResUsage (std::ostream &out)
 Writes time and memory usage for the current process to the given output stream. More...
 
 regina::StoreValue< T >::StoreValue ()=default
 Creates an uninitialised property value. More...
 
 regina::StoreValue< T >::StoreValue (const StoreValue &)=default
 Create a clone of the given property value. More...
 
StoreValueregina::StoreValue< T >::operator= (const StoreValue &)=default
 Sets this to be a clone of the given property value. More...
 
void regina::StoreValue< T >::clear ()
 Cleans up any currently held value before the property value is changed or cleared. More...
 
void regina::StoreValue< T >::swap (StoreValue< T > &other)
 Swaps this with the given value. More...
 
 regina::StoreConstPtr< T >::StoreConstPtr ()
 Constructor that sets the held pointer to null. More...
 
 regina::StoreConstPtr< T >::StoreConstPtr (const StoreConstPtr &)=default
 Create a clone of the given property value. More...
 
StoreConstPtrregina::StoreConstPtr< T >::operator= (const StoreConstPtr &)=default
 Sets this to be a clone of the given property value. More...
 
void regina::StoreConstPtr< T >::clear ()
 Cleans up any currently held value before the property value is changed or cleared. More...
 
void regina::StoreConstPtr< T >::swap (StoreConstPtr< T > &other)
 Swaps this with the given value. More...
 
 regina::StoreManagedPtr< T >::StoreManagedPtr ()
 Constructor that sets the held pointer to null. More...
 
void regina::StoreManagedPtr< T >::clear ()
 Cleans up any currently held value before the property value is changed or cleared. More...
 
 regina::StoreManagedPtr< T >::StoreManagedPtr (const StoreManagedPtr &)=delete
 
StoreManagedPtrregina::StoreManagedPtr< T >::operator= (const StoreManagedPtr &)=delete
 
 regina::StoreManagedPtr< T >::~StoreManagedPtr ()
 Destroys the currently held value if one exists. More...
 
void regina::StoreManagedPtr< T >::swap (StoreManagedPtr< T > &other)
 Swaps this with the given value. More...
 
 regina::Property< T, Storage >::Property ()
 Constructor. More...
 
 regina::Property< T, Storage >::Property (const Property< T, Storage > &newValue)
 Makes a new clone of the given property. More...
 
bool regina::Property< T, Storage >::known () const
 Returns whether or not this property is currently marked as known. More...
 
QueryType regina::Property< T, Storage >::value () const
 Returns the current value of this property. More...
 
void regina::Property< T, Storage >::clear ()
 Marks this property as unknown. More...
 
QueryType regina::Property< T, Storage >::operator= (InitType newValue)
 Assigns a new value to this property. More...
 
Propertyregina::Property< T, Storage >::operator= (const Property &newValue)
 Copies the given property into this property. More...
 
void regina::Property< T, Storage >::swap (Property< T, Storage > &other)
 Swaps this with the given property. More...
 
template<typename T >
T * regina::clonePtr (T *cloneMe)
 A simple routine for cloning an object if and only if it exists. More...
 
template<typename T >
T * regina::clonePtr (const std::unique_ptr< T > &cloneMe)
 A simple routine for cloning an object if and only if it exists. More...
 
bool regina::LessDeref< T, Comp >::operator() (const T *ptr1, const T *ptr2) const
 Compares the objects to which the given pointers are pointing. More...
 
template<typename T >
std::ostream & regina::operator<< (std::ostream &out, const Qitmask1< T > &mask)
 Writes the given qitmask to the given output stream as a sequence of digits (0, 1, 2 and/or 3). More...
 
 regina::Qitmask1< T >::Qitmask1 ()
 Creates a new qitmask with all qits set to 0. More...
 
 regina::Qitmask1< T >::Qitmask1 (const Qitmask1< T > &cloneMe)=default
 Creates a clone of the given qitmask. More...
 
void regina::Qitmask1< T >::reset ()
 Sets all qits of this qitmask to 0. More...
 
Qitmask1< T > & regina::Qitmask1< T >::operator= (const Qitmask1< T > &other)=default
 Sets this qitmask to a copy of the given qitmask. More...
 
char regina::Qitmask1< T >::get (unsigned index) const
 Returns the value of the given qit in this qitmask. More...
 
void regina::Qitmask1< T >::set (unsigned index, char value)
 Sets the given qit of this qitmask to the given value. More...
 
bool regina::Qitmask1< T >::empty () const
 Determines whether this qitmask contains all zeroes. More...
 
bool regina::Qitmask1< T >::nonEmpty () const
 Determines whether this qitmask contains at least one non-zero qit. More...
 
bool regina::Qitmask1< T >::has3 () const
 Determines whether this qitmask contains at least one qit with value 3. More...
 
Qitmask1< T > & regina::Qitmask1< T >::operator+= (const Qitmask1< T > &rhs)
 Sets this to the sum of this and the given qitmask. More...
 
Qitmask1< T > & regina::Qitmask1< T >::operator-= (const Qitmask1< T > &rhs)
 Sets this to the difference of this and the given qitmask. More...
 
bool regina::Qitmask1< T >::operator== (const Qitmask1< T > &other) const
 Determines whether this and the given qitmask are identical. More...
 
bool regina::Qitmask1< T >::hasNonZeroMatch (const Qitmask1< T > &other) const
 Determines whether there is some index at which both this and the given qitmask both have non-zero qits. More...
 
template<typename T , typename U >
std::ostream & regina::operator<< (std::ostream &out, const Qitmask2< T, U > &mask)
 Writes the given qitmask to the given output stream as a sequence of digits (0, 1, 2 and/or 3). More...
 
 regina::Qitmask2< T, U >::Qitmask2 ()
 Creates a new qitmask with all qits set to 0. More...
 
 regina::Qitmask2< T, U >::Qitmask2 (const Qitmask2< T, U > &cloneMe)=default
 Creates a clone of the given qitmask. More...
 
void regina::Qitmask2< T, U >::reset ()
 Sets all qits of this qitmask to 0. More...
 
Qitmask2< T, U > & regina::Qitmask2< T, U >::operator= (const Qitmask2< T, U > &other)=default
 Sets this qitmask to a copy of the given qitmask. More...
 
char regina::Qitmask2< T, U >::get (unsigned index) const
 Returns the value of the given qit in this qitmask. More...
 
void regina::Qitmask2< T, U >::set (unsigned index, char value)
 Sets the given qit of this qitmask to the given value. More...
 
bool regina::Qitmask2< T, U >::empty () const
 Determines whether this qitmask contains all zeroes. More...
 
bool regina::Qitmask2< T, U >::nonEmpty () const
 Determines whether this qitmask contains at least one non-zero qit. More...
 
bool regina::Qitmask2< T, U >::has3 () const
 Determines whether this qitmask contains at least one qit with value 3. More...
 
Qitmask2< T, U > & regina::Qitmask2< T, U >::operator+= (const Qitmask2< T, U > &rhs)
 Sets this to the sum of this and the given qitmask. More...
 
Qitmask2< T, U > & regina::Qitmask2< T, U >::operator-= (const Qitmask2< T, U > &rhs)
 Sets this to the difference of this and the given qitmask. More...
 
bool regina::Qitmask2< T, U >::operator== (const Qitmask2< T, U > &other) const
 Determines whether this and the given qitmask are identical. More...
 
bool regina::Qitmask2< T, U >::hasNonZeroMatch (const Qitmask2< T, U > &other) const
 Determines whether there is some index at which both this and the given qitmask both have non-zero qits. More...
 
 regina::RandomEngine::RandomEngine ()
 Constructor that locks the internal mutex. More...
 
std::default_random_engine & regina::RandomEngine::engine ()
 Provides access to Regina's global uniform random bit generator (URBG). More...
 
template<typename Int >
static Int regina::RandomEngine::rand (Int range)
 A convenience function that returns a random integer modulo range, in a thread-safe manner. More...
 
static void regina::RandomEngine::reseedWithHardware ()
 Reseeds the global uniform random bit generator using hardware entropy. More...
 
static void regina::RandomEngine::reseedWithDefault ()
 Reseeds the global uniform random bit generator using the default seed. More...
 
template<typename Info , typename... Args>
Base * regina::NewFunction< Base >::operator() (Args &&... args) const
 Creates a new object of the subclass Info::Class. More...
 
 regina::SafePointeeBase< T >::SafePointeeBase (const SafePointeeBase &)=delete
 Prevent derived classes from accidentally calling the copy constructor. More...
 
SafePointeeBaseregina::SafePointeeBase< T >::operator= (const SafePointeeBase &)=delete
 Prevent derived classes from accidentally calling the assignment operator. More...
 
bool regina::SafePointeeBase< T >::hasSafePtr () const
 Is there one or more SafePtr currently pointing to this object? More...
 
 regina::SafePointeeBase< T >::SafePointeeBase ()
 Default constructor. More...
 
 regina::SafePtr< T >::SafePtr ()
 Constructs a new null pointer. More...
 
 regina::SafePtr< T >::SafePtr (T *object)
 Constructs a new safe pointer that points to the given object. More...
 
template<class Y >
 regina::SafePtr< T >::SafePtr (const SafePtr< Y > &other)
 Copy constructor. More...
 
T * regina::SafePtr< T >::get () const
 Returns a raw pointer to the pointee. More...
 
 regina::SafePtr< T >::operator bool () const
 Returns true if the pointee is non-null. More...
 
void regina::SafePtr< T >::reset (T *object=nullptr)
 Resets this to point to the given object. More...
 
SafePtr< T > & regina::SafePtr< T >::operator= (const SafePtr< T > &)=delete
 Disable the default assignment operator. More...
 
 regina::LightweightSequence< T >::LightweightSequence ()
 Creates a new empty sequence; that is, a sequence of size zero. More...
 
 regina::LightweightSequence< T >::LightweightSequence (size_t size)
 Create a new sequence containing the given number of elements. More...
 
 regina::LightweightSequence< T >::LightweightSequence (const LightweightSequence &src)
 Create a copy of the given sequence. More...
 
 regina::LightweightSequence< T >::LightweightSequence (LightweightSequence &&src) noexcept
 Moves the contents of the given sequence to this new sequence. More...
 
 regina::LightweightSequence< T >::~LightweightSequence ()
 Destroys this sequence and all of its elements. More...
 
void regina::LightweightSequence< T >::init (size_t size=0)
 Resizes this sequence to contain the given number of elements. More...
 
size_t regina::LightweightSequence< T >::size () const
 Returns the number of elements in this sequence. More...
 
regina::LightweightSequence< T >::operator[] (size_t pos) const
 Returns a copy of the element at the given index in the sequence. More...
 
T & regina::LightweightSequence< T >::operator[] (size_t pos)
 Returns a reference to the element at the given index in the sequence. More...
 
iterator regina::LightweightSequence< T >::begin ()
 Returns a read-write iterator that points to the first element of the sequence. More...
 
const_iterator regina::LightweightSequence< T >::begin () const
 Returns a read-only iterator that points to the first element of the sequence. More...
 
iterator regina::LightweightSequence< T >::end ()
 Returns a read-write iterator that points beyond the last element of the sequence. More...
 
const_iterator regina::LightweightSequence< T >::end () const
 Returns a read-only iterator that points beyond the last element of the sequence. More...
 
LightweightSequence< T > & regina::LightweightSequence< T >::operator= (const LightweightSequence &src)
 Converts this into a copy of the given sequence. More...
 
LightweightSequence< T > & regina::LightweightSequence< T >::operator= (LightweightSequence &&src) noexcept
 Moves the contents of the given sequence to this sequence. More...
 
bool regina::LightweightSequence< T >::operator== (const LightweightSequence &rhs) const
 Tests whether this and the given sequence are identical. More...
 
bool regina::LightweightSequence< T >::operator< (const LightweightSequence &rhs) const
 Tests whether this sequence is lexicographically smaller than the given sequence. More...
 
bool regina::LightweightSequence< T >::Less::operator() (const LightweightSequence *a, const LightweightSequence *b) const
 Compares two sequences lexicographically. More...
 
 regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::SubsequenceCompareFirstPtr (size_t nSub, const size_t *sub)
 Creates a new function object. More...
 
 regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::SubsequenceCompareFirstPtr (const SubsequenceCompareFirstPtr< Iterator > &)=default
 Copies the given function object into this new object. More...
 
SubsequenceCompareFirstPtr< Iterator > & regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::operator= (const SubsequenceCompareFirstPtr< Iterator > &)=default
 Copies the given function object into this object. More...
 
bool regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::equal (Iterator a, Iterator b) const
 Tests whether the subsequences referred to by the given pair of iterators are identical. More...
 
bool regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::less (Iterator a, Iterator b) const
 Lexicographically compares the subsequences referred to by the given pair of iterators. More...
 
bool regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::operator() (Iterator a, Iterator b) const
 Lexicographically compares the subsequences referred to by the given pair of iterators. More...
 
template<typename T >
std::ostream & regina::operator<< (std::ostream &out, const LightweightSequence< T > &s)
 Writes the given sequence to the given output stream. More...
 
char * regina::duplicate (const std::string &str)
 Creates a new C string that is a duplicate of the given C++ string. More...
 
bool regina::startsWith (const std::string &str, const std::string &prefix)
 Determines whether the given C++ string begins with the given prefix. More...
 
std::string regina::stripWhitespace (const std::string &str)
 Strips all whitespace from the beginning and end of the given C++ string. More...
 
bool regina::valueOf (const std::string &str, int8_t &dest)
 Converts the entire given string to an 8-bit integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, uint8_t &dest)
 Converts the entire given string to an unsigned 8-bit integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, short &dest)
 Converts the entire given string to a short integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, unsigned short &dest)
 Converts the entire given string to an unsigned short integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, int &dest)
 Converts the entire given string to an integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, unsigned &dest)
 Converts the entire given string to an unsigned integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, long &dest)
 Converts the entire given string to a long integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, unsigned long &dest)
 Converts the entire given string to an unsigned long integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, long long &dest)
 Converts the entire given string to a long long integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, unsigned long long &dest)
 Converts the entire given string to an unsigned long long integer and reports whether this conversion was successful. More...
 
template<bool supportInfinity>
bool regina::valueOf (const std::string &str, IntegerBase< supportInfinity > &dest)
 Converts the entire given string to an arbitrary precision integer and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, double &dest)
 Converts the entire given string to a double precision real number and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, bool &dest)
 Converts the entire given string to a boolean and reports whether this conversion was successful. More...
 
bool regina::valueOf (const std::string &str, BoolSet &dest)
 Converts the entire given string to a set of booleans and reports whether this conversion was successful. More...
 
template<class OutputIterator >
unsigned regina::basicTokenise (OutputIterator results, const std::string &str)
 Decomposes the given string into tokens. More...
 
std::string regina::stringToToken (const char *str)
 Returns a token derived from the given string. More...
 
std::string regina::stringToToken (const std::string &str)
 Returns a token derived from the given string. More...
 
template<typename T >
std::string regina::superscript (T value)
 Converts the given C++ integer into a unicode superscript string. More...
 
template<typename T >
std::string regina::subscript (T value)
 Converts the given C++ integer into a unicode subscript string. More...
 
 regina::TrieSet< T >::TrieSet ()
 Constructs an empty collection of sets. More...
 
 regina::TrieSet< T >::~TrieSet ()
 Destroys this collection of sets. More...
 
void regina::TrieSet< T >::insert (const T &entry)
 Insert the given set into this collection. More...
 
bool regina::TrieSet< T >::hasSubset (const T &superset, unsigned long universeSize) const
 Determines whether this collection of sets contains any subset of the argument superset. More...
 
bool regina::TrieSet< T >::hasExtraSuperset (const T &subset, const T &exc1, const T &exc2, unsigned long universeSize) const
 Performs the particular superset search required by the double description method. More...
 
 regina::TrieSet< T >::TrieSet (const TrieSet &)=delete
 
TrieSetregina::TrieSet< T >::operator= (const TrieSet &)=delete
 
 regina::Tritmask1< T >::Tritmask1 ()
 Creates a new tritmask with all trits set to 0. More...
 
 regina::Tritmask1< T >::Tritmask1 (const Tritmask1< T > &cloneMe)=default
 Creates a clone of the given tritmask. More...
 
void regina::Tritmask1< T >::reset ()
 Sets all trits of this tritmask to 0. More...
 
Tritmask1< T > & regina::Tritmask1< T >::operator= (const Tritmask1< T > &other)=default
 Sets this tritmask to a copy of the given tritmask. More...
 
char regina::Tritmask1< T >::get (unsigned index) const
 Returns the value of the given trit in this tritmask. More...
 
void regina::Tritmask1< T >::set (unsigned index, char value)
 Sets the given trit of this tritmask to the given value. More...
 
bool regina::Tritmask1< T >::empty () const
 Determines whether this tritmask contains all zeroes. More...
 
bool regina::Tritmask1< T >::nonEmpty () const
 Determines whether this tritmask contains at least one non-zero trit. More...
 
bool regina::Tritmask1< T >::has2 () const
 Determines whether this tritmask contains at least one trit with value 2. More...
 
Tritmask1< T > & regina::Tritmask1< T >::minWith (const Tritmask1< T > &rhs)
 Sets this to the minimum of this and the given tritmask. More...
 
Tritmask1< T > & regina::Tritmask1< T >::maxWith (const Tritmask1< T > &rhs)
 Sets this to the maximum of this and the given tritmask. More...
 
Tritmask1< T > & regina::Tritmask1< T >::operator+= (const Tritmask1< T > &rhs)
 Sets this to the sum of this and the given tritmask. More...
 
Tritmask1< T > & regina::Tritmask1< T >::operator-= (const Tritmask1< T > &rhs)
 Sets this to the difference of this and the given tritmask. More...
 
bool regina::Tritmask1< T >::operator== (const Tritmask1< T > &other) const
 Determines whether this and the given tritmask are identical. More...
 
template<typename T >
std::ostream & regina::operator<< (std::ostream &out, const Tritmask1< T > &mask)
 Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2). More...
 
 regina::Tritmask2< T, U >::Tritmask2 ()
 Creates a new tritmask with all trits set to 0. More...
 
 regina::Tritmask2< T, U >::Tritmask2 (const Tritmask2< T, U > &cloneMe)=default
 Creates a clone of the given tritmask. More...
 
void regina::Tritmask2< T, U >::reset ()
 Sets all trits of this tritmask to 0. More...
 
Tritmask2< T, U > & regina::Tritmask2< T, U >::operator= (const Tritmask2< T, U > &other)=default
 Sets this tritmask to a copy of the given tritmask. More...
 
char regina::Tritmask2< T, U >::get (unsigned index) const
 Returns the value of the given trit in this tritmask. More...
 
void regina::Tritmask2< T, U >::set (unsigned index, char value)
 Sets the given trit of this tritmask to the given value. More...
 
bool regina::Tritmask2< T, U >::empty () const
 Determines whether this tritmask contains all zeroes. More...
 
bool regina::Tritmask2< T, U >::nonEmpty () const
 Determines whether this tritmask contains at least one non-zero trit. More...
 
bool regina::Tritmask2< T, U >::has2 () const
 Determines whether this tritmask contains at least one trit with value 2. More...
 
Tritmask2< T, U > & regina::Tritmask2< T, U >::minWith (const Tritmask2< T, U > &rhs)
 Sets this to the minimum of this and the given tritmask. More...
 
Tritmask2< T, U > & regina::Tritmask2< T, U >::maxWith (const Tritmask2< T, U > &rhs)
 Sets this to the maximum of this and the given tritmask. More...
 
Tritmask2< T, U > & regina::Tritmask2< T, U >::operator+= (const Tritmask2< T, U > &rhs)
 Sets this to the sum of this and the given tritmask. More...
 
Tritmask2< T, U > & regina::Tritmask2< T, U >::operator-= (const Tritmask2< T, U > &rhs)
 Sets this to the difference of this and the given tritmask. More...
 
bool regina::Tritmask2< T, U >::operator== (const Tritmask2< T, U > &other) const
 Determines whether this and the given tritmask are identical. More...
 
template<typename T , typename U >
std::ostream & regina::operator<< (std::ostream &out, const Tritmask2< T, U > &mask)
 Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2). More...
 
 regina::xml::XMLPropertyDict::XMLPropertyDict ()
 Create a new map. More...
 
const std::string & regina::xml::XMLPropertyDict::lookup (const std::string &key) const
 Return a value for the given key, or the empty string if the key does not exist in the map. More...
 
 regina::xml::XMLPropertyDict::XMLPropertyDict (const XMLPropertyDict &)=delete
 
XMLPropertyDictregina::xml::XMLPropertyDict::operator= (const XMLPropertyDict &)=delete
 
virtual regina::xml::XMLParserCallback::~XMLParserCallback ()
 Default destructor that does nothing. More...
 
virtual void regina::xml::XMLParserCallback::start_document (XMLParser *parser)
 Called at the start of the document. More...
 
virtual void regina::xml::XMLParserCallback::end_document ()
 Called when the document is finalised. More...
 
virtual void regina::xml::XMLParserCallback::start_element (const std::string &n, const regina::xml::XMLPropertyDict &p)
 Called when an element's opening tag is encountered. More...
 
virtual void regina::xml::XMLParserCallback::end_element (const std::string &n)
 Called when an element's closing tag is encountered. More...
 
virtual void regina::xml::XMLParserCallback::characters (const std::string &s)
 Called when characters are encountered. More...
 
virtual void regina::xml::XMLParserCallback::comment (const std::string &s)
 Called when a comment is encountered. More...
 
virtual void regina::xml::XMLParserCallback::warning (const std::string &s)
 Called when a parser warning occurs. More...
 
virtual void regina::xml::XMLParserCallback::error (const std::string &s)
 Called when a parser error occurs. More...
 
virtual void regina::xml::XMLParserCallback::fatal_error (const std::string &s)
 Called when a parser fatal error occurs. More...
 
 regina::xml::XMLParser::XMLParser (XMLParserCallback &callback)
 Creates a new XML parser. More...
 
virtual regina::xml::XMLParser::~XMLParser ()
 Destroys this XML parser. More...
 
void regina::xml::XMLParser::parse_chunk (const std::string &s)
 Parses the given chunk of XML. More...
 
void regina::xml::XMLParser::finish ()
 Signals that there are no more XML chunks to parse. More...
 
static void regina::xml::XMLParser::parse_stream (XMLParserCallback &callback, std::istream &file, unsigned chunkSize=1024)
 Parses an entire XML file. More...
 
 regina::xml::XMLParser::XMLParser (const XMLParser &)=delete
 
XMLParserregina::xml::XMLParser::operator= (const XMLParser &)=delete
 
std::string regina::xml::xmlString (xmlChar *str, bool free=true)
 Converts the given string from libxml into a C++ string, optionally deallocating the original libxml string. More...
 
std::string regina::xml::xmlEncodeSpecialChars (const std::string &original)
 Returns the given string with special characters converted to XML entities. More...
 
std::string regina::xml::xmlEncodeComment (const std::string &comment)
 Returns the given string encoded so it is suitable for use inside an XML comment. More...
 
template<class T >
std::string regina::xml::xmlValueTag (const std::string &tagName, const T &value)
 Returns an XML tag with a single property containing the given value. More...
 

Variables

static const BoolSet regina::BoolSet::sNone
 The empty set. More...
 
static const BoolSet regina::BoolSet::sTrue
 The set containing only true. More...
 
static const BoolSet regina::BoolSet::sFalse
 The set containing only false. More...
 
static const BoolSet regina::BoolSet::sBoth
 The set containing both true and false. More...
 
regina::StoreValue< T >::value_
 The held property value. More...
 
const T * regina::StoreConstPtr< T >::value_
 The held property value. More...
 
T * regina::StoreManagedPtr< T >::value_
 The held property value. More...
 

Friends

template<typename T >
class regina::MarkedElement::MarkedVector
 Allow only MarkedVector to edit the array index. More...
 
template<class U >
class regina::SafePtr
 
std::ostream & regina::Bitmask::operator<< (std::ostream &out, const Bitmask &mask)
 Writes the given bitmask to the given output stream as a sequence of zeroes and ones. More...
 
std::ostream & regina::Bitmask1< T >::operator (std::ostream &out, const Bitmask1< T > &mask)
 
std::ostream & regina::Bitmask2< T, U >::operator (std::ostream &out, const Bitmask2< T, U > &mask)
 
std::ostream & regina::BoolSet::operator<< (std::ostream &out, const BoolSet &set)
 Writes the given boolean set to the given output stream. More...
 
std::ostream & regina::Qitmask1< T >::operator (std::ostream &out, const Qitmask1< T > &mask)
 
std::ostream & regina::Qitmask2< T, U >::operator (std::ostream &out, const Qitmask2< T, U > &mask)
 
std::ostream & regina::Tritmask1< T >::operator<< (std::ostream &out, const Tritmask1< T > &mask)
 Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2). More...
 
std::ostream & regina::Tritmask2< T, U >::operator<< (std::ostream &out, const Tritmask2< T, U > &mask)
 Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2). More...
 

Detailed Description

Miscellaneous helper classes and functions.

Macro Definition Documentation

◆ INT128_AVAILABLE

#define INT128_AVAILABLE

Defined if and only if native 128-bit arithmetic is available on this platform.

If this macro is defined, then you can access native signed and unsigned 128-bit integers through the types IntOfSize<16>::type and IntOfSize<16>::utype respectively.

If this macro is not defined, then the types IntOfSize<16>::type and IntOfSize<16>::utype will both be void.

Typedef Documentation

◆ argument_type [1/4]

template<class T >
typedef const T* regina::FuncNewCopyPtr< T >::argument_type

The argument type for this unary function.

◆ argument_type [2/4]

template<class T >
typedef const T& regina::FuncNewCopyRef< T >::argument_type

The argument type for this unary function.

◆ argument_type [3/4]

template<class T >
typedef const T* regina::FuncNewClonePtr< T >::argument_type

The argument type for this unary function.

◆ argument_type [4/4]

template<class T >
typedef T* regina::FuncDelete< T >::argument_type

The argument type for this unary function.

◆ BitmaskLen16

typedef Bitmask1<unsigned int> regina::BitmaskLen16

A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 16 true-or-false bits.

This bitmask class is guaranteed to be an instantiation of the template class Bitmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ BitmaskLen32

typedef InternalBitmaskLen32 ::Type regina::BitmaskLen32

A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 32 true-or-false bits.

This bitmask class is guaranteed to be an instantiation of the template class Bitmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ BitmaskLen64

typedef InternalBitmaskLen64 ::Type regina::BitmaskLen64

A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 64 true-or-false bits.

This bitmask class is guaranteed to be an instantiation of either the template class Bitmask1 or the template class Bitmask2.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ BitmaskLen8

typedef Bitmask1<unsigned char> regina::BitmaskLen8

A convenience typedef that gives a small and extremely fast bitmask class capable of holding at least 8 true-or-false bits.

This bitmask class is guaranteed to be an instantiation of the template class Bitmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ const_iterator

template<typename T >
typedef const T* regina::LightweightSequence< T >::const_iterator

An iterator type for read-only access to the elements of a sequence.

Such a type can be dereferenced (yielding a const reference to type T), and manipulated using the usual pointer arithmetic (such as p++, –p, p += n, and so on).

◆ element_type

template<class T >
typedef T regina::SafePtr< T >::element_type

The pointee type.

This typedef is used by the pybind11 infrastructure.

◆ Enum

template<typename T >
typedef T regina::Flags< T >::Enum

The underlying enumeration type.

◆ first_argument_type

template<typename T , typename Comp = std::less<T>>
typedef const T* regina::LessDeref< T, Comp >::first_argument_type

The first argument type for this binary function.

◆ InitType [1/4]

template<typename T >
typedef const T& regina::StoreValue< T >::InitType

The type by which new values for the underlying property are passed.

◆ InitType [2/4]

template<typename T >
typedef const T* regina::StoreConstPtr< T >::InitType

The type by which new values for the underlying property are passed.

◆ InitType [3/4]

template<typename T >
typedef T* regina::StoreManagedPtr< T >::InitType

The type by which new values for the underlying property are passed.

◆ InitType [4/4]

template<typename T , template< typename Stored > class Storage = StoreValue>
typedef Storage<T>::InitType regina::Property< T, Storage >::InitType

The type by which new values for the underlying property are passed.

◆ iterator [1/2]

template<typename T >
typedef std::list<const T*>::const_iterator regina::ListOnCall< T >::iterator

An iterator over this list.

This operates as a forward iterator in a manner consistent with the standard C++ library. It does not allow either the list or its individual objects to be changed.

◆ iterator [2/2]

template<typename T >
typedef T* regina::LightweightSequence< T >::iterator

An iterator type for read-write access to the elements of a sequence.

Such a type can be dereferenced (yielding a reference to type T), and manipulated using the usual pointer arithmetic (such as p++, –p, p += n, and so on).

◆ NBoolSet

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
The class NBoolSet has now been renamed to BoolSet.

◆ QitmaskLen16

typedef Qitmask1<unsigned int> regina::QitmaskLen16

A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 16 true-or-false bits.

This qitmask class is guaranteed to be an instantiation of the template class Qitmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ QitmaskLen32

typedef InternalQitmaskLen32 ::Type regina::QitmaskLen32

A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 32 true-or-false bits.

This qitmask class is guaranteed to be an instantiation of the template class Qitmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ QitmaskLen64

typedef InternalQitmaskLen64 ::Type regina::QitmaskLen64

A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 64 true-or-false bits.

This qitmask class is guaranteed to be an instantiation of either the template class Qitmask1 or the template class Qitmask2.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ QitmaskLen8

typedef Qitmask1<unsigned char> regina::QitmaskLen8

A convenience typedef that gives a small and extremely fast qitmask class capable of holding at least 8 true-or-false bits.

This qitmask class is guaranteed to be an instantiation of the template class Qitmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ QueryType [1/4]

template<typename T >
typedef const T& regina::StoreValue< T >::QueryType

The type by which the property value is returned to the user.

◆ QueryType [2/4]

template<typename T >
typedef const T* regina::StoreConstPtr< T >::QueryType

The type by which the property value is returned to the user.

◆ QueryType [3/4]

template<typename T >
typedef const T* regina::StoreManagedPtr< T >::QueryType

The type by which the property value is returned to the user.

◆ QueryType [4/4]

template<typename T , template< typename Stored > class Storage = StoreValue>
typedef Storage<T>::QueryType regina::Property< T, Storage >::QueryType

The type by which the property value is returned to the user.

◆ result_type [1/6]

template<class T >
typedef T* regina::FuncNew< T >::result_type

The return type for this generator.

◆ result_type [2/6]

template<class T >
typedef T* regina::FuncNewCopyPtr< T >::result_type

The return type for this unary function.

◆ result_type [3/6]

template<class T >
typedef T* regina::FuncNewCopyRef< T >::result_type

The return type for this unary function.

◆ result_type [4/6]

template<class T >
typedef T* regina::FuncNewClonePtr< T >::result_type

The return type for this unary function.

◆ result_type [5/6]

template<class T >
typedef void regina::FuncDelete< T >::result_type

The return type for this unary function.

◆ result_type [6/6]

template<typename T , typename Comp = std::less<T>>
typedef bool regina::LessDeref< T, Comp >::result_type

The result type for this binary comparison function.

◆ ReturnType

template<typename ReturnType_ >
typedef ReturnType_ regina::Returns< ReturnType_ >::ReturnType

Indicates the return type for a function object.

◆ SafePointeeType

template<class T >
typedef T regina::SafePointeeBase< T >::SafePointeeType

The type of object being pointed to.

◆ second_argument_type

template<typename T , typename Comp = std::less<T>>
typedef const T* regina::LessDeref< T, Comp >::second_argument_type

The second argument type for this binary function.

◆ TritmaskLen16

typedef Tritmask1<unsigned int> regina::TritmaskLen16

A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 16 true-or-false bits.

This tritmask class is guaranteed to be an instantiation of the template class Tritmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ TritmaskLen32

typedef InternalTritmaskLen32 ::Type regina::TritmaskLen32

A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 32 true-or-false bits.

This tritmask class is guaranteed to be an instantiation of the template class Tritmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ TritmaskLen64

typedef InternalTritmaskLen64 ::Type regina::TritmaskLen64

A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 64 true-or-false bits.

This tritmask class is guaranteed to be an instantiation of either the template class Tritmask1 or the template class Tritmask2.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ TritmaskLen8

typedef Tritmask1<unsigned char> regina::TritmaskLen8

A convenience typedef that gives a small and extremely fast tritmask class capable of holding at least 8 true-or-false bits.

This tritmask class is guaranteed to be an instantiation of the template class Tritmask1.

The particular instantiation is subject to change between different platforms, different compilers and/or different versions of Regina.

Python
Not present.

◆ type [1/2]

template<int bytes>
typedef void regina::IntOfSize< bytes >::type

A native signed integer type with exactly k bytes, where k is the template parameter.

The default is void, which indicates that Regina does not know how to access an integer type of the requested size.

◆ type [2/2]

template<int bytes>
typedef IntOfSize<nextPowerOfTwo(bytes)>::type regina::IntOfMinSize< bytes >::type

A native signed integer type with at least k bytes, where k is the template parameter.

The default is void, which indicates that Regina does not know how to access an integer type of the requested size.

◆ utype [1/2]

template<int bytes>
typedef void regina::IntOfSize< bytes >::utype

A native unsigned integer type with exactly k bytes, where k is the template parameter.

The default is void, which indicates that Regina does not know how to access an integer type of the requested size.

◆ utype [2/2]

template<int bytes>
typedef IntOfSize<nextPowerOfTwo(bytes)>::utype regina::IntOfMinSize< bytes >::utype

A native unsigned integer type with at least k bytes, where k is the template parameter.

The default is void, which indicates that Regina does not know how to access an integer type of the requested size.

Enumeration Type Documentation

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
value 

Evaluates to non-zero (true) or zero (false) according to whether or not the type T::ReturnType exists.

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
specialised 

Indicates whether this class is a template specialisation of BitManipulatorByType with extra optimisations.

This compile-time constant is set to 0 for the generic implementation of BitManipulatorByType, and 1 for all specialisations.

◆ anonymous enum

template<typename T , unsigned size = sizeof(T)>
anonymous enum
Enumerator
specialised 

Indicates whether this class is a template specialisation of BitManipulatorBySize with extra optimisations.

This compile-time constant is set to 0 for the generic implementation of BitManipulatorBySize, and 1 for all specialisations.

◆ anonymous enum

template<typename T >
anonymous enum
Enumerator
specialised 

Indicates whether this class is a template specialisation of BitManipulator with extra optimisations.

This compile-time constant is set to 0 for the generic implementation of BitManipulator, and 1 for all specialisations.

Function Documentation

◆ atMostOneBit() [1/3]

bool regina::Bitmask::atMostOneBit ( ) const
inline

Determines whether at most one bit is set to true in this bitmask.

If this bitmask is entirely false or if only one bit is set to true, then this routine will return true. Otherwise this routine will return false.

Returns
true if and only if at most one bit is set to true.

◆ atMostOneBit() [2/3]

template<typename T >
bool regina::Bitmask1< T >::atMostOneBit ( ) const
inline

Determines whether at most one bit is set to true in this bitmask.

If this bitmask is entirely false or if only one bit is set to true, then this routine will return true. Otherwise this routine will return false.

Returns
true if and only if at most one bit is set to true.

◆ atMostOneBit() [3/3]

template<typename T , typename U = T>
bool regina::Bitmask2< T, U >::atMostOneBit ( ) const
inline

Determines whether at most one bit is set to true in this bitmask.

If this bitmask is entirely false or if only one bit is set to true, then this routine will return true. Otherwise this routine will return false.

Returns
true if and only if at most one bit is set to true.

◆ base64Decode() [1/2]

bool regina::base64Decode ( const char *  in,
size_t  inlen,
char **  out,
size_t *  outlen 
)

Decodes the given sequence of base64 characters, and passes back a newly allocated array containing the results.

The out pointer will be set to this new array, and outlen will be set to the number of raw bytes in this output array. This array will be allocated using new[], and the caller is responsible for destroying it using delete[].

The given base64 sequence should not contain any unexpected characters; even whitespace will cause the decoding procedure to abort.

The length of the output buffer is passed as the argument outlen. If an unexpected or invalid character is found or the output buffer is exhausted, this routine will return false, set out to null, and leave outlen undefined. Otherwise (on success) it will return true and set outlen to the total number of output bytes.

If the user is not interested in the length of the output array, a null pointer may be passed in the outlen argument. Note however that the output array is not terminated in any special way.

Python
Not present.
Parameters
inthe input sequence of base64 characters; this does not need to be terminated in any special way.
inlenthe length of the input sequence.
outthe address of a pointer which will be set to the output array of raw bytes (or which will be set to null on failure).
outlenthe address of an integer which will be set to the length of the output array (or which will be left undefined on failure).
Returns
true if decoding was successful, or false if an unexpected input character was found or some other error occurred.
Author
This routine is based on the Base64 project at base64.sourceforge.net. The original was written by Bob Trower, and is licensed under the MIT license. See the base64.h notes for details.

◆ base64Decode() [2/2]

bool regina::base64Decode ( const char *  in,
size_t  inlen,
char *  out,
size_t *  outlen 
)

Decodes the given sequence of base64 characters, and writes the resulting raw bytes into a preallocated output buffer.

The given base64 sequence should not contain any unexpected characters; even whitespace will cause the decoding procedure to abort.

The length of the output buffer is passed as the argument outlen. If an unexpected or invalid character is found, or the output buffer is exhausted, this routine will write as many output bytes as it can and then return false. Otherwise (on success) it will return true. Either way, it will reset outlen to the total number of bytes that were written.

The total number of output bytes is important to know, since the output array is not terminated in any special way.

Python
Not present.
Parameters
inthe input sequence of base64 characters; this does not need to be terminated in any special way.
inlenthe length of the input sequence.
outthe output buffer into which the resulting raw bytes will be written.
outlenmust contain the length of the output buffer on entry, and on exit contains the number of output bytes that were successfully written.
Returns
true if decoding was successful, or false if the output buffer was exhausted or an unexpected input character was found.
Author
This routine is based on the Base64 project at base64.sourceforge.net. The original was written by Bob Trower, and is licensed under the MIT license. See the base64.h notes for details.

◆ base64Encode() [1/2]

size_t regina::base64Encode ( const char *  in,
size_t  inlen,
char **  out 
)

Encodes the given sequence of raw bytes in base64, and passes back a newly allocated array containing the results.

The out pointer will be set to this new array, which will be null-terminated. This array will be allocated using new[], and the caller is responsible for destroying it using delete[].

If the output array is too large (in particular, the expected size will overflow a size_t), the out pointer will be set to null.

Python
Not present.
Parameters
inthe sequence of input bytes; this does not need to be terminated in any special way.
inlenthe length of the input sequence.
outthe address of a pointer which will be set to the output array of base64 characters.
Returns
the length of the output array, not counting the terminating null.
Author
This routine is based on the Base64 project at base64.sourceforge.net. The original was written by Bob Trower, and is licensed under the MIT license. See the base64.h notes for details.

◆ base64Encode() [2/2]

void regina::base64Encode ( const char *  in,
size_t  inlen,
char *  out,
size_t  outlen 
)

Encodes the given sequence of raw bytes in base64, and writes the results into a preallocated output buffer.

The length of the output buffer is passed as the argument outlen. If the number of base64 characters required is less than outlen, a terminating null will be written to the end of the output sequence. If the number of base64 characters is outlen or greater, this routine will output as many base64 characters as possible, up to a maximum of outlen.

The routine base64Length() can be used to precalculate precisely how many output characters will be required.

Python
Not present.
Parameters
inthe sequence of input bytes; this does not need to be terminated in any special way.
inlenthe length of the input sequence.
outthe output buffer into which the resulting base64 characters will be written.
outlenthe length of the output buffer.
Author
This routine is based on the Base64 project at base64.sourceforge.net. The original was written by Bob Trower, and is licensed under the MIT license. See the base64.h notes for details.

◆ base64Length()

size_t regina::base64Length ( size_t  bytes)
inline

Returns the number of base64 characters required to encode the given number of bytes.

This is the number of characters used (excluding the null terminator) by the routine base64Encode(const char*, size_t, char**).

Python
Not present.
Parameters
bytesthe number of raw input bytes.
Returns
the corresponding number of base64 printable output characters.

◆ basicTokenise()

template<class OutputIterator >
unsigned regina::basicTokenise ( OutputIterator  results,
const std::string &  str 
)

Decomposes the given string into tokens.

This is an extremely simple tokeniser; tokens are defined to be separated by whitespace.

Warning
This routine treats all strings as plain ASCII. In particular, characters are examined one at a time, and the C routine isspace() is used to identify whitespace. Use it on strings with international characters at your own peril.
Python
Not present.
Parameters
resultsthe output iterator to which the resulting tokens will be written; this must accept objects of type const std::string&.
strthe string to decompose.
Returns
the number of tokens found.

◆ begin() [1/3]

template<typename T >
LightweightSequence< T >::iterator regina::LightweightSequence< T >::begin
inline

Returns a read-write iterator that points to the first element of the sequence.

Note that an iterator is simply a pointer to an element of the sequence, and so by dereferencing an iterator you can change the corresponding element of the sequence directly.

Returns
a read-write begin iterator.

◆ begin() [2/3]

template<typename T >
iterator regina::ListOnCall< T >::begin ( ) const
inline

Returns an iterator pointing to the first item in this list.

If the list has not yet been filled with items, this will take place now. Thus the first call to begin() will be expensive, but subsequent calls will be extremely cheap.

Returns
an iterator pointing to the first item.

◆ begin() [3/3]

template<typename T >
LightweightSequence< T >::const_iterator regina::LightweightSequence< T >::begin
inline

Returns a read-only iterator that points to the first element of the sequence.

Note that a const_iterator is simply a const pointer to an element of the sequence, and so by dereferencing a const_iterator you can access (but not change) the corresponding element of the sequence.

Returns
a read-only begin iterator.

◆ Bitmask() [1/3]

regina::Bitmask::Bitmask ( )
inline

Creates a new invalid bitmask.

You must call the one-argument reset(size_t) or use the assignment operator to give the bitmask a length before it can be used.

Use of this default constructor is discouraged. The only reason it exists is to support arrays and containers of bitmasks, where the bitmasks must be created in bulk and then individually assigned lengths.

Warning
No other routines can be used with this bitmask until it has been assigned a length via reset(size_t) or the assignment operator. As the single exception, the class destructor is safe to use even if a bitmask has never been initialised.

◆ Bitmask() [2/3]

regina::Bitmask::Bitmask ( const Bitmask cloneMe)
inline

Creates a clone of the given bitmask.

It is fine if the given bitmask is invalid (but in this case, the new bitmask will be invalid also). Invalid bitmasks must be assigned a length using reset(size_t) or the assignment operator.

Parameters
cloneMethe bitmask to clone.

◆ Bitmask() [3/3]

regina::Bitmask::Bitmask ( size_t  length)
inline

Creates a new bitmask of the given length with all bits set to false.

Parameters
lengththe number of bits stored in this bitmask; this must be at least one.

◆ Bitmask1() [1/3]

template<typename T >
regina::Bitmask1< T >::Bitmask1 ( )
inline

Creates a new bitmask with all bits set to false.

◆ Bitmask1() [2/3]

template<typename T >
regina::Bitmask1< T >::Bitmask1 ( const Bitmask1< T > &  cloneMe)
inlinedefault

Creates a clone of the given bitmask.

Parameters
cloneMethe bitmask to clone.

◆ Bitmask1() [3/3]

template<typename T >
regina::Bitmask1< T >::Bitmask1 ( size_t  )
inline

Creates a new bitmask with all bits set to false.

The integer argument is merely for compatibility with the Bitmask constructor, and will be ignored.

Warning
This is not a constructor that initialises the bitmask to a given pattern.

◆ Bitmask2() [1/3]

template<typename T , typename U = T>
regina::Bitmask2< T, U >::Bitmask2 ( )
inline

Creates a new bitmask with all bits set to false.

◆ Bitmask2() [2/3]

template<typename T , typename U = T>
regina::Bitmask2< T, U >::Bitmask2 ( const Bitmask2< T, U > &  cloneMe)
inlinedefault

Creates a clone of the given bitmask.

Parameters
cloneMethe bitmask to clone.

◆ Bitmask2() [3/3]

template<typename T , typename U = T>
regina::Bitmask2< T, U >::Bitmask2 ( size_t  )
inline

Creates a new bitmask with all bits set to false.

The integer argument is merely for compatibility with the Bitmask constructor, and will be ignored.

Warning
This is not a constructor that initialises the bitmask to a given pattern.

◆ bits() [1/4]

size_t regina::Bitmask::bits ( ) const
inline

Returns the number of bits currently set to true in this bitmask.

Returns
the number of true bits.

◆ bits() [2/4]

template<typename T >
size_t regina::Bitmask1< T >::bits ( ) const
inline

Returns the number of bits currently set to true in this bitmask.

Returns
the number of true bits.

◆ bits() [3/4]

template<typename T , typename U = T>
size_t regina::Bitmask2< T, U >::bits ( ) const
inline

Returns the number of bits currently set to true in this bitmask.

Returns
the number of true bits.

◆ bits() [4/4]

template<typename T , unsigned size = sizeof(T)>
static int regina::BitManipulatorBySize< T, size >::bits ( x)
inlinestatic

Returns the number of bits that are set to 1 in the given integer.

Parameters
xthe integer of type T to examine.
Returns
the number of bits that are set.

◆ bitsRequired()

template<typename IntType >
constexpr int regina::bitsRequired ( IntType  n)
constexpr

Returns the number of bits required to store integers in the range 0,...,n-1.

This is simply the number of bits in the binary expansion of n-1.

If n is non-positive then this function will return 0.

Python
In Python, this routine fixes the integer type IntType to be long.
Parameters
nany integer.
Returns
the number of bits required to store 0,...,n-1.
Template Parameters
IntTypeany integer type, such as int, long, and so on.

◆ BoolSet() [1/4]

regina::BoolSet::BoolSet ( )
inline

Creates a new empty set.

◆ BoolSet() [2/4]

regina::BoolSet::BoolSet ( bool  insertTrue,
bool  insertFalse 
)
inline

Creates a set specifying whether true and/or false should be a member.

Parameters
insertTrueshould the new set include the element true?
insertFalseshould the new set include the element false?

◆ BoolSet() [3/4]

regina::BoolSet::BoolSet ( bool  member)
inline

Creates a set containing a single member as given.

Parameters
memberthe single element to include in this set.

◆ BoolSet() [4/4]

regina::BoolSet::BoolSet ( const BoolSet cloneMe)
default

Creates a set equal to the given set.

Parameters
cloneMethe set upon which we will base the new set.

◆ byteCode()

unsigned char regina::BoolSet::byteCode ( ) const
inline

Returns the byte code representing this boolean set.

The byte code is sufficient to reconstruct the set and is thus a useful means for passing boolean sets to and from the engine.

The lowest order bit of the byte code is 1 if and only if true is in the set. The next lowest order bit is 1 if and only if false is in the set. All other bits are 0. Thus sets BoolSet::sNone, BoolSet::sTrue, BoolSet::sFalse and BoolSet::sBoth have byte codes 0, 1, 2 and 3 respectively.

Returns
the byte code representing this set.

◆ characters()

void regina::xml::XMLParserCallback::characters ( const std::string &  s)
inlinevirtual

Called when characters are encountered.

Parameters
sthe characters encountered.

Reimplemented in regina::XMLCallback.

◆ clear() [1/6]

template<typename T >
void regina::StoreValue< T >::clear ( )
inline

Cleans up any currently held value before the property value is changed or cleared.

This implementation does nothing.

◆ clear() [2/6]

template<typename T >
void regina::StoreConstPtr< T >::clear ( )
inline

Cleans up any currently held value before the property value is changed or cleared.

This implementation resets the held pointer to null.

◆ clear() [3/6]

template<typename T >
void regina::StoreManagedPtr< T >::clear ( )
inline

Cleans up any currently held value before the property value is changed or cleared.

This implementation resets the held pointer to null and destroys the previously held value if any exists.

◆ clear() [4/6]

template<typename T , template< typename Stored > class Storage = StoreValue>
void regina::Property< T, Storage >::clear ( )
inline

Marks this property as unknown.

◆ clear() [5/6]

template<typename T >
void regina::Flags< T >::clear ( const Flags< T > &  rhs)
inline

Clears all bits from this set that appear in the given set.

Parameters
rhsidentifies the bits to clear from this set.

◆ clear() [6/6]

template<typename T >
void regina::Flags< T >::clear ( rhs)
inline

Clears all bits from this set that appear in the given flag.

Parameters
rhsthe flag to clear from this set.

◆ clonePtr() [1/2]

template<typename T >
T* regina::clonePtr ( const std::unique_ptr< T > &  cloneMe)
inline

A simple routine for cloning an object if and only if it exists.

If the given pointer is non-null, this routine returns a new clone of the object, created using the copy constructor for type T. Otherwise this routine simply returns a null pointer.

Note that, even though this routine takes a std::unique_ptr, it returns a raw pointer. The caller of this routine is responsible for deleting the new clone when it is no longer required.

This routine can be useful when implementing copy constructors for classes that only initialise internal data members on demand.

Python
Not present.
Parameters
cloneMea pointer to the object to clone; this may be null.
Returns
a newly allocated copy of the given object, or the null pointer if cloneMe is null.

◆ clonePtr() [2/2]

template<typename T >
T* regina::clonePtr ( T *  cloneMe)
inline

A simple routine for cloning an object if and only if it exists.

If the given pointer is non-null, this routine returns a new clone of the object, created using the copy constructor for type T. Otherwise this routine simply returns a null pointer.

The caller of this routine is responsible for deleting the new clone when it is no longer required.

This routine can be useful when implementing copy constructors for classes that only initialise internal data members on demand.

Python
Not present.
Parameters
cloneMea pointer to the object to clone; this may be null.
Returns
a newly allocated copy of the given object, or the null pointer if cloneMe is null.

◆ close()

IConvStreamBuffer* regina::i18n::IConvStreamBuffer::close ( )
throw (
)

Closes this stream buffer.

Returns
this stream buffer on success, or 0 on error.

◆ codeset()

static const char* regina::i18n::Locale::codeset ( )
static

Returns the character encoding used in the current locale.

This is a plain string, such as "UTF-8" or "ISO-8859-1".

Returns
the character encoding for the current locale.

◆ comment()

void regina::xml::XMLParserCallback::comment ( const std::string &  s)
inlinevirtual

Called when a comment is encountered.

Parameters
sthe comment string.

◆ contains()

bool regina::BoolSet::contains ( bool  value) const
inline

Determines if the given boolean is a member of this set.

Parameters
valuethe boolean to search for in this set.
Returns
true if and only if the given boolean is a member of this set.

◆ containsIntn() [1/3]

bool regina::Bitmask::containsIntn ( const Bitmask x,
const Bitmask y 
) const
inline

Determines whether this bitmask contains the intersection of the two given bitmasks.

For this routine to return true, every bit that is set in both x and y must be set in this bitmask also.

Precondition
Both x and y are the same length as this bitmask.
Parameters
xthe first bitmask used to form the intersection.
ythe first bitmask used to form the intersection.
Returns
true if and only if this bitmask entirely contains the intersection of x and y.

◆ containsIntn() [2/3]

template<typename T >
bool regina::Bitmask1< T >::containsIntn ( const Bitmask1< T > &  x,
const Bitmask1< T > &  y 
) const
inline

Determines whether this bitmask contains the intersection of the two given bitmasks.

For this routine to return true, every bit that is set in both x and y must be set in this bitmask also.

Parameters
xthe first bitmask used to form the intersection.
ythe first bitmask used to form the intersection.
Returns
true if and only if this bitmask entirely contains the intersection of x and y.

◆ containsIntn() [3/3]

template<typename T , typename U = T>
bool regina::Bitmask2< T, U >::containsIntn ( const Bitmask2< T, U > &  x,
const Bitmask2< T, U > &  y 
) const
inline

Determines whether this bitmask contains the intersection of the two given bitmasks.

For this routine to return true, every bit that is set in both x and y must be set in this bitmask also.

Parameters
xthe first bitmask used to form the intersection.
ythe first bitmask used to form the intersection.
Returns
true if and only if this bitmask entirely contains the intersection of x and y.

◆ duplicate()

char* regina::duplicate ( const std::string &  str)

Creates a new C string that is a duplicate of the given C++ string.

The deallocation of the new C string is the responsibility of the caller of this routine.

Python
Not present.
Parameters
strthe C++ string to duplicate.
Returns
the new duplicate C string.

◆ empty() [1/5]

void regina::BoolSet::empty ( )
inline

Removes all elements from this set.

◆ empty() [2/5]

template<typename T >
bool regina::Qitmask1< T >::empty ( ) const
inline

Determines whether this qitmask contains all zeroes.

Returns
true if every qit is zero, or false otherwise.

◆ empty() [3/5]

template<typename T , typename U = T>
bool regina::Qitmask2< T, U >::empty ( ) const
inline

Determines whether this qitmask contains all zeroes.

Returns
true if every qit is zero, or false otherwise.

◆ empty() [4/5]

template<typename T >
bool regina::Tritmask1< T >::empty ( ) const
inline

Determines whether this tritmask contains all zeroes.

Returns
true if every trit is zero, or false otherwise.

◆ empty() [5/5]

template<typename T , typename U = T>
bool regina::Tritmask2< T, U >::empty ( ) const
inline

Determines whether this tritmask contains all zeroes.

Returns
true if every trit is zero, or false otherwise.

◆ end() [1/3]

template<typename T >
LightweightSequence< T >::iterator regina::LightweightSequence< T >::end
inline

Returns a read-write iterator that points beyond the last element of the sequence.

Note that, because this iterator is past-the-end, it must not be dereferenced.

Returns
a read-write past-the-end iterator.

◆ end() [2/3]

template<typename T >
iterator regina::ListOnCall< T >::end ( ) const
inline

Returns an iterator pointing past the end of this list (i.e., just after the last item).

Precondition
The begin() routine has been called at least once (otherwise the list will not yet have been filled).
Returns
a past-the-end iterator.

◆ end() [3/3]

template<typename T >
LightweightSequence< T >::const_iterator regina::LightweightSequence< T >::end
inline

Returns a read-only iterator that points beyond the last element of the sequence.

Note that, because this iterator is past-the-end, it must not be dereferenced.

Returns
a read-only past-the-end iterator.

◆ end_document()

void regina::xml::XMLParserCallback::end_document ( )
inlinevirtual

Called when the document is finalised.

Reimplemented in regina::XMLCallback.

◆ end_element()

void regina::xml::XMLParserCallback::end_element ( const std::string &  n)
inlinevirtual

Called when an element's closing tag is encountered.

This is called immediately after start_element() if the opening tag is in <tag/> format.

Parameters
nthe name of the tag.

Reimplemented in regina::XMLCallback.

◆ engine()

std::default_random_engine & regina::RandomEngine::engine ( )
inline

Provides access to Regina's global uniform random bit generator (URBG).

As described in the class notes, you should pass engine() directly to other random number generation functions as you use them, and not store a reference to it for later use.

Python
Not present.
Returns
a reference to the global URBG.

◆ ensureOne() [1/3]

template<typename T >
void regina::Flags< T >::ensureOne ( default_,
other 
)
inline

Adjust this set so that exactly one and only one of the two given flags are included.

If neither flag is present or both flags are present, this set will be adjusted so that default_ is present and other is not.

Precondition
Both default_ and other are each single-bit flags.
Parameters
default_the flag that will be set if any adjustments need to be made.
otherthe flag that will be cleared if any adjustments need to be made.

◆ ensureOne() [2/3]

template<typename T >
void regina::Flags< T >::ensureOne ( default_,
second,
last 
)
inline

Adjust this set so that exactly one and only one of the three given flags are included.

If neither flag is present, then default_ will be used. If multiple flags are present, then the flag that appears earlier in the argument list for this routine will be used.

Precondition
Each of the given flags is single-bit.
Parameters
default_the highest-priority flag.
secondthe second-highest-priority flag.
lastthe lowest-priority flag.

◆ ensureOne() [3/3]

template<typename T >
void regina::Flags< T >::ensureOne ( default_,
second,
third,
last 
)
inline

Adjust this set so that exactly one and only one of the four given flags are included.

If neither flag is present, then default_ will be used. If multiple flags are present, then the flag that appears earlier in the argument list for this routine will be used.

Precondition
Each of the given flags is single-bit.
Parameters
default_the highest-priority flag.
secondthe second-highest-priority flag.
thirdthe third-highest-priority flag.
lastthe lowest-priority flag.

◆ equal()

template<typename T >
template<typename Iterator >
bool regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::equal ( Iterator  a,
Iterator  b 
) const
inline

Tests whether the subsequences referred to by the given pair of iterators are identical.

See the class notes for details on how each iterator is converted into a subsequence.

Parameters
aan iterator indicating the first of the two subsequences to compare.
ban iterator indicating the second of the two subsequences to compare.
Returns
true if and only if the two subsequences are identical.

◆ erase() [1/2]

template<typename T >
std::vector<T*>::iterator regina::MarkedVector< T >::erase ( typename std::vector< T * >::iterator  first,
typename std::vector< T * >::iterator  last 
)
inline

Erases all items in the given range in this vector.

The items will not be destroyed, and the (now irrelevant) indices stored inside them will not be modified.

Precondition
The given iterators describe a valid range in this vector.
Parameters
firstan iterator pointing to the first element to erase.
lastan iterator pointing just beyond the last element to erase.
Returns
an iterator pointing to the element immediately after the elements that were erased.

◆ erase() [2/2]

template<typename T >
std::vector<T*>::iterator regina::MarkedVector< T >::erase ( typename std::vector< T * >::iterator  pos)
inline

Erases the item at the given position in this vector.

The item will not be destroyed, and the (now irrelevant) index stored inside it will not be modified.

Precondition
The given iterator points to an element of this vector.
Parameters
posan iterator pointing to the element to erase.
Returns
an iterator pointing to the element immediately after the element that was erased.

◆ error()

void regina::xml::XMLParserCallback::error ( const std::string &  s)
inlinevirtual

Called when a parser error occurs.

Parameters
sthe error message.

Reimplemented in regina::XMLCallback.

◆ fatal_error()

void regina::xml::XMLParserCallback::fatal_error ( const std::string &  s)
inlinevirtual

Called when a parser fatal error occurs.

Parameters
sthe error message.

Reimplemented in regina::XMLCallback.

◆ fill()

void regina::BoolSet::fill ( )
inline

Places both true and false into this set if they are not already present.

◆ finish()

void regina::xml::XMLParser::finish ( )
inline

Signals that there are no more XML chunks to parse.

◆ firstBit() [1/4]

long regina::Bitmask::firstBit ( ) const
inline

Returns the index of the first true bit in this bitmask, or -1 if there are no true bits.

Returns
the index of the first true bit.

◆ firstBit() [2/4]

template<typename T >
long regina::Bitmask1< T >::firstBit ( ) const
inline

Returns the index of the first true bit in this bitmask, or -1 if there are no true bits.

Returns
the index of the first true bit.

◆ firstBit() [3/4]

template<typename T , typename U = T>
long regina::Bitmask2< T, U >::firstBit ( ) const
inline

Returns the index of the first true bit in this bitmask, or -1 if there are no true bits.

Returns
the index of the first true bit.

◆ firstBit() [4/4]

template<typename T >
static int regina::BitManipulator< T >::firstBit ( x)
inlinestatic

Returns the index of the first true bit in the given integer, or -1 if the given integer is zero.

Bits are indexed from 0 upwards, starting at the least significant bit.

Parameters
xthe integer of type T to examine.
Returns
the position of the first true bit, or -1 if there are no true bits.

◆ Flags() [1/3]

template<typename T >
regina::Flags< T >::Flags ( )
inline

Creates an empty flag set, with no flags set at all.

◆ Flags() [2/3]

template<typename T >
regina::Flags< T >::Flags ( const Flags< T > &  init)
inlinedefault

Creates a clone of the given flag set.

Parameters
initthe flag set to clone.

◆ Flags() [3/3]

template<typename T >
regina::Flags< T >::Flags ( init)
inline

Creates a flag set initialised to the given value.

Parameters
initthe initial value of this flag set.

◆ flip() [1/3]

void regina::Bitmask::flip ( )
inline

Negates every bit in this bitmask.

All true bits will be set to false and vice versa.

Warning
Because this class may increase the bitmask length (rounding up to the next unit of storage), flip() may set additional true bits in the "dead space" between the intended length and the actual length. This may cause unexpected results for routines such as subset testing, bit counting and so on. Be careful!

◆ flip() [2/3]

template<typename T >
void regina::Bitmask1< T >::flip ( )
inline

Negates every bit in this bitmask.

All true bits will be set to false and vice versa.

Unlike the more generic Bitmask, this optimised bitmask class does not store a length. This means that all 8 * sizeof(T) possible bits will be negated.

◆ flip() [3/3]

template<typename T , typename U = T>
void regina::Bitmask2< T, U >::flip ( )
inline

Negates every bit in this bitmask.

All true bits will be set to false and vice versa.

Unlike the more generic Bitmask, this optimised bitmask class does not store a length. This means that all 8 * sizeof(T) + 8 * sizeof(U) possible bits will be negated.

◆ fromByteCode()

BoolSet regina::BoolSet::fromByteCode ( unsigned char  code)
inlinestatic

Creates a boolean set from the given byte code.

See byteCode() for more information on byte codes.

Precondition
code is 0, 1, 2 or 3.
Parameters
codethe byte code from which the new set will be created.

◆ fromInt()

template<typename T >
static Flags<T> regina::Flags< T >::fromInt ( int  value)
inlinestatic

Returns the set corresponding to the given integer value.

This is suitable for file input and/or output.

Warning
This function should not be used widely, since it effectively works around inbuilt type safety mechanisms.
Returns
the set corresponding to the given integer value.

◆ get() [1/8]

template<class T >
T * regina::SafePtr< T >::get
inline

Returns a raw pointer to the pointee.

Returns
the pointee.

◆ get() [2/8]

bool regina::Bitmask::get ( size_t  index) const
inline

Returns the value of the given bit of this bitmask.

Parameters
indexindicates which bit to query; this must be at least zero and strictly less than the length of this bitmask.
Returns
the value of the (index)th bit.

◆ get() [3/8]

template<typename T >
bool regina::Bitmask1< T >::get ( size_t  index) const
inline

Returns the value of the given bit of this bitmask.

Parameters
indexindicates which bit to query; this must be between 0 and (8 * sizeof(T) - 1) inclusive.
Returns
the value of the (index)th bit.

◆ get() [4/8]

template<typename T , typename U = T>
bool regina::Bitmask2< T, U >::get ( size_t  index) const
inline

Returns the value of the given bit of this bitmask.

Parameters
indexindicates which bit to query; this must be between 0 and (8 * sizeof(T) + 8 * sizeof(U) - 1) inclusive.
Returns
the value of the (index)th bit.

◆ get() [5/8]

template<typename T >
char regina::Qitmask1< T >::get ( unsigned  index) const
inline

Returns the value of the given qit in this qitmask.

Parameters
indexindicates which qit to query; this must be between 0 and (8 * sizeof(T) - 1) inclusive.
Returns
the value of the (index)th qit; this will be either 0, 1, 2 or 3.

◆ get() [6/8]

template<typename T , typename U = T>
char regina::Qitmask2< T, U >::get ( unsigned  index) const
inline

Returns the value of the given qit in this qitmask.

Parameters
indexindicates which qit to query; this must be between 0 and (8 * sizeof(T) + 8 * sizeof(U) - 1) inclusive.
Returns
the value of the (index)th qit; this will be either 0, 1, 2 or 3.

◆ get() [7/8]

template<typename T >
char regina::Tritmask1< T >::get ( unsigned  index) const
inline

Returns the value of the given trit in this tritmask.

Parameters
indexindicates which trit to query; this must be between 0 and (8 * sizeof(T) - 1) inclusive.
Returns
the value of the (index)th trit; this will be either 0, 1 or 2.

◆ get() [8/8]

template<typename T , typename U = T>
char regina::Tritmask2< T, U >::get ( unsigned  index) const
inline

Returns the value of the given trit in this tritmask.

Parameters
indexindicates which trit to query; this must be between 0 and (8 * sizeof(T) + 8 * sizeof(U) - 1) inclusive.
Returns
the value of the (index)th trit; this will be either 0, 1 or 2.

◆ has() [1/2]

template<typename T >
bool regina::Flags< T >::has ( const Flags< T > &  rhs) const
inline

Returns whether all of the flags in the given set are set.

This requires all of the bits of all of the flags in the given set to be present in this set. The test is equivalent to (*this & rhs) == rhs.

Parameters
rhsthe set whose presence will be tested.
Returns
true if and only if all of the bits of the given set are present in this set.

◆ has() [2/2]

template<typename T >
bool regina::Flags< T >::has ( flag) const
inline

Returns whether the given flag is set.

This requires all of the bits of the given flag to be set. The test is equivalent to (*this & flag) == flag.

Parameters
flagthe flag whose presence will be tested.
Returns
true if and only if all of the bits of the given flag are set.

◆ has2() [1/2]

template<typename T >
bool regina::Tritmask1< T >::has2 ( ) const
inline

Determines whether this tritmask contains at least one trit with value 2.

Returns
true if at least one trit is 2, or false otherwise.

◆ has2() [2/2]

template<typename T , typename U = T>
bool regina::Tritmask2< T, U >::has2 ( ) const
inline

Determines whether this tritmask contains at least one trit with value 2.

Returns
true if at least one trit is 2, or false otherwise.

◆ has3() [1/2]

template<typename T >
bool regina::Qitmask1< T >::has3 ( ) const
inline

Determines whether this qitmask contains at least one qit with value 3.

Returns
true if at least one qit is 3, or false otherwise.

◆ has3() [2/2]

template<typename T , typename U = T>
bool regina::Qitmask2< T, U >::has3 ( ) const
inline

Determines whether this qitmask contains at least one qit with value 3.

Returns
true if at least one qit is 3, or false otherwise.

◆ hasExtraSuperset()

template<typename T >
bool regina::TrieSet< T >::hasExtraSuperset ( const T &  subset,
const T &  exc1,
const T &  exc2,
unsigned long  universeSize 
) const

Performs the particular superset search required by the double description method.

This routine asks the following question: In this collection of sets, is there any superset of the argument subset other than exc1 or exc2? Here the sets exc1 and exc2 are explicitly excluded from our search. Supersets need not be proper supersets (so if an exact copy of subset is found in the tree then this will suffice).

This routine has a slow running time, which in pathological cases can grow to either 2^n (where n is the bitmask length) or the number of sets stored in this collection, whichever is smaller. However, for "typical" searches in the context of normal surface enumeration, the running time is often significantly faster.

Precondition
The sets exc1 and exc2 are distinct, and each is contained in this collection precisely once.
Parameters
subsetthe object of the query: we are searching this collection for a (non-strict) superset of this argument.
exc1the first set in the collection to be excluded from this search.
exc2the second set in the collection to be excluded from this search.
universeSizethe number of elements in the underlying universe (and therefore the lowest possible level in the search tree). Note that this is always less than or equal to the number of bits that the underlying bitmask type T can support.
Returns
true if a superset with the required properties was found, or false otherwise.

◆ hasFalse()

bool regina::BoolSet::hasFalse ( ) const
inline

Determines if false is a member of this set.

Returns
true if and only if false is a member of this set.

◆ hasNonZeroMatch() [1/2]

template<typename T >
bool regina::Qitmask1< T >::hasNonZeroMatch ( const Qitmask1< T > &  other) const
inline

Determines whether there is some index at which both this and the given qitmask both have non-zero qits.

That is, there is some index i for which get(i) and other.get(i) are both non-zero.

Note that these two qits do not need to be equal; they just both need to be non-zero. Note also that this only needs to happen at one index; there may be other indices at which the qit is zero in one qitmask but not the other.

Parameters
otherthe qitmask to compare with this.
Returns
true if there is some index at which this and other both have non-zero qits, or false otherwise.

◆ hasNonZeroMatch() [2/2]

template<typename T , typename U = T>
bool regina::Qitmask2< T, U >::hasNonZeroMatch ( const Qitmask2< T, U > &  other) const
inline

Determines whether there is some index at which both this and the given qitmask both have non-zero qits.

That is, there is some index i for which get(i) and other.get(i) are both non-zero.

Note that these two qits do not need to be equal; they just both need to be non-zero. Note also that this only needs to happen at one index; there may be other indices at which the qit is zero in one qitmask but not the other.

Parameters
otherthe qitmask to compare with this.
Returns
true if there is some index at which this and other both have non-zero qits, or false otherwise.

◆ hasSafePtr()

template<class T >
bool regina::SafePointeeBase< T >::hasSafePtr
inline

Is there one or more SafePtr currently pointing to this object?

◆ hasSubset()

template<typename T >
bool regina::TrieSet< T >::hasSubset ( const T &  superset,
unsigned long  universeSize 
) const

Determines whether this collection of sets contains any subset of the argument superset.

Subsets need not be proper subsets (so if an exact copy of superset is found in the tree then this will suffice).

This routine has a slow running time, which in pathological cases can grow to either 2^n (where n is the bitmask length) or the number of sets stored in this collection, whichever is smaller. However, for "typical" searches in the context of normal surface enumeration, the running time is often significantly faster.

Parameters
supersetthe object of the query: we are searching this collection for a (non-strict) subset of this argument.
universeSizethe number of elements in the underlying universe (and therefore the lowest possible level in the search tree). Note that this is always less than or equal to the number of bits that the underlying bitmask type T can support.
Returns
true if a subset was found, or false otherwise.

◆ hasTrue()

bool regina::BoolSet::hasTrue ( ) const
inline

Determines if true is a member of this set.

Returns
true if and only if true is a member of this set.

◆ IConvStream()

regina::i18n::IConvStream::IConvStream ( std::ostream &  dest,
const char *  srcCode,
const char *  destCode 
)
inline

Creates a new IConvStream; see the class notes for details.

If the given encodings are invalid, this stream will still forward data to the given output stream but no conversion will take place.

See the iconv documentation for information on what encodings are supported. For the GNU C library implementation, valid encodings can be found by running iconv –list.

Precondition
The destination output stream is already open.
Parameters
destthe destination output stream.
srcCodethe character encoding for data that is to be written into this IConvStream.
destCodethe character encoding for the translated data that will subsequently be written to the destination output stream.

◆ IConvStreamBuffer()

regina::i18n::IConvStreamBuffer::IConvStreamBuffer ( )
inline

Creates a new stream buffer.

◆ init()

template<typename T >
void regina::LightweightSequence< T >::init ( size_t  size = 0)
inline

Resizes this sequence to contain the given number of elements.

All existing elements in this sequence will be destroyed, using the default destructor for type T. If the elements are pointers whose pointee objects need to be deleted also, you must do this separately before calling init().

The elements of the sequence after this routine is called will be initialised using the default constructor for type T.

Warning
Calling init() is an expensive operation, in that it will always force a reallocation of the underlying storage (even if the new size is smaller than the old).
Parameters
sizethe number of elements that the sequence will contain after this routine is called.

◆ initialise()

template<typename T >
virtual void regina::ListOnCall< T >::initialise ( )
protectedpure virtual

Fills this list with items.

The particular set of items to use will typically depend on the particular subclass of ListOnCall that is being defined.

This routine will be run the first time that begin() is called on each list, and will not be run again.

Implemented in regina::SatBlockStarterSet.

◆ insert() [1/2]

template<typename T >
void regina::TrieSet< T >::insert ( const T &  entry)

Insert the given set into this collection.

The same set may be insert into this collection multiple times (and this multiplicity will be recorded correctly).

Running time for insertion is O(n), where n is the bitmask length.

Parameters
entrythe new set to insert.

◆ insert() [2/2]

template<typename T >
void regina::ListOnCall< T >::insert ( T *  item)
inlineprotected

Adds the given item to the end of this list.

This routine should only ever be called from within a subclass implementation of initialise().

The given item will be owned by this list, and will be destroyed when this list is destroyed.

Parameters
itemthe new item to insert.

◆ insertFalse()

void regina::BoolSet::insertFalse ( )
inline

Inserts false into this set if it is not already present.

◆ insertTrue()

void regina::BoolSet::insertTrue ( )
inline

Inserts true into this set if it is not already present.

◆ intValue()

template<typename T >
int regina::Flags< T >::intValue ( ) const
inline

Returns the integer representation of this set.

This is suitable for file input and/or output.

Warning
This function should not be used widely, since it effectively works around inbuilt type safety mechanisms.
Returns
the integer value of this set.

◆ inUnion() [1/3]

bool regina::Bitmask::inUnion ( const Bitmask x,
const Bitmask y 
) const
inline

Determines whether this bitmask is entirely contained within the union of the two given bitmasks.

For this routine to return true, every bit that is set in this bitmask must also be set in either x or y.

Precondition
Both x and y are the same length as this bitmask.
Parameters
xthe first bitmask used to form the union.
ythe first bitmask used to form the union.
Returns
true if and only if this bitmask is entirely contained within the union of x and y.

◆ inUnion() [2/3]

template<typename T >
bool regina::Bitmask1< T >::inUnion ( const Bitmask1< T > &  x,
const Bitmask1< T > &  y 
) const
inline

Determines whether this bitmask is entirely contained within the union of the two given bitmasks.

For this routine to return true, every bit that is set in this bitmask must also be set in either x or y.

Parameters
xthe first bitmask used to form the union.
ythe first bitmask used to form the union.
Returns
true if and only if this bitmask is entirely contained within the union of x and y.

◆ inUnion() [3/3]

template<typename T , typename U = T>
bool regina::Bitmask2< T, U >::inUnion ( const Bitmask2< T, U > &  x,
const Bitmask2< T, U > &  y 
) const
inline

Determines whether this bitmask is entirely contained within the union of the two given bitmasks.

For this routine to return true, every bit that is set in this bitmask must also be set in either x or y.

Parameters
xthe first bitmask used to form the union.
ythe first bitmask used to form the union.
Returns
true if and only if this bitmask is entirely contained within the union of x and y.

◆ isBase64()

bool regina::isBase64 ( char  ch)
inline

Determines whether the given character is a base64 printable character as used by the base64 routines in Regina.

The base64 printable characters are the letters (both upper-case and lower-case), digits, plus (+), and forward slash (/).

Note that the equals sign (=) is padding, and is not considered by this routine to be a base64 printable character.

Python
Not present.
Parameters
chany character.
Returns
true if the given character is one of the base64 printable characters used in Regina, or false if it is not.

◆ known()

template<typename T , template< typename Stored > class Storage = StoreValue>
bool regina::Property< T, Storage >::known ( ) const
inline

Returns whether or not this property is currently marked as known.

Returns
whether this property is marked as known.

◆ lastBit() [1/4]

long regina::Bitmask::lastBit ( ) const
inline

Returns the index of the last true bit in this bitmask, or -1 if there are no true bits.

Returns
the index of the last true bit.

◆ lastBit() [2/4]

template<typename T >
long regina::Bitmask1< T >::lastBit ( ) const
inline

Returns the index of the last true bit in this bitmask, or -1 if there are no true bits.

Returns
the index of the last true bit.

◆ lastBit() [3/4]

template<typename T , typename U = T>
long regina::Bitmask2< T, U >::lastBit ( ) const
inline

Returns the index of the last true bit in this bitmask, or -1 if there are no true bits.

Returns
the index of the last true bit.

◆ lastBit() [4/4]

template<typename T >
static int regina::BitManipulator< T >::lastBit ( x)
inlinestatic

Returns the index of the last true bit in the given integer, or -1 if the given integer is zero.

Bits are indexed from 0 upwards, starting at the least significant bit.

Parameters
xthe integer of type T to examine.
Returns
the position of the last true bit, or -1 if there are no true bits.

◆ less()

template<typename T >
template<typename Iterator >
bool regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::less ( Iterator  a,
Iterator  b 
) const
inline

Lexicographically compares the subsequences referred to by the given pair of iterators.

See the class notes for details on how each iterator is converted into a subsequence.

This member function is identical to the bracket operator.

Parameters
aan iterator indicating the first of the two subsequences to compare.
ban iterator indicating the second of the two subsequences to compare.
Returns
true if and only if the subsequence indicated by a is lexicographically smaller than the subsequence indicated by b.

◆ lessThan() [1/3]

bool regina::Bitmask::lessThan ( const Bitmask other) const
inline

Determines whether this bitmask appears strictly before the given bitmask when bitmasks are sorted in lexicographical order.

Here the bit at index 0 is least significant, and the bit at index length-1 is most significant.

Precondition
This and the given bitmask have the same length.
Warning
We do not use < for this operation, since <= represents the subset operation.
Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this is lexicographically strictly smaller than the given bitmask.

◆ lessThan() [2/3]

template<typename T >
bool regina::Bitmask1< T >::lessThan ( const Bitmask1< T > &  other) const
inline

Determines whether this bitmask appears strictly before the given bitmask when bitmasks are sorted in lexicographical order.

Here the bit at index 0 is least significant, and the bit at index length-1 is most significant.

Warning
We do not use < for this operation, since <= represents the subset operation.
Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this is lexicographically strictly smaller than the given bitmask.

◆ lessThan() [3/3]

template<typename T , typename U = T>
bool regina::Bitmask2< T, U >::lessThan ( const Bitmask2< T, U > &  other) const
inline

Determines whether this bitmask appears strictly before the given bitmask when bitmasks are sorted in lexicographical order.

Here the bit at index 0 is least significant, and the bit at index length-1 is most significant.

Warning
We do not use < for this operation, since <= represents the subset operation.
Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this is lexicographically strictly smaller than the given bitmask.

◆ LightweightSequence() [1/4]

template<typename T >
regina::LightweightSequence< T >::LightweightSequence
inline

Creates a new empty sequence; that is, a sequence of size zero.

This sequence can be resized by calling init().

◆ LightweightSequence() [2/4]

template<typename T >
regina::LightweightSequence< T >::LightweightSequence ( const LightweightSequence< T > &  src)
inline

Create a copy of the given sequence.

This induces a deep copy of src, in that all of the elements of src will be copied into the new sequence.

Parameters
srcthe sequence to copy.

◆ LightweightSequence() [3/4]

template<typename T >
regina::LightweightSequence< T >::LightweightSequence ( LightweightSequence< T > &&  src)
inlinenoexcept

Moves the contents of the given sequence to this new sequence.

This is a fast (constant time) operation.

The sequence that was passed (src) will no longer be usable.

Parameters
srcthe sequence to move.

◆ LightweightSequence() [4/4]

template<typename T >
regina::LightweightSequence< T >::LightweightSequence ( size_t  size)
inlineexplicit

Create a new sequence containing the given number of elements.

The elements themselves will be initialised using the default constructor for type T.

Parameters
sizethe number of elements in the new sequence.

◆ ListOnCall()

template<typename T >
regina::ListOnCall< T >::ListOnCall ( )
inline

Creates a new list structure.

The list will not be filled with items; this does not happen until the first time that begin() is called.

◆ lookup()

const std::string & regina::xml::XMLPropertyDict::lookup ( const std::string &  key) const
inline

Return a value for the given key, or the empty string if the key does not exist in the map.

Parameters
keythe key to look up.
Returns
the value associated with the given key, or the empty string if the key does not exist in the map.

◆ markedIndex()

size_t regina::MarkedElement::markedIndex ( ) const
inline

Returns the index at which this object is stored in an MarkedVector.

If this object does not belong to an MarkedVector, the return value is undefined.

Returns
the index at which this object is stored.

◆ MarkedVector() [1/2]

template<typename T >
regina::MarkedVector< T >::MarkedVector ( )
inline

Constructs a new empty vector.

◆ MarkedVector() [2/2]

template<typename T >
regina::MarkedVector< T >::MarkedVector ( MarkedVector< T > &&  )
defaultnoexcept

Moves the contents of the given vector into this new vector.

The vector that was passed will no longer be usable.

◆ maxWith() [1/2]

template<typename T >
Tritmask1<T>& regina::Tritmask1< T >::maxWith ( const Tritmask1< T > &  rhs)
inline

Sets this to the maximum of this and the given tritmask.

That is, the ith trit will be set to the maximum of the ith trit in this tritmask and the ith trit in other.

This is a "trit" version of boolean OR.

Parameters
rhsthe tritmask to "max" with this.
Returns
a reference to this tritmask.

◆ maxWith() [2/2]

template<typename T , typename U = T>
Tritmask2<T, U>& regina::Tritmask2< T, U >::maxWith ( const Tritmask2< T, U > &  rhs)
inline

Sets this to the maximum of this and the given tritmask.

That is, the ith trit will be set to the maximum of the ith trit in this tritmask and the ith trit in other.

This is a "trit" version of boolean OR.

Parameters
rhsthe tritmask to "max" with this.
Returns
a reference to this tritmask.

◆ mem_istream()

regina::mem_istream::mem_istream ( const char *  begin,
const char *  end 
)
inline

Initialies an input stream that reads from the given array of characters.

Parameters
begina pointer to the beginning of the array to read.
enda pointer past-the-end of the array to read.

◆ mem_streambuf()

regina::mem_streambuf::mem_streambuf ( const char *  begin,
const char *  end 
)
inline

Initialies a read-only stream buffer that reads from the given array of characters.

Parameters
begina pointer to the beginning of the array to read.
enda pointer past-the-end of the array to read.

◆ minWith() [1/2]

template<typename T >
Tritmask1<T>& regina::Tritmask1< T >::minWith ( const Tritmask1< T > &  rhs)
inline

Sets this to the minimum of this and the given tritmask.

That is, the ith trit will be set to the minimum of the ith trit in this tritmask and the ith trit in other.

This is a "trit" version of boolean AND.

Parameters
rhsthe tritmask to "min" with this.
Returns
a reference to this tritmask.

◆ minWith() [2/2]

template<typename T , typename U = T>
Tritmask2<T, U>& regina::Tritmask2< T, U >::minWith ( const Tritmask2< T, U > &  rhs)
inline

Sets this to the minimum of this and the given tritmask.

That is, the ith trit will be set to the minimum of the ith trit in this tritmask and the ith trit in other.

This is a "trit" version of boolean AND.

Parameters
rhsthe tritmask to "min" with this.
Returns
a reference to this tritmask.

◆ nextPermutation()

template<typename T >
static T regina::BitManipulatorByType< T >::nextPermutation ( x)
inlinestatic

Returns the next largest integer with the same number of true bits as x.

If x is the largest such integer (i.e., x is of the form 111...1000...0), then this routine returns 0.

Parameters
xthe integer of type T to examine.
Returns
the next largrst integer with the same number of true bits, or 0 if this is the largest such integer.

◆ nextPowerOfTwo()

template<typename IntType >
constexpr IntType regina::nextPowerOfTwo ( IntType  n)
constexpr

Returns the smallest integer power of two that is greater than or equal to the given argument n.

If n is non-positive then this function will return 1.

Python
In Python, this routine fixes the integer type IntType to be long.
Warning
Even though the return value is the same type as the argument n, this routine may still overflow. For example, if IntType is a signed char then nextPowerOfTwo(127) will return -128, and if IntType is an unsigned char then nextPowerOfTwo(255) will return 0. Be sure that IntType is large enough for your requirements.
Parameters
nany integer.
Returns
the smallest integer power of two that is ≥ n.
Template Parameters
IntTypeany integer type, such as int, long, and so on.

◆ nonEmpty() [1/4]

template<typename T >
bool regina::Qitmask1< T >::nonEmpty ( ) const
inline

Determines whether this qitmask contains at least one non-zero qit.

Returns
true if at least one qit is non-zero, or false otherwise.

◆ nonEmpty() [2/4]

template<typename T , typename U = T>
bool regina::Qitmask2< T, U >::nonEmpty ( ) const
inline

Determines whether this qitmask contains at least one non-zero qit.

Returns
true if at least one qit is non-zero, or false otherwise.

◆ nonEmpty() [3/4]

template<typename T >
bool regina::Tritmask1< T >::nonEmpty ( ) const
inline

Determines whether this tritmask contains at least one non-zero trit.

Returns
true if at least one trit is non-zero, or false otherwise.

◆ nonEmpty() [4/4]

template<typename T , typename U = T>
bool regina::Tritmask2< T, U >::nonEmpty ( ) const
inline

Determines whether this tritmask contains at least one non-zero trit.

Returns
true if at least one trit is non-zero, or false otherwise.

◆ open()

IConvStreamBuffer* regina::i18n::IConvStreamBuffer::open ( std::ostream &  dest,
const char *  srcCode,
const char *  destCode 
)

Opens a new stream buffer that wraps around the given output stream.

If this stream buffer is already open, it will be closed and then reopened with the given parameters.

Any data that is sent to this stream buffer will be translated from srcCode to destCode and passed on to the given output stream.

If the given encodings are invalid, this stream will still forward data to the given output stream but no conversion will take place.

See the iconv documentation for information on what encodings are supported. For the GNU C library implementation, valid encodings can be found by running iconv –list.

Precondition
The destination output stream is already open.
Parameters
destthe destination output stream.
srcCodethe character encoding for data that is to be written into this stream buffer.
destCodethe character encoding for the translated data that will subsequently be written to the destination output stream.
Returns
this stream buffer on success, or 0 on error.

◆ operator bool()

template<class T >
regina::SafePtr< T >::operator bool
inline

Returns true if the pointee is non-null.

This is equivalent to testing whether get() is not null.

Returns
true if and only if the pointee is non-null.

◆ operator!=() [1/3]

bool regina::BoolSet::operator!= ( const BoolSet other) const
inline

Determines if this set is not equal to the given set.

Parameters
otherthe set to compare with this.
Returns
true if and only if this and the given set are not equal.

◆ operator!=() [2/3]

template<typename T >
bool regina::Flags< T >::operator!= ( const Flags< T > &  rhs) const
inline

Determines whether this set is not equal to the given flag set.

Parameters
rhsthe flag to test this against.
Returns
true if and only if this and the given flag set are not identical.

◆ operator!=() [3/3]

template<typename T >
bool regina::Flags< T >::operator!= ( rhs) const
inline

Determines whether this set is not equal to the given flag.

Parameters
rhsthe flag to test this against.
Returns
true if and only if this and the given flag are not identical.

◆ operator&() [1/3]

BoolSet regina::BoolSet::operator& ( const BoolSet other) const
inline

Returns the intersection of this set with the given set.

The result is a set containing precisely the elements that belong to both original sets. This set is not changed.

Parameters
otherthe set to intersect with this set.
Returns
the intersection of this and the given set.

◆ operator&() [2/3]

template<typename T >
Flags<T> regina::Flags< T >::operator& ( const Flags< T > &  rhs) const
inline

Returns the bitwise AND of this and the given flag set.

This flag set is not changed.

Parameters
rhsthe flag set to combine with this set.
Returns
the combination of this and the given flag set.

◆ operator&() [3/3]

template<typename T >
Flags<T> regina::Flags< T >::operator& ( rhs) const
inline

Returns the bitwise AND of this set and the given flag.

This flag set is not changed.

Parameters
rhsthe flag to combine with this set.
Returns
the combination of this set and the given flag.

◆ operator&=() [1/6]

Bitmask & regina::Bitmask::operator&= ( const Bitmask other)
inline

Sets this to the intersection of this and the given bitmask.

Every bit that is unset in other will be unset in this bitmask.

Precondition
This and the given bitmask have the same length.
Parameters
otherthe bitmask to intersect with this.
Returns
a reference to this bitmask.

◆ operator&=() [2/6]

template<typename T >
Bitmask1<T>& regina::Bitmask1< T >::operator&= ( const Bitmask1< T > &  other)
inline

Sets this to the intersection of this and the given bitmask.

Every bit that is unset in other will be unset in this bitmask.

Parameters
otherthe bitmask to intersect with this.
Returns
a reference to this bitmask.

◆ operator&=() [3/6]

template<typename T , typename U = T>
Bitmask2<T, U>& regina::Bitmask2< T, U >::operator&= ( const Bitmask2< T, U > &  other)
inline

Sets this to the intersection of this and the given bitmask.

Every bit that is unset in other will be unset in this bitmask.

Parameters
otherthe bitmask to intersect with this.
Returns
a reference to this bitmask.

◆ operator&=() [4/6]

BoolSet & regina::BoolSet::operator&= ( const BoolSet other)
inline

Sets this set to be the intersection of this and the given set.

The result is a set containing precisely the elements that belong to both original sets. Note that this set will be modified.

Parameters
otherthe set to intersect with this set.
Returns
a reference to this set.

◆ operator&=() [5/6]

template<typename T >
Flags<T>& regina::Flags< T >::operator&= ( const Flags< T > &  rhs)
inline

Changes this flag set by taking a bitwise AND with the given flag set.

Parameters
rhsthe flag set to combine with this set.
Returns
a reference to this flag set.

◆ operator&=() [6/6]

template<typename T >
Flags<T>& regina::Flags< T >::operator&= ( rhs)
inline

Changes this flag set by taking a bitwise AND with the given flag.

Parameters
rhsthe flag to combine with this set.
Returns
a reference to this flag set.

◆ operator()() [1/10]

template<typename T >
const std::vector<T*>& regina::MarkedVector< T >::operator() ( ) const
inline

Casts this vector to a const std::vector, thus providing access to the entire const functionality of std::vector.

Returns
a reference to this vector, cast as a const std::vector.

◆ operator()() [2/10]

template<class T >
T* regina::FuncNew< T >::operator() ( ) const
inline

Creates a new object using the default constructor.

Returns
the newly created object.

◆ operator()() [3/10]

template<class Base >
template<typename Info , typename... Args>
Base* regina::NewFunction< Base >::operator() ( Args &&...  args) const
inline

Creates a new object of the subclass Info::Class.

Precondition
It is known in advance that Info::Class will be a subclass of Base.
Parameters
argsany additional arguments to pass to the Info::Class constructor. These will be copied/moved, so if you wish to pass a reference then you should wrap it in std::ref or std::cref.
Returns
a new object of the subclass Info::Class.

◆ operator()() [4/10]

template<typename T >
bool regina::LightweightSequence< T >::Less::operator() ( const LightweightSequence a,
const LightweightSequence b 
) const
inline

Compares two sequences lexicographically.

The sequences need not be the same size.

This routine is identical to testing (*a) < (*b).

Parameters
aa pointer to the first of the two sequences to compare.
ba pointer to the second of the two sequences to compare.
Returns
true if sequence a is strictly lexicographically smaller than sequence b, or false if a is either lexicographically greater than or equal to b.

◆ operator()() [5/10]

template<class T >
T* regina::FuncNewCopyRef< T >::operator() ( const T &  obj) const
inline

Creates a new object using the copy constructor.

Parameters
objthe object whose data should be passed to the copy constructor.
Returns
the newly created object.

◆ operator()() [6/10]

template<class T >
T* regina::FuncNewCopyPtr< T >::operator() ( const T *  ptr) const
inline

Creates a new object using the copy constructor.

Parameters
ptrthe pointer whose data should (after dereferencing) be passed to the copy constructor.
Returns
the newly created object.

◆ operator()() [7/10]

template<class T >
T* regina::FuncNewClonePtr< T >::operator() ( const T *  ptr) const
inline

Creates a new object using the clone() method.

Parameters
ptrthe pointer whose corresponding object should be cloned.
Returns
the newly created clone.

◆ operator()() [8/10]

template<typename T , typename Comp = std::less<T>>
bool regina::LessDeref< T, Comp >::operator() ( const T *  ptr1,
const T *  ptr2 
) const
inline

Compares the objects to which the given pointers are pointing.

The two pointers are dereferenced, and then a function of type Comp (the second template argument) is used to compare the dereferenced objects.

Parameters
ptr1a pointer to the first object under examination.
ptr2a pointer to the second object under examination.
Returns
true if the first dereferenced object is less than the second, or false otherwise.

◆ operator()() [9/10]

template<typename T >
template<typename Iterator >
bool regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::operator() ( Iterator  a,
Iterator  b 
) const
inline

Lexicographically compares the subsequences referred to by the given pair of iterators.

See the class notes for details on how each iterator is converted into a subsequence.

This bracket operator is identical to the less() member function.

Parameters
aan iterator indicating the first of the two subsequences to compare.
ban iterator indicating the second of the two subsequences to compare.
Returns
true if and only if the subsequence indicated by a is lexicographically smaller than the subsequence indicated by b.

◆ operator()() [10/10]

template<class T >
void regina::FuncDelete< T >::operator() ( T *  ptr) const
inline

Calls delete upon the given pointer.

Parameters
ptrthe pointer whose data should be deleted.

◆ operator+=() [1/4]

template<typename T >
Qitmask1<T>& regina::Qitmask1< T >::operator+= ( const Qitmask1< T > &  rhs)
inline

Sets this to the sum of this and the given qitmask.

Each pair of qits is added modulo 4 (so, for instance, 2 + 3 = 1).

Parameters
rhsthe qitmask to add to this.
Returns
a reference to this qitmask.

◆ operator+=() [2/4]

template<typename T , typename U = T>
Qitmask2<T, U>& regina::Qitmask2< T, U >::operator+= ( const Qitmask2< T, U > &  rhs)
inline

Sets this to the sum of this and the given qitmask.

Each pair of qits is added modulo 4 (so, for instance, 2 + 3 = 1).

Parameters
rhsthe qitmask to add to this.
Returns
a reference to this qitmask.

◆ operator+=() [3/4]

template<typename T >
Tritmask1<T>& regina::Tritmask1< T >::operator+= ( const Tritmask1< T > &  rhs)
inline

Sets this to the sum of this and the given tritmask.

When adding trits, any digit greater than 2 will simply be replaced with 2. That is:

  • 2+2 = 1+2 = 1+1 = 2;
  • 0+x = x for any x.
Parameters
rhsthe tritmask to add to this.
Returns
a reference to this tritmask.

◆ operator+=() [4/4]

template<typename T , typename U = T>
Tritmask2<T, U>& regina::Tritmask2< T, U >::operator+= ( const Tritmask2< T, U > &  rhs)
inline

Sets this to the sum of this and the given tritmask.

When adding trits, any digit greater than 2 will simply be replaced with 2. That is:

  • 2+2 = 1+2 = 1+1 = 2;
  • 0+x = x for any x.
Parameters
rhsthe tritmask to add to this.
Returns
a reference to this tritmask.

◆ operator-=() [1/7]

Bitmask & regina::Bitmask::operator-= ( const Bitmask other)
inline

Sets this to the set difference of this and the given bitmask.

Every bit that is set in other will be cleared in this bitmask.

Precondition
This and the given bitmask have the same length.
Parameters
otherthe bitmask to XOR with this.
Returns
a reference to this bitmask.

◆ operator-=() [2/7]

template<typename T >
Bitmask1<T>& regina::Bitmask1< T >::operator-= ( const Bitmask1< T > &  other)
inline

Sets this to the set difference of this and the given bitmask.

Every bit that is set in other will be cleared in this bitmask.

Parameters
otherthe bitmask to XOR with this.
Returns
a reference to this bitmask.

◆ operator-=() [3/7]

template<typename T , typename U = T>
Bitmask2<T, U>& regina::Bitmask2< T, U >::operator-= ( const Bitmask2< T, U > &  other)
inline

Sets this to the set difference of this and the given bitmask.

Every bit that is set in other will be cleared in this bitmask.

Parameters
otherthe bitmask to XOR with this.
Returns
a reference to this bitmask.

◆ operator-=() [4/7]

template<typename T >
Qitmask1<T>& regina::Qitmask1< T >::operator-= ( const Qitmask1< T > &  rhs)
inline

Sets this to the difference of this and the given qitmask.

Each pair of qits is subtracted modulo 4 (so, for instance, 1 - 3 = 2).

Parameters
rhsthe qitmask to subtract from this.
Returns
a reference to this qitmask.

◆ operator-=() [5/7]

template<typename T , typename U = T>
Qitmask2<T, U>& regina::Qitmask2< T, U >::operator-= ( const Qitmask2< T, U > &  rhs)
inline

Sets this to the difference of this and the given qitmask.

Each pair of qits is subtracted modulo 4 (so, for instance, 1 - 3 = 2).

Parameters
rhsthe qitmask to subtract from this.
Returns
a reference to this qitmask.

◆ operator-=() [6/7]

template<typename T >
Tritmask1<T>& regina::Tritmask1< T >::operator-= ( const Tritmask1< T > &  rhs)
inline

Sets this to the difference of this and the given tritmask.

When subtracting trits, any "negative digit" will simply be replaced with zero. That is:

  • 2-0 = 2, 2-1 = 1, and 2-2 = 0;
  • 1-0 = 1, and 1-1 = 1-2 = 0;
  • 0-x = 0 for any x.
Parameters
rhsthe tritmask to subtract from this.
Returns
a reference to this tritmask.

◆ operator-=() [7/7]

template<typename T , typename U = T>
Tritmask2<T, U>& regina::Tritmask2< T, U >::operator-= ( const Tritmask2< T, U > &  rhs)
inline

Sets this to the difference of this and the given tritmask.

When subtracting trits, any "negative digit" will simply be replaced with zero. That is:

  • 2-0 = 2, 2-1 = 1, and 2-2 = 0;
  • 1-0 = 1, and 1-1 = 1-2 = 0;
  • 0-x = 0 for any x.
Parameters
rhsthe tritmask to subtract from this.
Returns
a reference to this tritmask.

◆ operator<() [1/2]

bool regina::BoolSet::operator< ( const BoolSet other) const
inline

Determines if this set is a proper subset of the given set.

Parameters
otherthe set to compare with this.
Returns
true if and only if this is a proper subset of the given set.

◆ operator<() [2/2]

template<typename T >
bool regina::LightweightSequence< T >::operator< ( const LightweightSequence< T > &  rhs) const
inline

Tests whether this sequence is lexicographically smaller than the given sequence.

The sequences need not be the same size.

Parameters
rhsthe sequence to compare with this.
Returns
true if this is strictly lexicographically smaller than rhs, or false if this is either lexicographically greater than or equal to rhs.

◆ operator<<() [1/9]

std::ostream & regina::operator<< ( std::ostream &  out,
const Bitmask mask 
)
inline

Writes the given bitmask to the given output stream as a sequence of zeroes and ones.

Since the length of the bitmask is not stored, the number of bits written might be greater than the length initially assigned to this bitmask (specifically, the length will be rounded up to the next "raw unit of storage").

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe bitmask to write.
Returns
a reference to the given output stream.

◆ operator<<() [2/9]

template<typename T >
std::ostream& regina::operator<< ( std::ostream &  out,
const Bitmask1< T > &  mask 
)

Writes the given bitmask to the given output stream as a sequence of zeroes and ones.

Since the length of the bitmask is not stored, the number of bits written will be 8 * sizeof(T).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe bitmask to write.
Returns
a reference to the given output stream.

◆ operator<<() [3/9]

template<typename T , typename U >
std::ostream& regina::operator<< ( std::ostream &  out,
const Bitmask2< T, U > &  mask 
)

Writes the given bitmask to the given output stream as a sequence of zeroes and ones.

Since the length of the bitmask is not stored, the number of bits written will be 8 * sizeof(T) + 8 * sizeof(U).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe bitmask to write.
Returns
a reference to the given output stream.

◆ operator<<() [4/9]

std::ostream& regina::operator<< ( std::ostream &  out,
const BoolSet set 
)

Writes the given boolean set to the given output stream.

The set will be written in the form { true, false }, { true }, { false } or { }.

Parameters
outthe output stream to which to write.
setthe boolean set to write.
Returns
a reference to out.

◆ operator<<() [5/9]

template<typename T >
std::ostream & regina::operator<< ( std::ostream &  out,
const LightweightSequence< T > &  s 
)
inline

Writes the given sequence to the given output stream.

No newline will be written.

The sequence will be written in the form (a, b, c, ...).

Precondition
An object x of type T can be written to an output stream using the syntax out << x.
Parameters
outthe output stream to which to write.
sthe sequence to write.
Returns
a reference to the given output stream.

◆ operator<<() [6/9]

template<typename T >
std::ostream& regina::operator<< ( std::ostream &  out,
const Qitmask1< T > &  mask 
)

Writes the given qitmask to the given output stream as a sequence of digits (0, 1, 2 and/or 3).

Since the length of the qitmask is not stored, the number of qits written will be 8 * sizeof(T).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe qitmask to write.
Returns
a reference to the given output stream.

◆ operator<<() [7/9]

template<typename T , typename U >
std::ostream& regina::operator<< ( std::ostream &  out,
const Qitmask2< T, U > &  mask 
)

Writes the given qitmask to the given output stream as a sequence of digits (0, 1, 2 and/or 3).

Since the length of the qitmask is not stored, the number of qits written will be 8 * sizeof(T) + 8 * sizeof(U).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe qitmask to write.
Returns
a reference to the given output stream.

◆ operator<<() [8/9]

template<typename T >
std::ostream& regina::operator<< ( std::ostream &  out,
const Tritmask1< T > &  mask 
)

Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2).

Since the length of the tritmask is not stored, the number of trits written will be 8 * sizeof(T).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe tritmask to write.
Returns
a reference to the given output stream.

◆ operator<<() [9/9]

template<typename T , typename U >
std::ostream& regina::operator<< ( std::ostream &  out,
const Tritmask2< T, U > &  mask 
)

Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2).

Since the length of the tritmask is not stored, the number of trits written will be 8 * sizeof(T) + 8 * sizeof(U).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe tritmask to write.
Returns
a reference to the given output stream.

◆ operator<=() [1/4]

bool regina::Bitmask::operator<= ( const Bitmask other) const
inline

Determines whether this bitmask is entirely contained within the given bitmask.

For this routine to return true, every bit that is set in this bitmask must also be set in the given bitmask.

Precondition
This and the given bitmask have the same length.
Warning
This operation does not compare bitmasks lexicographically; moreover, it only describes a partial order, not a total order. To compare bitmasks lexicographically, use lessThan() instead.
Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this bitmask is entirely contained within the given bitmask.

◆ operator<=() [2/4]

template<typename T >
bool regina::Bitmask1< T >::operator<= ( const Bitmask1< T > &  other) const
inline

Determines whether this bitmask is entirely contained within the given bitmask.

For this routine to return true, every bit that is set in this bitmask must also be set in the given bitmask.

Warning
This operation does not compare bitmasks lexicographically; moreover, it only describes a partial order, not a total order. To compare bitmasks lexicographically, use lessThan() instead.
Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this bitmask is entirely contained within the given bitmask.

◆ operator<=() [3/4]

template<typename T , typename U = T>
bool regina::Bitmask2< T, U >::operator<= ( const Bitmask2< T, U > &  other) const
inline

Determines whether this bitmask is entirely contained within the given bitmask.

For this routine to return true, every bit that is set in this bitmask must also be set in the given bitmask.

Warning
This operation does not compare bitmasks lexicographically; moreover, it only describes a partial order, not a total order. To compare bitmasks lexicographically, use lessThan() instead.
Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this bitmask is entirely contained within the given bitmask.

◆ operator<=() [4/4]

bool regina::BoolSet::operator<= ( const BoolSet other) const
inline

Determines if this set is a subset of (possibly equal to) the given set.

Parameters
otherthe set to compare with this.
Returns
true if and only if this is a subset of the given set.

◆ operator=() [1/21]

BoolSet & regina::BoolSet::operator= ( bool  member)
inline

Sets this set to the single member set containing the given element.

Parameters
memberthe single element to include in this set.
Returns
a reference to this set.

◆ operator=() [2/21]

Bitmask & regina::Bitmask::operator= ( const Bitmask other)
inline

Sets this bitmask to a copy of the given bitmask.

If this bitmask is invalid, this assignment operator can be used to initialise it with a length.

If this bitmask has already been initialised to a different length from that of the given bitmask, the length of this bitmask will be changed accordingly.

If the given bitmask is invalid, this bitmask will become invalid also. Invalid bitmasks must be assigned a length using reset(size_t) or this assignment operator.

Parameters
otherthe bitmask to clone.
Returns
a reference to this bitmask.

◆ operator=() [3/21]

template<typename T >
Bitmask1<T>& regina::Bitmask1< T >::operator= ( const Bitmask1< T > &  other)
default

Sets this bitmask to a copy of the given bitmask.

Parameters
otherthe bitmask to clone.
Returns
a reference to this bitmask.

◆ operator=() [4/21]

template<typename T , typename U = T>
Bitmask2<T, U>& regina::Bitmask2< T, U >::operator= ( const Bitmask2< T, U > &  other)
default

Sets this bitmask to a copy of the given bitmask.

Parameters
otherthe bitmask to clone.
Returns
a reference to this bitmask.

◆ operator=() [5/21]

BoolSet& regina::BoolSet::operator= ( const BoolSet cloneMe)
default

Sets this set to be identical to the given set.

Parameters
cloneMethe set whose value this set will take.
Returns
a reference to this set.

◆ operator=() [6/21]

template<typename T >
Flags<T>& regina::Flags< T >::operator= ( const Flags< T > &  rhs)
inlinedefault

Sets this flag set to contain a copy of the given flag set.

Parameters
rhsthe new value of this flag set.
Returns
a reference to this flag set.

◆ operator=() [7/21]

template<typename T >
LightweightSequence< T > & regina::LightweightSequence< T >::operator= ( const LightweightSequence< T > &  src)
inline

Converts this into a copy of the given sequence.

Any existing elements of this sequence will be deleted.

This induces a deep copy of src, in that all of the elements of src will be copied into the new sequence.

Parameters
srcthe sequence to copy.
Returns
a reference to this sequence.

◆ operator=() [8/21]

template<typename T , template< typename Stored > class Storage = StoreValue>
Property& regina::Property< T, Storage >::operator= ( const Property< T, Storage > &  newValue)
inline

Copies the given property into this property.

If the given property is marked as known, its value will be copied and this property will also be marked as known. Otherwise this property will be marked as unknown.

For storage policies that do not allow copying (such as StoreManagedPtr), any attempt to use this assignment operator will generate a compile error.

Parameters
newValuethe property to copy into this property.
Returns
a reference to this property.

◆ operator=() [9/21]

template<typename T >
Qitmask1<T>& regina::Qitmask1< T >::operator= ( const Qitmask1< T > &  other)
default

Sets this qitmask to a copy of the given qitmask.

Parameters
otherthe qitmask to clone.
Returns
a reference to this qitmask.

◆ operator=() [10/21]

template<typename T , typename U = T>
Qitmask2<T, U>& regina::Qitmask2< T, U >::operator= ( const Qitmask2< T, U > &  other)
default

Sets this qitmask to a copy of the given qitmask.

Parameters
otherthe qitmask to clone.
Returns
a reference to this qitmask.

◆ operator=() [11/21]

template<class T >
SafePointeeBase& regina::SafePointeeBase< T >::operator= ( const SafePointeeBase< T > &  )
delete

Prevent derived classes from accidentally calling the assignment operator.

◆ operator=() [12/21]

template<class T >
SafePtr<T>& regina::SafePtr< T >::operator= ( const SafePtr< T > &  )
delete

Disable the default assignment operator.

◆ operator=() [13/21]

template<typename T >
StoreConstPtr& regina::StoreConstPtr< T >::operator= ( const StoreConstPtr< T > &  )
default

Sets this to be a clone of the given property value.

This clones the given property's pointer, regardless of whether the property is known or unknown.

◆ operator=() [14/21]

template<typename T >
StoreValue& regina::StoreValue< T >::operator= ( const StoreValue< T > &  )
default

Sets this to be a clone of the given property value.

This clones the given property's value, regardless of whether the property is uninitialised and/or unknown.

◆ operator=() [15/21]

template<typename T >
template<typename Iterator >
SubsequenceCompareFirstPtr<Iterator>& regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::operator= ( const SubsequenceCompareFirstPtr< Iterator > &  )
default

Copies the given function object into this object.

Returns
a reference to this function object.

◆ operator=() [16/21]

template<typename T >
Tritmask1<T>& regina::Tritmask1< T >::operator= ( const Tritmask1< T > &  other)
default

Sets this tritmask to a copy of the given tritmask.

Parameters
otherthe tritmask to clone.
Returns
a reference to this tritmask.

◆ operator=() [17/21]

template<typename T , typename U = T>
Tritmask2<T, U>& regina::Tritmask2< T, U >::operator= ( const Tritmask2< T, U > &  other)
default

Sets this tritmask to a copy of the given tritmask.

Parameters
otherthe tritmask to clone.
Returns
a reference to this tritmask.

◆ operator=() [18/21]

template<typename T , template< typename Stored > class Storage = StoreValue>
QueryType regina::Property< T, Storage >::operator= ( InitType  newValue)
inline

Assigns a new value to this property.

The property will be marked as known.

Parameters
newValuethe new value to assign to this property.
Returns
the new value of this property.

◆ operator=() [19/21]

template<typename T >
LightweightSequence< T > & regina::LightweightSequence< T >::operator= ( LightweightSequence< T > &&  src)
inlinenoexcept

Moves the contents of the given sequence to this sequence.

This is a fast (constant time) operation.

The sequence that was passed (src) will no longer be usable.

Parameters
srcthe sequence to move.
Returns
a reference to this sequence.

◆ operator=() [20/21]

template<typename T >
MarkedVector& regina::MarkedVector< T >::operator= ( MarkedVector< T > &&  )
defaultnoexcept

Moves the contents of the given vector into this vector.

The vector that was passed will no longer be usable.

Returns
a reference to this vector.

◆ operator=() [21/21]

template<typename T >
Flags<T>& regina::Flags< T >::operator= ( rhs)
inline

Sets this flag set to contain precisely the given flag only.

Parameters
rhsthe new value of this flag set.
Returns
a reference to this flag set.

◆ operator==() [1/11]

bool regina::Bitmask::operator== ( const Bitmask other) const
inline

Determines whether this and the given bitmask are identical.

Precondition
This and the given bitmask have the same length.
Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this and the given bitmask are identical.

◆ operator==() [2/11]

template<typename T >
bool regina::Bitmask1< T >::operator== ( const Bitmask1< T > &  other) const
inline

Determines whether this and the given bitmask are identical.

Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this and the given bitmask are identical.

◆ operator==() [3/11]

template<typename T , typename U = T>
bool regina::Bitmask2< T, U >::operator== ( const Bitmask2< T, U > &  other) const
inline

Determines whether this and the given bitmask are identical.

Parameters
otherthe bitmask to compare against this.
Returns
true if and only if this and the given bitmask are identical.

◆ operator==() [4/11]

bool regina::BoolSet::operator== ( const BoolSet other) const
inline

Determines if this set is equal to the given set.

Parameters
otherthe set to compare with this.
Returns
true if and only if this and the given set are equal.

◆ operator==() [5/11]

template<typename T >
bool regina::Flags< T >::operator== ( const Flags< T > &  rhs) const
inline

Determines whether this set is precisely equal to the given flag set.

Parameters
rhsthe flag set to test this against.
Returns
true if and only if this and the given flag set are identical.

◆ operator==() [6/11]

template<typename T >
bool regina::LightweightSequence< T >::operator== ( const LightweightSequence< T > &  rhs) const
inline

Tests whether this and the given sequence are identical.

The sequences need not be the same size, though if the sizes are different then this routine will return false immediately.

Parameters
rhsthe sequence to compare with this.
Returns
true if and only if this and the given sequence are identical.

◆ operator==() [7/11]

template<typename T >
bool regina::Qitmask1< T >::operator== ( const Qitmask1< T > &  other) const
inline

Determines whether this and the given qitmask are identical.

Parameters
otherthe qitmask to compare against this.
Returns
true if and only if this and the given qitmask are identical.

◆ operator==() [8/11]

template<typename T , typename U = T>
bool regina::Qitmask2< T, U >::operator== ( const Qitmask2< T, U > &  other) const
inline

Determines whether this and the given qitmask are identical.

Parameters
otherthe qitmask to compare against this.
Returns
true if and only if this and the given qitmask are identical.

◆ operator==() [9/11]

template<typename T >
bool regina::Tritmask1< T >::operator== ( const Tritmask1< T > &  other) const
inline

Determines whether this and the given tritmask are identical.

Parameters
otherthe tritmask to compare against this.
Returns
true if and only if this and the given tritmask are identical.

◆ operator==() [10/11]

template<typename T , typename U = T>
bool regina::Tritmask2< T, U >::operator== ( const Tritmask2< T, U > &  other) const
inline

Determines whether this and the given tritmask are identical.

Parameters
otherthe tritmask to compare against this.
Returns
true if and only if this and the given tritmask are identical.

◆ operator==() [11/11]

template<typename T >
bool regina::Flags< T >::operator== ( rhs) const
inline

Determines whether this set is precisely equal to the given flag.

Parameters
rhsthe flag to test this against.
Returns
true if and only if this and the given flag are identical.

◆ operator>()

bool regina::BoolSet::operator> ( const BoolSet other) const
inline

Determines if this set is a proper superset of the given set.

Parameters
otherthe set to compare with this.
Returns
true if and only if this is a proper superset of the given set.

◆ operator>=()

bool regina::BoolSet::operator>= ( const BoolSet other) const
inline

Determines if this set is a superset of (possibly equal to) the given set.

Parameters
otherthe set to compare with this.
Returns
true if and only if this is a superset of the given set.

◆ operator[]() [1/2]

template<typename T >
T & regina::LightweightSequence< T >::operator[] ( size_t  pos)
inline

Returns a reference to the element at the given index in the sequence.

Parameters
posthe index of the requested element; this must be between 0 and size()-1 inclusive.
Returns
a reference to the requested element.

◆ operator[]() [2/2]

template<typename T >
T regina::LightweightSequence< T >::operator[] ( size_t  pos) const
inline

Returns a copy of the element at the given index in the sequence.

Parameters
posthe index of the requested element; this must be between 0 and size()-1 inclusive.
Returns
a copy of the requested element.

◆ operator^() [1/3]

BoolSet regina::BoolSet::operator^ ( const BoolSet other) const
inline

Returns the symmetric difference of this set and the given set.

The result is a set containing precisely the elements that belong to one but not both of the original sets. This set is not changed.

Parameters
otherthe set whose symmetric difference with this set is to be found.
Returns
the symmetric difference of this and the given set.

◆ operator^() [2/3]

template<typename T >
Flags<T> regina::Flags< T >::operator^ ( const Flags< T > &  rhs) const
inline

Returns the bitwise XOR of this and the given flag set.

This flag set is not changed.

Parameters
rhsthe flag set to combine with this set.
Returns
the combination of this and the given flag set.

◆ operator^() [3/3]

template<typename T >
Flags<T> regina::Flags< T >::operator^ ( rhs) const
inline

Returns the bitwise XOR of this set and the given flag.

This flag set is not changed.

Parameters
rhsthe flag to combine with this set.
Returns
the combination of this set and the given flag.

◆ operator^=() [1/6]

Bitmask & regina::Bitmask::operator^= ( const Bitmask other)
inline

Sets this to the exclusive disjunction (XOR) of this and the given bitmask.

Every bit that is set in other will be flipped in this bitmask.

Precondition
This and the given bitmask have the same length.
Parameters
otherthe bitmask to XOR with this.
Returns
a reference to this bitmask.

◆ operator^=() [2/6]

template<typename T >
Bitmask1<T>& regina::Bitmask1< T >::operator^= ( const Bitmask1< T > &  other)
inline

Sets this to the exclusive disjunction (XOR) of this and the given bitmask.

Every bit that is set in other will be flipped in this bitmask.

Parameters
otherthe bitmask to XOR with this.
Returns
a reference to this bitmask.

◆ operator^=() [3/6]

template<typename T , typename U = T>
Bitmask2<T, U>& regina::Bitmask2< T, U >::operator^= ( const Bitmask2< T, U > &  other)
inline

Sets this to the exclusive disjunction (XOR) of this and the given bitmask.

Every bit that is set in other will be flipped in this bitmask.

Parameters
otherthe bitmask to XOR with this.
Returns
a reference to this bitmask.

◆ operator^=() [4/6]

BoolSet & regina::BoolSet::operator^= ( const BoolSet other)
inline

Sets this set to be the symmetric difference of this and the given set.

The result is a set containing precisely the elements that belong to one but not both of the original sets. Note that this set will be modified.

Parameters
otherthe set whose symmetric difference with this set is to be found.
Returns
a reference to this set.

◆ operator^=() [5/6]

template<typename T >
Flags<T>& regina::Flags< T >::operator^= ( const Flags< T > &  rhs)
inline

Changes this flag set by taking a bitwise XOR with the given flag set.

Parameters
rhsthe flag set to combine with this set.
Returns
a reference to this flag set.

◆ operator^=() [6/6]

template<typename T >
Flags<T>& regina::Flags< T >::operator^= ( rhs)
inline

Changes this flag set by taking a bitwise XOR with the given flag.

Parameters
rhsthe flag to combine with this set.
Returns
a reference to this flag set.

◆ operator|() [1/3]

BoolSet regina::BoolSet::operator| ( const BoolSet other) const
inline

Returns the union of this set with the given set.

The result is a set containing precisely the elements that belong to either of the original sets. This set is not changed.

Parameters
otherthe set to union with this set.
Returns
the union of this and the given set.

◆ operator|() [2/3]

template<typename T >
Flags<T> regina::Flags< T >::operator| ( const Flags< T > &  rhs) const
inline

Returns the bitwise OR of this and the given flag set.

This flag set is not changed.

Parameters
rhsthe flag set to combine with this set.
Returns
the combination of this and the given flag set.

◆ operator|() [3/3]

template<typename T >
Flags<T> regina::Flags< T >::operator| ( rhs) const
inline

Returns the bitwise OR of this set and the given flag.

This flag set is not changed.

Parameters
rhsthe flag to combine with this set.
Returns
the combination of this set and the given flag.

◆ operator|=() [1/6]

Bitmask & regina::Bitmask::operator|= ( const Bitmask other)
inline

Sets this to the union of this and the given bitmask.

Every bit that is set in other will be set in this bitmask.

Precondition
This and the given bitmask have the same length.
Parameters
otherthe bitmask to union with this.
Returns
a reference to this bitmask.

◆ operator|=() [2/6]

template<typename T >
Bitmask1<T>& regina::Bitmask1< T >::operator|= ( const Bitmask1< T > &  other)
inline

Sets this to the union of this and the given bitmask.

Every bit that is set in other will be set in this bitmask.

Parameters
otherthe bitmask to union with this.
Returns
a reference to this bitmask.

◆ operator|=() [3/6]

template<typename T , typename U = T>
Bitmask2<T, U>& regina::Bitmask2< T, U >::operator|= ( const Bitmask2< T, U > &  other)
inline

Sets this to the union of this and the given bitmask.

Every bit that is set in other will be set in this bitmask.

Parameters
otherthe bitmask to union with this.
Returns
a reference to this bitmask.

◆ operator|=() [4/6]

BoolSet & regina::BoolSet::operator|= ( const BoolSet other)
inline

Sets this set to be the union of this and the given set.

The result is a set containing precisely the elements that belong to either of the original sets. Note that this set will be modified.

Parameters
otherthe set to union with this set.
Returns
a reference to this set.

◆ operator|=() [5/6]

template<typename T >
Flags<T>& regina::Flags< T >::operator|= ( const Flags< T > &  rhs)
inline

Changes this flag set by taking a bitwise OR with the given flag set.

Parameters
rhsthe flag set to combine with this set.
Returns
a reference to this flag set.

◆ operator|=() [6/6]

template<typename T >
Flags<T>& regina::Flags< T >::operator|= ( rhs)
inline

Changes this flag set by taking a bitwise OR with the given flag.

Parameters
rhsthe flag to combine with this set.
Returns
a reference to this flag set.

◆ operator~()

BoolSet regina::BoolSet::operator~ ( ) const
inline

Returns the complement of this set.

The result is a set containing precisely the elements that this set does not contain. This set is not changed.

Returns
the complement of this set.

◆ overflow()

int_type regina::i18n::IConvStreamBuffer::overflow ( int_type  c)

Sends buffered data to the destination output stream, converting between character sets en route.

The buffer will be flushed as far as possible, and any invalid characters will be replaced with one or more question marks. If the buffer ends in an incomplete multibyte character, this incomplete character will be held back (since it presumably needs to be combined with later input).

Parameters
can extra character to send that did not fit in the internal buffer, or EOF if we simply wish to flush the buffer.
Returns
0 on success, or EOF on error.

◆ parse_chunk()

void regina::xml::XMLParser::parse_chunk ( const std::string &  s)
inline

Parses the given chunk of XML.

Parameters
sthe chunk of XML to parse.

◆ parse_stream()

static void regina::xml::XMLParser::parse_stream ( XMLParserCallback callback,
std::istream &  file,
unsigned  chunkSize = 1024 
)
static

Parses an entire XML file.

The given stream will be read from until end-of-file is reached.

Parameters
callbackthe object providing the routines to call when particular XML components are encountered during parsing.
filethe stream from which the raw XML will be read.
chunkSizethe number of characters to read and process at a time (this is the size of each string that will be passed to parse_chunk()).

◆ Property() [1/2]

template<typename T , template< typename Stored > class Storage = StoreValue>
regina::Property< T, Storage >::Property ( )
inline

Constructor.

This property is initially marked as unknown.

◆ Property() [2/2]

template<typename T , template< typename Stored > class Storage = StoreValue>
regina::Property< T, Storage >::Property ( const Property< T, Storage > &  newValue)
inline

Makes a new clone of the given property.

If the given property is marked as known, its value will be copied and this property will also be marked as known. Otherwise this property will be marked as unknown.

This copy constructor is slightly inefficient, in that it first default-constructs its own held value, and then if newValue is known it will copy that value across.

For storage policies that do not allow copying (such as StoreManagedPtr), any attempt to use this copy constructor will generate a compile error.

Parameters
newValuethe property to clone.

◆ push_back()

template<typename T >
void regina::MarkedVector< T >::push_back ( T *  item)
inline

Pushes the given item onto the end of this vector.

The array index stored inside item will be modified accordingly.

The caller retains reponsibility for the ownership of item. This class will make no attempt to deallocate item when it is removed or when this vector is eventually destroyed.

Precondition
The given item does not already belong to some other MarkedVector.
Parameters
itemthe item to add to this vector.

◆ Qitmask1() [1/2]

template<typename T >
regina::Qitmask1< T >::Qitmask1 ( )
inline

Creates a new qitmask with all qits set to 0.

◆ Qitmask1() [2/2]

template<typename T >
regina::Qitmask1< T >::Qitmask1 ( const Qitmask1< T > &  cloneMe)
inlinedefault

Creates a clone of the given qitmask.

Parameters
cloneMethe qitmask to clone.

◆ Qitmask2() [1/2]

template<typename T , typename U = T>
regina::Qitmask2< T, U >::Qitmask2 ( )
inline

Creates a new qitmask with all qits set to 0.

◆ Qitmask2() [2/2]

template<typename T , typename U = T>
regina::Qitmask2< T, U >::Qitmask2 ( const Qitmask2< T, U > &  cloneMe)
inlinedefault

Creates a clone of the given qitmask.

Parameters
cloneMethe qitmask to clone.

◆ rand()

template<typename Int >
Int regina::RandomEngine::rand ( Int  range)
static

A convenience function that returns a random integer modulo range, in a thread-safe manner.

The result will be between 0 and (range - 1) inclusive, and all such integers should be returned with equal probability.

This is expensive because it locks and unlocks the internal mutex. If you need to create many random numbers in quick succession, consider creating a single RandomEngine object and accessing engine() directly using the standard C++ randomness functions.

Python
The integer type Int will be treated as long.
Template Parameters
Inta native integer type (e.g., int, long, size_t, long long, etc.); this may be either signed or unsigned.
Parameters
rangethe size of the range of possible results; this must be strictly positive.
Returns
a random integer between 0 and (range - 1) inclusive.

◆ RandomEngine()

regina::RandomEngine::RandomEngine ( )
inline

Constructor that locks the internal mutex.

The mutex will be unlocked when this object is destroyed.

Python
Not present.

◆ refill()

template<typename T >
template<typename Iterator >
void regina::MarkedVector< T >::refill ( Iterator  begin,
Iterator  end 
)
inline

Empties this vector and refills it with the given range of items.

Calling this routine is equivalent to calling clear() followed by push_back() for each item in the range from begin to end. Its implementation, however, is a little more efficient.

The algorithm only makes a single pass through the given range of iterators.

Template Parameters
Iteratoran input iterator type, whose dereference operator returns a pointer of type T*.
Parameters
beginan iterator that points to the beginning of the range of items with which to refill this vector.
endan iterator that points past the end of the range of items with which to refill this vector.

◆ removeFalse()

void regina::BoolSet::removeFalse ( )
inline

Removes false from this set if it is present.

◆ removeTrue()

void regina::BoolSet::removeTrue ( )
inline

Removes true from this set if it is present.

◆ reseedWithDefault()

static void regina::RandomEngine::reseedWithDefault ( )
static

Reseeds the global uniform random bit generator using the default seed.

This should make the sequence of random bits completely predictable between runs of the same program on the same machine. (Note that even when using the same seed, different operating systems, architectures and/or compilers may produce different random bits).

Regina seeds the global uniform random bit generator in this way on startup, and so typically you would not need to call this routine yourself.

This routine is thread-safe, and it locks the internal mutex while it runs.

◆ reseedWithHardware()

static void regina::RandomEngine::reseedWithHardware ( )
static

Reseeds the global uniform random bit generator using hardware entropy.

This should make the sequence of random bits unpredictable (and, in particular, different between runs of your program).

Regina does not do this by default.

This routine is thread-safe, and it locks the internal mutex while it runs.

◆ reset() [1/11]

void regina::Bitmask::reset ( )
inline

Sets all bits of this bitmask to false.

Warning
The length of this bitmask must already have been initialised. In particular, if the default constructor was used, you must call the one-argument reset(size_t) before you can use this routine.

◆ reset() [2/11]

template<typename T >
void regina::Bitmask1< T >::reset ( )
inline

Sets all bits of this bitmask to false.

◆ reset() [3/11]

template<typename T , typename U = T>
void regina::Bitmask2< T, U >::reset ( )
inline

Sets all bits of this bitmask to false.

◆ reset() [4/11]

template<typename T >
void regina::Qitmask1< T >::reset ( )
inline

Sets all qits of this qitmask to 0.

◆ reset() [5/11]

template<typename T , typename U = T>
void regina::Qitmask2< T, U >::reset ( )
inline

Sets all qits of this qitmask to 0.

◆ reset() [6/11]

template<typename T >
void regina::Tritmask1< T >::reset ( )
inline

Sets all trits of this tritmask to 0.

◆ reset() [7/11]

template<typename T , typename U = T>
void regina::Tritmask2< T, U >::reset ( )
inline

Sets all trits of this tritmask to 0.

◆ reset() [8/11]

void regina::Bitmask::reset ( size_t  length)
inline

Resizes this bitmask to the given length and sets all bits to false.

This routine can be used to change the length (number of bits) of the bitmask if desired.

Parameters
lengththe number of bits to store in this bitmask; this must be at least one.

◆ reset() [9/11]

template<typename T >
void regina::Bitmask1< T >::reset ( size_t  )
inline

Sets all bits of this bitmask to false.

The integer argument is merely for compatibility with Bitmask::reset(size_t), and will be ignored.

◆ reset() [10/11]

template<typename T , typename U = T>
void regina::Bitmask2< T, U >::reset ( size_t  )
inline

Sets all bits of this bitmask to false.

The integer argument is merely for compatibility with Bitmask::reset(size_t), and will be ignored.

◆ reset() [11/11]

template<class T >
void regina::SafePtr< T >::reset ( T *  object = nullptr)
inline

Resets this to point to the given object.

This behaves in a similar manner to destroying the old safe pointer and constructing a new one: in particular, the old pointee may be destroyed if it meets the conditions outlined in the class notes above.

Parameters
objectthe new pointee. This may be null.

◆ SafePointeeBase() [1/2]

template<class T >
regina::SafePointeeBase< T >::SafePointeeBase
inlineprotected

Default constructor.

◆ SafePointeeBase() [2/2]

template<class T >
regina::SafePointeeBase< T >::SafePointeeBase ( const SafePointeeBase< T > &  )
delete

Prevent derived classes from accidentally calling the copy constructor.

A derived class' copy constructor by default calls the protected default constructor, which it should because it sets the refCount_ to zero on the copied object.

◆ SafePtr() [1/3]

template<class T >
regina::SafePtr< T >::SafePtr
inline

Constructs a new null pointer.

◆ SafePtr() [2/3]

template<class T >
template<class Y >
regina::SafePtr< T >::SafePtr ( const SafePtr< Y > &  other)
inline

Copy constructor.

This constructor can also be used to cast a SafePtr for a derived class Y to a SafePtr for a base class T.

Precondition
the class T (whose constructor is called) is a base class of Y.
Parameters
otherthe pointer to copy.

◆ SafePtr() [3/3]

template<class T >
regina::SafePtr< T >::SafePtr ( T *  object)
inline

Constructs a new safe pointer that points to the given object.

Parameters
objectthe pointee. This may be null.

◆ set() [1/10]

template<typename ForwardIterator >
void regina::Bitmask::set ( ForwardIterator  indexBegin,
ForwardIterator  indexEnd,
bool  value 
)
inline

Sets all bits in the given sorted list to the given value.

This is a convenience routine for setting many bits at once. The indices of the bits to set should be sorted and stored in some container, such as a std::set or a C-style array. This routine takes iterators over this container, and sets the bits at the corresponding indices to the given value.

For example, the following code would set bits 3, 5 and 6 to true:

std::vector<unsigned> indices;
indices.push(3); indices.push(5); indices.push(6);
bitmask.set(indices.begin(), indices.end(), true);

Likewise, the following code would set bits 1, 4 and 7 to false:

unsigned indices[3] = { 1, 4, 7 };
bitmask.set(indices, indices + 3, false);

All other bits of this bitmask are unaffected by this routine.

Precondition
ForwardIterator is a forward iterator type that iterates over integer values.
The list of indices described by these iterators is in sorted order. This is to allow optimisations for larger bitmask types.
All indices in the given list are at least zero and strictly less than the length of this bitmask.
Parameters
indexBeginthe beginning of the iterator range containing the sorted indices of the bits to set.
indexEndthe end of the iterator range containing the sorted indices of the bits to set.
valuethe value that will be assigned to each of the corresponding bits.

◆ set() [2/10]

template<typename T >
template<typename ForwardIterator >
void regina::Bitmask1< T >::set ( ForwardIterator  indexBegin,
ForwardIterator  indexEnd,
bool  value 
)
inline

Sets all bits in the given sorted list to the given value.

This is a convenience routine for setting many bits at once. The indices of the bits to set should be sorted and stored in some container, such as a std::set or a C-style array. This routine takes iterators over this container, and sets the bits at the corresponding indices to the given value.

For example, the following code would set bits 3, 5 and 6 to true:

std::vector<unsigned> indices;
indices.push(3); indices.push(5); indices.push(6);
bitmask.set(indices.begin(), indices.end(), true);

Likewise, the following code would set bits 1, 4 and 7 to false:

unsigned indices[3] = { 1, 4, 7 };
bitmask.set(indices, indices + 3, false);

All other bits of this bitmask are unaffected by this routine.

Precondition
ForwardIterator is a forward iterator type that iterates over integer values.
The list of indices described by these iterators is in sorted order. This is to allow optimisations for larger bitmask types.
All indices in the given list are between 0 and (8 * sizeof(T) - 1) inclusive.
Parameters
indexBeginthe beginning of the iterator range containing the sorted indices of the bits to set.
indexEndthe end of the iterator range containing the sorted indices of the bits to set.
valuethe value that will be assigned to each of the corresponding bits.

◆ set() [3/10]

template<typename T , typename U = T>
template<typename ForwardIterator >
void regina::Bitmask2< T, U >::set ( ForwardIterator  indexBegin,
ForwardIterator  indexEnd,
bool  value 
)
inline

Sets all bits in the given sorted list to the given value.

This is a convenience routine for setting many bits at once. The indices of the bits to set should be sorted and stored in some container, such as a std::set or a C-style array. This routine takes iterators over this container, and sets the bits at the corresponding indices to the given value.

For example, the following code would set bits 3, 5 and 6 to true:

std::vector<unsigned> indices;
indices.push(3); indices.push(5); indices.push(6);
bitmask.set(indices.begin(), indices.end(), true);

Likewise, the following code would set bits 1, 4 and 7 to false:

unsigned indices[3] = { 1, 4, 7 };
bitmask.set(indices, indices + 3, false);

All other bits of this bitmask are unaffected by this routine.

Precondition
ForwardIterator is a forward iterator type that iterates over integer values.
The list of indices described by these iterators is in sorted order. This is to allow optimisations for larger bitmask types.
All indices in the given list are between 0 and (8 * sizeof(T) + 8 * sizeof(U) - 1) inclusive.
Parameters
indexBeginthe beginning of the iterator range containing the sorted indices of the bits to set.
indexEndthe end of the iterator range containing the sorted indices of the bits to set.
valuethe value that will be assigned to each of the corresponding bits.

◆ set() [4/10]

void regina::Bitmask::set ( size_t  index,
bool  value 
)
inline

Sets the given bit of this bitmask to the given value.

Parameters
indexindicates which bit to set; this must be at least zero and strictly less than the length of this bitmask.
valuethe value that will be assigned to the (index)th bit.

◆ set() [5/10]

template<typename T >
void regina::Bitmask1< T >::set ( size_t  index,
bool  value 
)
inline

Sets the given bit of this bitmask to the given value.

Parameters
indexindicates which bit to set; this must be between 0 and (8 * sizeof(T) - 1) inclusive.
valuethe value that will be assigned to the (index)th bit.

◆ set() [6/10]

template<typename T , typename U = T>
void regina::Bitmask2< T, U >::set ( size_t  index,
bool  value 
)
inline

Sets the given bit of this bitmask to the given value.

Parameters
indexindicates which bit to set; this must be between 0 and (8 * sizeof(T) + 8 * sizeof(U) - 1) inclusive.
valuethe value that will be assigned to the (index)th bit.

◆ set() [7/10]

template<typename T >
void regina::Qitmask1< T >::set ( unsigned  index,
char  value 
)
inline

Sets the given qit of this qitmask to the given value.

Parameters
indexindicates which qit to set; this must be between 0 and (8 * sizeof(T) - 1) inclusive.
valuethe value that will be assigned to the (index)th qit; this must be 0, 1, 2 or 3.

◆ set() [8/10]

template<typename T , typename U = T>
void regina::Qitmask2< T, U >::set ( unsigned  index,
char  value 
)
inline

Sets the given qit of this qitmask to the given value.

Parameters
indexindicates which qit to set; this must be between 0 and (8 * sizeof(T) + 8 * sizeof(U) - 1) inclusive.
valuethe value that will be assigned to the (index)th qit; this must be 0, 1, 2 or 3.

◆ set() [9/10]

template<typename T >
void regina::Tritmask1< T >::set ( unsigned  index,
char  value 
)
inline

Sets the given trit of this tritmask to the given value.

Parameters
indexindicates which trit to set; this must be between 0 and (8 * sizeof(T) - 1) inclusive.
valuethe value that will be assigned to the (index)th trit; this must be 0, 1 or 2.

◆ set() [10/10]

template<typename T , typename U = T>
void regina::Tritmask2< T, U >::set ( unsigned  index,
char  value 
)
inline

Sets the given trit of this tritmask to the given value.

Parameters
indexindicates which trit to set; this must be between 0 and (8 * sizeof(T) + 8 * sizeof(U) - 1) inclusive.
valuethe value that will be assigned to the (index)th trit; this must be 0, 1 or 2.

◆ setByteCode()

void regina::BoolSet::setByteCode ( unsigned char  code)
inline

Sets this boolean set to that represented by the given byte code.

See byteCode() for more information on byte codes.

Precondition
code is 0, 1, 2 or 3.
Parameters
codethe byte code that will determine the new value of this set.

◆ size()

template<typename T >
size_t regina::LightweightSequence< T >::size
inline

Returns the number of elements in this sequence.

This can be changed (in a destructive way) by calling init().

◆ start_document()

void regina::xml::XMLParserCallback::start_document ( XMLParser parser)
inlinevirtual

Called at the start of the document.

Parameters
parserthe XML parser that is currently parsing this document.

Reimplemented in regina::XMLCallback.

◆ start_element()

void regina::xml::XMLParserCallback::start_element ( const std::string &  n,
const regina::xml::XMLPropertyDict p 
)
inlinevirtual

Called when an element's opening tag is encountered.

Parameters
nthe name of the tag.
pa dictionary of all the properties of the tag.

Reimplemented in regina::XMLCallback.

◆ startsWith()

bool regina::startsWith ( const std::string &  str,
const std::string &  prefix 
)

Determines whether the given C++ string begins with the given prefix.

Python
Not present.
Parameters
strthe full C++ string to examine.
prefixthe prefix whose presence we are testing for.
Returns
true if and only if str begins with prefix.

◆ StoreConstPtr() [1/2]

template<typename T >
regina::StoreConstPtr< T >::StoreConstPtr ( )
inline

Constructor that sets the held pointer to null.

◆ StoreConstPtr() [2/2]

template<typename T >
regina::StoreConstPtr< T >::StoreConstPtr ( const StoreConstPtr< T > &  )
default

Create a clone of the given property value.

This clones the given property's pointer, regardless of whether the property is known or unknown.

◆ StoreManagedPtr()

template<typename T >
regina::StoreManagedPtr< T >::StoreManagedPtr ( )
inline

Constructor that sets the held pointer to null.

◆ StoreValue() [1/2]

template<typename T >
regina::StoreValue< T >::StoreValue ( )
default

Creates an uninitialised property value.

◆ StoreValue() [2/2]

template<typename T >
regina::StoreValue< T >::StoreValue ( const StoreValue< T > &  )
default

Create a clone of the given property value.

This clones the given property's value, regardless of whether the property is uninitialised and/or unknown.

◆ stringToToken() [1/2]

std::string regina::stringToToken ( const char *  str)

Returns a token derived from the given string.

All whitespace characters in the given string will be replaced with an underscore.

Parameters
strthe string on which to base the token.
Returns
the corresponding token.

◆ stringToToken() [2/2]

std::string regina::stringToToken ( const std::string &  str)

Returns a token derived from the given string.

All whitespace characters in the given string will be replaced with an underscore.

Parameters
strthe string on which to base the token.
Returns
the corresponding token.

◆ stripWhitespace()

std::string regina::stripWhitespace ( const std::string &  str)

Strips all whitespace from the beginning and end of the given C++ string.

The new stripped string is returned; the original string is not altered.

Warning
This routine treats all strings as plain ASCII. In particular, characters are examined one at a time, and the C routine isspace() is used to identify whitespace. Use it on strings with international characters at your own peril.
Python
Not present.
Parameters
strthe string to be stripped.
Returns
the resulting stripped string.

◆ subscript()

template<typename T >
std::string regina::subscript ( value)

Converts the given C++ integer into a unicode subscript string.

The resulting string will be encoded using UTF-8.

Precondition
The template argument T is either (i) a native C++ integer type, for which the standard C++11 library routine std::to_string(T) is defined; or (ii) a const reference to Integer or LargeInteger.
Python
This template function is instantiated in Python for types T = long, as well as const references to Integer and LargeInteger.

◆ SubsequenceCompareFirstPtr() [1/2]

template<typename T >
template<typename Iterator >
regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::SubsequenceCompareFirstPtr ( const SubsequenceCompareFirstPtr< Iterator > &  )
default

Copies the given function object into this new object.

◆ SubsequenceCompareFirstPtr() [2/2]

template<typename T >
template<typename Iterator >
regina::LightweightSequence< T >::SubsequenceCompareFirstPtr< Iterator >::SubsequenceCompareFirstPtr ( size_t  nSub,
const size_t *  sub 
)
inline

Creates a new function object.

As explained in the class notes, this object compares just some, not necessarily all, elements of two sequences. The indices of the elements to compare should be passed to this constructor.

Warning
This class merely copies the pointer sub, and does not take a deep copy. The caller of this routine must ensure that the array sub has a lifespan at least as long as this function object and any function objects that are copied from it.
Parameters
nSubthe number of elements to compare from each sequence.
subthe indices of the elements to compare from each sequence; that is, the indices i0, i1, ..., as described in the class notes.

◆ superscript()

template<typename T >
std::string regina::superscript ( value)

Converts the given C++ integer into a unicode superscript string.

The resulting string will be encoded using UTF-8.

Precondition
The template argument T is either (i) a native C++ integer type, for which the standard C++11 library routine std::to_string(T) is defined; or (ii) a const reference to Integer or LargeInteger.
Python
This template function is instantiated in Python for types T = long, as well as const references to Integer and LargeInteger.

◆ swap() [1/5]

template<typename T >
void regina::MarkedVector< T >::swap ( MarkedVector< T > &  other)
inline

Swaps the contents of this and the given vector.

Parameters
otherthe vector whose contents are to be swapped with this.

◆ swap() [2/5]

template<typename T , template< typename Stored > class Storage = StoreValue>
void regina::Property< T, Storage >::swap ( Property< T, Storage > &  other)
inline

Swaps this with the given property.

Both the known status and the values (if known) will swapped in the most efficient manner that the compiler is aware of.

Parameters
otherthe property to swap with this.

◆ swap() [3/5]

template<typename T >
void regina::StoreConstPtr< T >::swap ( StoreConstPtr< T > &  other)
inline

Swaps this with the given value.

Parameters
otherthe value to swap with this.

◆ swap() [4/5]

template<typename T >
void regina::StoreManagedPtr< T >::swap ( StoreManagedPtr< T > &  other)
inlineprotected

Swaps this with the given value.

Parameters
otherthe value to swap with this.

◆ swap() [5/5]

template<typename T >
void regina::StoreValue< T >::swap ( StoreValue< T > &  other)
inline

Swaps this with the given value.

Parameters
otherthe value to swap with this.

◆ sync()

int regina::i18n::IConvStreamBuffer::sync ( )

Flushes all output buffers.

The buffers for both this stream and the destination output stream will be flushed.

Returns
0 on success, or -1 on error.

◆ TrieSet()

template<typename T >
regina::TrieSet< T >::TrieSet
inline

Constructs an empty collection of sets.

◆ Tritmask1() [1/2]

template<typename T >
regina::Tritmask1< T >::Tritmask1 ( )
inline

Creates a new tritmask with all trits set to 0.

◆ Tritmask1() [2/2]

template<typename T >
regina::Tritmask1< T >::Tritmask1 ( const Tritmask1< T > &  cloneMe)
inlinedefault

Creates a clone of the given tritmask.

Parameters
cloneMethe tritmask to clone.

◆ Tritmask2() [1/2]

template<typename T , typename U = T>
regina::Tritmask2< T, U >::Tritmask2 ( )
inline

Creates a new tritmask with all trits set to 0.

◆ Tritmask2() [2/2]

template<typename T , typename U = T>
regina::Tritmask2< T, U >::Tritmask2 ( const Tritmask2< T, U > &  cloneMe)
inlinedefault

Creates a clone of the given tritmask.

Parameters
cloneMethe tritmask to clone.

◆ truncate() [1/3]

void regina::Bitmask::truncate ( size_t  numBits)
inline

Leaves the first numBits bits of this bitmask intact, but sets all subsequent bits to false.

In other words, this routine "truncates" this bitmask to the given number of bits.

This routine does not change the length of this bitmask (as passed to the contructor or to reset()).

Precondition
numBits is at most the length of this bitmask.
Parameters
numBitsthe number of bits that will not be cleared.

◆ truncate() [2/3]

template<typename T >
void regina::Bitmask1< T >::truncate ( size_t  numBits)
inline

Leaves the first numBits bits of this bitmask intact, but sets all subsequent bits to false.

In other words, this routine "truncates" this bitmask to the given number of bits.

This routine does not change the length of this bitmask (as passed to the contructor or to reset()).

Parameters
numBitsthe number of bits that will not be cleared.

◆ truncate() [3/3]

template<typename T , typename U = T>
void regina::Bitmask2< T, U >::truncate ( size_t  numBits)
inline

Leaves the first numBits bits of this bitmask intact, but sets all subsequent bits to false.

In other words, this routine "truncates" this bitmask to the given number of bits.

This routine does not change the length of this bitmask (as passed to the contructor or to reset()).

Parameters
numBitsthe number of bits that will not be cleared.

◆ underflow()

IConvStreamBuffer::int_type regina::i18n::IConvStreamBuffer::underflow ( )
inline

Simply returns EOF (since this is not an input stream).

Returns
EOF.

◆ utf8ValidTo() [1/2]

const char* regina::i18n::utf8ValidTo ( const char *  s)

Identifies the longest prefix of the given string that is valid UTF-8.

The substring from s until just before the pointer that is returned is guaranteed to be valid UTF-8. If the entire string is valid UTF-8, then this routine will return a pointer to the null terminator of s.

Python
This routine returns the length of the longest valid UTF-8 prefix. The length is measured in raw bytes (not unicode characters).
Returns
a pointer marking the end of the longest valid UTF-8 prefix.

◆ utf8ValidTo() [2/2]

std::string::const_iterator regina::i18n::utf8ValidTo ( const std::string &  s)

Identifies the longest prefix of the given string that is valid UTF-8.

The substring from s.begin() to the iterator that is returned is guaranteed to be valid UTF-8. If the entire string is valid UTF-8, then this routine will return s.end().

Python
This routine returns the length of the longest valid UTF-8 prefix. The length is measured in raw bytes (not unicode characters).
Returns
an iterator marking the end of the longest valid UTF-8 prefix.

◆ value()

template<typename T , template< typename Stored > class Storage = StoreValue>
QueryType regina::Property< T, Storage >::value ( ) const
inline

Returns the current value of this property.

If this property is marked as unknown then the results are undefined.

Precondition
This property is currently marked as known.
Returns
the current value of this property.

◆ valueOf() [1/14]

bool regina::valueOf ( const std::string &  str,
bool &  dest 
)

Converts the entire given string to a boolean and reports whether this conversion was successful.

If the given string begins with T, t or 1, then the string will be successfully converted to true. If the given string begins with F, f or 0, then the string will be successfully converted to false. Otherwise the conversion will be unsuccessful and argument dest will be set to false.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting boolean.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [2/14]

bool regina::valueOf ( const std::string &  str,
BoolSet dest 
)

Converts the entire given string to a set of booleans and reports whether this conversion was successful.

A set of booleans is represented by one of the four strings , T-, -F or TF. If the conversion is unsuccessful, argument dest will be set to BoolSet::sNone and false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting set of booleans.
Returns
true if the conversion was successful or false otherwise.

◆ valueOf() [3/14]

bool regina::valueOf ( const std::string &  str,
double &  dest 
)

Converts the entire given string to a double precision real number and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the real number that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting real number.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [4/14]

bool regina::valueOf ( const std::string &  str,
int &  dest 
)

Converts the entire given string to an integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [5/14]

bool regina::valueOf ( const std::string &  str,
int8_t &  dest 
)

Converts the entire given string to an 8-bit integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting 8-bit integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [6/14]

template<bool supportInfinity>
bool regina::valueOf ( const std::string &  str,
IntegerBase< supportInfinity > &  dest 
)

Converts the entire given string to an arbitrary precision integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting arbitrary precision integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [7/14]

bool regina::valueOf ( const std::string &  str,
long &  dest 
)

Converts the entire given string to a long integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting long integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [8/14]

bool regina::valueOf ( const std::string &  str,
long long &  dest 
)

Converts the entire given string to a long long integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting long long integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [9/14]

bool regina::valueOf ( const std::string &  str,
short &  dest 
)

Converts the entire given string to a short integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting short integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [10/14]

bool regina::valueOf ( const std::string &  str,
uint8_t &  dest 
)

Converts the entire given string to an unsigned 8-bit integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting unsigned 8-bit integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [11/14]

bool regina::valueOf ( const std::string &  str,
unsigned &  dest 
)

Converts the entire given string to an unsigned integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting unsigned integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [12/14]

bool regina::valueOf ( const std::string &  str,
unsigned long &  dest 
)

Converts the entire given string to an unsigned long integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting unsigned long integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [13/14]

bool regina::valueOf ( const std::string &  str,
unsigned long long &  dest 
)

Converts the entire given string to an unsigned long long integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting unsigned long long integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ valueOf() [14/14]

bool regina::valueOf ( const std::string &  str,
unsigned short &  dest 
)

Converts the entire given string to an unsigned short integer and reports whether this conversion was successful.

The given string should contain no whitespace or other characters that are not a part of the integer that the string represents. If any unexpected characters are encountered, the routine will convert the string as best it can but false will be returned.

Python
Not present.
Parameters
strthe string to convert.
destthe variable in which to store the resulting unsigned short integer.
Returns
true if the conversion was completely successful or false otherwise.

◆ warning()

void regina::xml::XMLParserCallback::warning ( const std::string &  s)
inlinevirtual

Called when a parser warning occurs.

Parameters
sthe warning message.

Reimplemented in regina::XMLCallback.

◆ writeResUsage()

void regina::writeResUsage ( std::ostream &  out)

Writes time and memory usage for the current process to the given output stream.

Information is gathered from the /proc filesystem, which means that this routine will only write meaningful information under a Linux system where /proc is mounted.

Specifically, this routine reads information on the running process from /proc/self/stat, and writes a short string to the given output stream of the form:

utime=..., stime=..., vsize=...

The three ellipses in the example above will be replaced with integers, representing:

  • the number jiffies that this process has been scheduled in user mode (the utime field);
  • the number jiffies that this process has been scheduled in kernel mode (the stime field);
  • the the virtual memory size in bytes (the vsize field).

The description of these three fields is taken directly from the proc(5) manpage. Note that the length of a jiffy can differ from system to system; see the time(7) manpage for details.

The output will not contain a newline, and the given output stream will not be flushed.

If /proc/self/stat cannot be read, this routine will write a short message to that effect to the given output stream (which means that this utility is safe to call under non-Linux operating systems, although it will of course be useless in such scenarios).

If /proc/self/stat can be read but contains unexpected information, the behaviour of this routine is undefined.

Python
This routine does not take any arguments; instead the stream out is assumed to be standard output.
Warning
Currently this routine allows at most 255 characters for the comm field in /proc/self/stat (which stores the executable filename along with surrounding parentheses). If the comm field is too long (i.e., the executable filename is too long), then this routine will not be able to parse /proc/self/stat, and will write a note to this effect to the given output stream. If you encounter this problem, you should be able to fix it by renaming your executable to something shorter.
Parameters
outthe output stream to which usage information will be written.

◆ xmlEncodeComment()

std::string regina::xml::xmlEncodeComment ( const std::string &  comment)

Returns the given string encoded so it is suitable for use inside an XML comment.

As well as converting special characters to XML entities, this routine will replace dashes with underscores to avoid double-hyphens (which are illegal in XML comments).

Python
Not present.
Parameters
commentthe string to convert; this string will not be changed.
Returns
the string converted to be usable inside an XML comment.

◆ xmlEncodeSpecialChars()

std::string regina::xml::xmlEncodeSpecialChars ( const std::string &  original)

Returns the given string with special characters converted to XML entities.

For instance, the string "a \< b" would be converted to "a \&lt; b".

Python
Not present.
Parameters
originalthe string to convert; this string will not be changed.
Returns
the converted string with special characters replaced by XML entities.

◆ XMLParser()

regina::xml::XMLParser::XMLParser ( XMLParserCallback callback)

Creates a new XML parser.

Parameters
callbackthe object providing the routines to call when particular XML components are encountered during parsing.

◆ XMLPropertyDict()

regina::xml::XMLPropertyDict::XMLPropertyDict ( )
inline

Create a new map.

◆ xmlString()

std::string regina::xml::xmlString ( xmlChar *  str,
bool  free = true 
)
inline

Converts the given string from libxml into a C++ string, optionally deallocating the original libxml string.

The given libxml string str may be null, in which case the resulting C++ string will be the empty string.

Parameters
strthe string to convert.
freetrue if the original libxml string str should be deallocated, or false if it should be preserved.
Returns
the given string as a C++ string.

◆ xmlValueTag()

template<class T >
std::string regina::xml::xmlValueTag ( const std::string &  tagName,
const T &  value 
)
inline

Returns an XML tag with a single property containing the given value.

The tag will be of the form <tagName value="..."/>.

The value itself will be written to the tag string using the standard output stream operator <<.

Precondition
The property value when written to an output stream does not contain any special characters (such as < or &) that need to be encoded as XML entities.
Python
Not present.
Parameters
tagNamethe name of the XML tag to create.
valuethe value to assign to the value property of the tag.
Returns
the corresponding XML tag.

◆ ~Bitmask()

regina::Bitmask::~Bitmask ( )
inline

Destroys this bitmask.

◆ ~IConvStreamBuffer()

regina::i18n::IConvStreamBuffer::~IConvStreamBuffer ( )
inline

Destroys this stream buffer.

This stream buffer will be closed, but the destination output stream will not be.

◆ ~LightweightSequence()

template<typename T >
regina::LightweightSequence< T >::~LightweightSequence
inline

Destroys this sequence and all of its elements.

All elements of the sequence will be destroyed using the destructor for type T. If the elements are pointers whose pointee objects need to be deleted also, you must do this separately before destroying the sequence itself.

◆ ~ListOnCall()

template<typename T >
virtual regina::ListOnCall< T >::~ListOnCall ( )
inlinevirtual

Destroys this list and all of the items it contains.

◆ ~mem_istream()

regina::mem_istream::~mem_istream ( )
inline

Destructor.

Note that this does not deallocate the array of characters being read.

◆ ~StoreManagedPtr()

template<typename T >
regina::StoreManagedPtr< T >::~StoreManagedPtr ( )
inlineprotected

Destroys the currently held value if one exists.

◆ ~TrieSet()

template<typename T >
regina::TrieSet< T >::~TrieSet
inline

Destroys this collection of sets.

◆ ~XMLParser()

regina::xml::XMLParser::~XMLParser ( )
inlinevirtual

Destroys this XML parser.

◆ ~XMLParserCallback()

regina::xml::XMLParserCallback::~XMLParserCallback ( )
inlinevirtual

Default destructor that does nothing.

Variable Documentation

◆ sBoth

const BoolSet regina::BoolSet::sBoth
static

The set containing both true and false.

◆ sFalse

const BoolSet regina::BoolSet::sFalse
static

The set containing only false.

◆ sNone

const BoolSet regina::BoolSet::sNone
static

The empty set.

◆ sTrue

const BoolSet regina::BoolSet::sTrue
static

The set containing only true.

◆ value_ [1/3]

template<typename T >
T regina::StoreValue< T >::value_
protected

The held property value.

◆ value_ [2/3]

template<typename T >
const T* regina::StoreConstPtr< T >::value_
protected

The held property value.

◆ value_ [3/3]

template<typename T >
T* regina::StoreManagedPtr< T >::value_
protected

The held property value.

Friends

◆ MarkedVector

template<typename T >
friend class MarkedVector
friend

Allow only MarkedVector to edit the array index.

◆ operator<< [1/4]

std::ostream& operator<< ( std::ostream &  out,
const Bitmask mask 
)
friend

Writes the given bitmask to the given output stream as a sequence of zeroes and ones.

Since the length of the bitmask is not stored, the number of bits written might be greater than the length initially assigned to this bitmask (specifically, the length will be rounded up to the next "raw unit of storage").

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe bitmask to write.
Returns
a reference to the given output stream.

◆ operator<< [2/4]

std::ostream& operator<< ( std::ostream &  out,
const BoolSet set 
)
friend

Writes the given boolean set to the given output stream.

The set will be written in the form { true, false }, { true }, { false } or { }.

Parameters
outthe output stream to which to write.
setthe boolean set to write.
Returns
a reference to out.

◆ operator<< [3/4]

template<typename T >
std::ostream& operator<< ( std::ostream &  out,
const Tritmask1< T > &  mask 
)
friend

Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2).

Since the length of the tritmask is not stored, the number of trits written will be 8 * sizeof(T).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe tritmask to write.
Returns
a reference to the given output stream.

◆ operator<< [4/4]

template<typename T , typename U = T>
std::ostream& operator<< ( std::ostream &  out,
const Tritmask2< T, U > &  mask 
)
friend

Writes the given tritmask to the given output stream as a sequence of digits (0, 1 and/or 2).

Since the length of the tritmask is not stored, the number of trits written will be 8 * sizeof(T) + 8 * sizeof(U).

Python
Not present.
Parameters
outthe output stream to which to write.
maskthe tritmask to write.
Returns
a reference to the given output stream.

Copyright © 1999-2021, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).