Regina 7.3 Calculation Engine
Public Member Functions | List of all members
regina::IntersectionForm Class Reference

Represents a symmetric bilinear integral form, which for Regina is typically the intersection form of a 4-manifold. More...

#include <algebra/intersectionform.h>

Inheritance diagram for regina::IntersectionForm:
regina::Output< IntersectionForm >

Public Member Functions

 IntersectionForm (MatrixInt form)
 Constructs the bilinear form described by the given symmetric square integer matrix. More...
 
 IntersectionForm (const IntersectionForm &)=default
 Creates a clone of the given intersection form. More...
 
 IntersectionForm (IntersectionForm &&) noexcept=default
 Moves the contents of the given intersection form to this new intersection form. More...
 
IntersectionFormoperator= (const IntersectionForm &)=default
 Sets this to be a clone of the given intersection form. More...
 
IntersectionFormoperator= (IntersectionForm &&) noexcept=default
 Moves the contents of the given intersection form to this intersection form. More...
 
void swap (IntersectionForm &other) noexcept
 Swaps the contents of this and the given intersection form. More...
 
const MatrixIntmatrix () const
 Returns a symmetric square integer matrix that describes this bilinear form. More...
 
size_t rank () const
 Returns the rank of this bilinear form. More...
 
long signature () const
 Returns the signature of this bilinear form. More...
 
bool even () const
 Returns true if and only if this bilinear form is of even type. More...
 
bool odd () const
 Returns true if and only if this bilinear form is of odd type. More...
 
bool operator== (const IntersectionForm &other) const
 Determines if this and the given bilinear form are represented by the same symmetric square integer matrices. More...
 
bool operator!= (const IntersectionForm &other) const
 Determines if this and the given bilinear form are not represented by the same symmetric square integer matrices. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes a detailed text representation of this object to the given output stream. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Detailed Description

Represents a symmetric bilinear integral form, which for Regina is typically the intersection form of a 4-manifold.

Such a bilinear form is stored as a symmetric square integer matrix. For closed 4-manifolds, this matrix is unimodular; however, this class can also represent more general bilinear forms (including degenerate forms).

The main thing that this class provides in addition to the square matrix is access to invariants of the bilinear form, including rank, signature, and type (even vs odd). All of these invariants are computed by the class constructor, and so querying them via routines such as rank(), signature(), even() or odd() is essentially instantaneous.

Constructor & Destructor Documentation

◆ IntersectionForm() [1/3]

regina::IntersectionForm::IntersectionForm ( MatrixInt  form)

Constructs the bilinear form described by the given symmetric square integer matrix.

The given matrix representation will be stored unchanged (i.e., matrix() will return an exact copy of the argument form). This constructor will also compute all of the form invariants (a task which requires only small polynomial time: the current algorithms are at worst cubic in the side length of the given matrix).

Precondition
The given matrix is square and symmetric.
Exceptions
InvalidArgumentThe given matrix is not both symmetric and square.
Parameters
forma symmetric square integer matrix that describes this bilinear form.

◆ IntersectionForm() [2/3]

regina::IntersectionForm::IntersectionForm ( const IntersectionForm )
default

Creates a clone of the given intersection form.

◆ IntersectionForm() [3/3]

regina::IntersectionForm::IntersectionForm ( IntersectionForm &&  )
defaultnoexcept

Moves the contents of the given intersection form to this new intersection form.

This is a fast (constant time) operation.

The intersection form that was passed will no longer be usable.

Member Function Documentation

◆ detail()

std::string regina::Output< IntersectionForm , false >::detail ( ) const
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ even()

bool regina::IntersectionForm::even ( ) const
inline

Returns true if and only if this bilinear form is of even type.

A form Q is even if and only if Q(x,x) is even for all x.

Returns
true if this bilinear form is of even type, or false if it is of odd type.

◆ matrix()

const MatrixInt & regina::IntersectionForm::matrix ( ) const
inline

Returns a symmetric square integer matrix that describes this bilinear form.

This will be an exact copy of the matrix that was passed to the class constructor.

Returns
a matrix describing this bilinear form.

◆ odd()

bool regina::IntersectionForm::odd ( ) const
inline

Returns true if and only if this bilinear form is of odd type.

A form Q is odd if and only if Q(x,x) is odd for some x.

Returns
true if this bilinear form is of odd type, or false if it is of even type.

◆ operator!=()

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

Determines if this and the given bilinear form are not represented by the same symmetric square integer matrices.

This does not test whether this and the given form are congruent (i.e., related by a change basis in the underlying free abelian group). Instead it is equivalent to testing whether matrix() != other.matrix().

Parameters
otherthe bilinear form to compare with this.
Returns
true if and only if this and the given bilinear form are not represented by identical matrices.

◆ operator=() [1/2]

IntersectionForm & regina::IntersectionForm::operator= ( const IntersectionForm )
default

Sets this to be a clone of the given intersection form.

Returns
a reference to this intersection form.

◆ operator=() [2/2]

IntersectionForm & regina::IntersectionForm::operator= ( IntersectionForm &&  )
defaultnoexcept

Moves the contents of the given intersection form to this intersection form.

This is a fast (constant time) operation.

The intersection form that was passed will no longer be usable.

Returns
a reference to this intersection form.

◆ operator==()

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

Determines if this and the given bilinear form are represented by the same symmetric square integer matrices.

This does not test whether this and the given form are congruent (i.e., related by a change basis in the underlying free abelian group). Instead it is equivalent to testing whether matrix() == other.matrix().

Parameters
otherthe bilinear form to compare with this.
Returns
true if and only if this and the given bilinear form are represented by identical matrices.

◆ rank()

size_t regina::IntersectionForm::rank ( ) const
inline

Returns the rank of this bilinear form.

This is the rank of the underlying symmetric square matrix.

Returns
the rank of this bilinear form.

◆ signature()

long regina::IntersectionForm::signature ( ) const
inline

Returns the signature of this bilinear form.

This is the number of positive eigenvalues minus the number of negative eigenvalues of the underlying symmetric square matrix.

Returns
the signature of this bilinear form.

◆ str()

std::string regina::Output< IntersectionForm , false >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should use plain ASCII characters where possible, and should not contain any newlines.

Within these limits, this short text ouptut should be as information-rich as possible, since in most cases this forms the basis for the Python __str__() and __repr__() functions.

Python
The Python "stringification" function __str__() will use precisely this function, and for most classes the Python __repr__() function will incorporate this into its output.
Returns
a short text representation of this object.

◆ swap()

void regina::IntersectionForm::swap ( IntersectionForm other)
inlinenoexcept

Swaps the contents of this and the given intersection form.

Parameters
otherthe intersection form whose contents should be swapped with this.

◆ utf8()

std::string regina::Output< IntersectionForm , false >::utf8 ( ) const
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should not contain any newlines, and (within these constraints) should be as information-rich as is reasonable.

Unlike str(), this function may use unicode characters to make the output more pleasant to read. The string that is returned will be encoded in UTF-8.

Returns
a short text representation of this object.

◆ writeTextLong()

void regina::IntersectionForm::writeTextLong ( std::ostream &  out) const

Writes a detailed text representation of this object to the given output stream.

Python
Not present. Use detail() instead.
Parameters
outthe output stream to write to.

◆ writeTextShort()

void regina::IntersectionForm::writeTextShort ( std::ostream &  out) const

Writes a short text representation of this object to the given output stream.

Python
Not present. Use str() instead.
Parameters
outthe output stream to write to.

The documentation for this class was generated from the following file:

Copyright © 1999-2023, 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).