Classes | |
class | regina::NMatrix< T > |
Represents a matrix of elements of the given type T. More... | |
class | regina::NMatrixRing< T > |
Represents a matrix of elements from a given ring T. More... | |
class | regina::NMatrixField< T > |
Represents a matrix of elements from a given field T. More... | |
class | regina::NMatrixInt |
Represents a matrix of arbitrary precision integers. More... | |
class | regina::NRay |
Represents a ray rooted at the origin whose coordinates are rational. More... | |
class | regina::NVector< T > |
A vector of elements from a given ring T. More... | |
class | regina::NVectorDense< T > |
A dense vector of objects of type T. More... | |
class | regina::NVectorMatrix_Illegal_Modification |
An exception thrown when a matrix row or column vector is modified. More... | |
class | regina::NVectorMatrix< T > |
A vector that corresponds to a row or column of a matrix. More... | |
class | regina::NVectorMatrixRow< T > |
A vector that corresponds to a row of a matrix. More... | |
class | regina::NVectorMatrixCol< T > |
A vector that corresponds to a column of a matrix. More... | |
class | regina::NVectorUnit_Illegal_Modification |
An exception thrown when a unit vector is modified. More... | |
class | regina::NVectorUnit< T > |
A unit vector of type T. More... | |
Functions | |
template<class R> | |
bool | regina::isZero (R x) |
Determines whether the given real or complex number is zero. | |
template<class R> | |
bool | regina::isNonZero (R x) |
Determines whether the given real or complex number is non-zero. | |
template<class R> | |
bool | regina::isPositive (R x) |
Determines whether the given real or complex number is strictly positive. | |
template<class R> | |
bool | regina::isNegative (R x) |
Determines whether the given real or complex number is strictly negative. | |
template<class R> | |
bool | regina::isNonNegative (R x) |
Determines whether the given real or complex number is non-negative. | |
template<class R> | |
bool | regina::isNonPositive (R x) |
Determines whether the given real or complex number is non-positive. | |
void | regina::smithNormalForm (NMatrixInt &matrix) |
Transforms the given integer matrix into Smith normal form. | |
NRay * | regina::intersect (const NRay &pos, const NRay &neg, const NVector< NLargeInteger > &hyperplane) |
Returns a newly allocated ray representing the intersection of the hyperplane joining two given rays with the given additional hyperplane. | |
long | regina::reducedMod (long k, long modBase) |
Reduces k modulo modBase to give the smallest possible absolute value. | |
unsigned long | regina::gcd (unsigned long a, unsigned long b) |
Calculates the greatest common divisor of two given integers. | |
long | regina::gcdWithCoeffs (long a, long b, long &u, long &v) |
Calculates the greatest common divisor of two given integers and finds the smallest coefficients with which these integers combine to give their gcd. | |
unsigned long | regina::modularInverse (unsigned long n, unsigned long k) |
Calculates the multiplicative inverse of one integer modulo another. | |
void | regina::factorise (unsigned long n, std::list< unsigned long > &factors) |
Calculates the prime factorisation of the given integer. | |
void | regina::primesUpTo (const NLargeInteger &roof, std::list< NLargeInteger > &primes) |
Determines all primes up to and including the given upper bound. | |
template<class T> | |
std::ostream & | regina::operator<< (std::ostream &out, const NVector< T > &vector) |
Writes the given vector to the given output stream. | |
regina::NMatrixInt::NMatrixInt (unsigned long rows, unsigned long cols) | |
Creates a new matrix of the given size. | |
regina::NMatrixInt::NMatrixInt (const NMatrixInt &cloneMe) | |
Creates a new matrix that is a clone of the given matrix. | |
virtual void | regina::NMatrixInt::writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. | |
virtual void | regina::NMatrixInt::writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. | |
Variables | |
const double | regina::epsilon |
A very small positive real designed to accommodate for rounding error. | |
T | regina::NMatrixRing::zero |
Zero in the underlying ring. | |
T | regina::NMatrixRing::one |
One (the multiplicative identity) in the underlying ring. | |
T | regina::NVector::zero |
Zero in the underlying number system. | |
T | regina::NVector::one |
One in the underlying number system. | |
T | regina::NVector::minusOne |
Negative one in the underlying number system. |
|
Calculates the prime factorisation of the given integer. All the prime factors will be inserted into the given list. The algorithm used is very neanderthal and should only be used with reasonably sized integers. Don't use it to do RSA! If a prime factor is repeated, it will be inserted multiple times into the list. The primes in the list are not guaranteed to appear in any specific order, nor are multiple occurrences of the same prime guaranteed to appear together. Note that once finished the list will contain the prime factors as well as whatever happened to be in the list before this function was called.
|
|
Calculates the greatest common divisor of two given integers. This routine is not recursive.
|
|
Calculates the greatest common divisor of two given integers and finds the smallest coefficients with which these integers combine to give their gcd. This routine is not recursive. Note that the given integers need not be non-negative. However, the gcd returned is guaranteed to be non-negative.
If d is the gcd of a and b, the values placed in u and v will be those for which
In the special case where one of the given integers is zero, the corresponding coefficient will also be zero and the other coefficient will be 1 or -1 so that
|
|
Returns a newly allocated ray representing the intersection of the hyperplane joining two given rays with the given additional hyperplane. The resulting ray will be in its smallest integral form. The given additional hyperplane must pass through the origin, and is represented by a vector perpendicular to it. If the arguments pos and neg are on the positive and negative sides of the hyperplane respectively (where positive and negative sides are determined by the sign of the dot product of a ray vector with the hyperplane representation vector), the resulting ray is guaranteed to be a positive multiple of a convex combination of the two original rays. The resulting ray is guaranteed to be of the same subclass of NRay as argument neg.
|
|
Determines whether the given real or complex number is strictly negative. Any number within regina::epsilon of zero is considered to be zero.
|
|
Determines whether the given real or complex number is non-negative. Any number within regina::epsilon of zero is considered to be zero.
|
|
Determines whether the given real or complex number is non-positive. Any number within regina::epsilon of zero is considered to be zero.
|
|
Determines whether the given real or complex number is non-zero. Any number within regina::epsilon of zero is considered to be zero.
|
|
Determines whether the given real or complex number is strictly positive. Any number within regina::epsilon of zero is considered to be zero.
|
|
Determines whether the given real or complex number is zero. Any number within regina::epsilon of zero is considered to be zero.
|
|
Calculates the multiplicative inverse of one integer modulo another. The inverse returned will be between 0 and n-1 inclusive.
|
|
Creates a new matrix that is a clone of the given matrix.
|
|
Creates a new matrix of the given size. All entries will be initialised to zero.
|
|
Writes the given vector to the given output stream. The vector will be written on a single line with elements separated by a single space. No newline will be written.
|
|
Determines all primes up to and including the given upper bound. All the primes found will be inserted into the given list in increasing order. The algorithm currently used is fairly neanderthal.
|
|
Reduces k modulo modBase to give the smallest possible absolute value.
For instance,
|
|
Transforms the given integer matrix into Smith normal form. Note that the given matrix need not be square and need not be of full rank. Reading down the diagonal, the final Smith normal form will have a series of non-negative, non-decreasing invariant factors followed by zeroes. The algorithm used is due to Hafner and McCurley (1991). It does not use modular arithmetic to control the intermediate coefficient explosion.
|
|
Writes this object in long text format to the given output stream. The output should provided the user with all the information they could want. The output should end with a newline. The default implementation of this routine merely calls writeTextShort() and adds a newline.
Reimplemented from regina::ShareableObject. |
|
Writes this object in short text format to the given output stream. The output should fit on a single line and no newline should be written.
Implements regina::ShareableObject. |
|
A very small positive real designed to accommodate for rounding error. Any two numbers within epsilon of each other are considred to be equal. |
|
Negative one in the underlying number system.
This would be |
|
One in the underlying number system.
This would be |
|
One (the multiplicative identity) in the underlying ring.
This would be |
|
Zero in the underlying number system.
This would be |
|
Zero in the underlying ring.
This would be |