Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

atlas::smithnormal Namespace Reference


Functions

template<typename C>
void addMultiple (std::vector< C > &, const std::vector< C > &, const C &)
template<typename C>
void blockReduce (typename std::vector< std::vector< C > >::iterator, matrix::Matrix< C > &)
template<typename C>
void blockShape (typename std::vector< std::vector< C > >::iterator, matrix::Matrix< C > &)
template<typename C>
void columnReduce (matrix::Matrix< C > &, size_t)
template<typename C>
matrix::Matrix< C >::index_pair findBlockReduction (const matrix::Matrix< C > &)
template<typename C>
matrix::Matrix< C >::index_pair findReduction (const matrix::Matrix< C > &)
template<typename C>
bool hasBlockReduction (const matrix::Matrix< C > &)
template<typename C>
bool hasReduction (const matrix::Matrix< C > &)
template<typename C>
void prepareMatrix (typename std::vector< std::vector< C > >::iterator, matrix::Matrix< C > &)
template<typename C>
void reduce (typename std::vector< std::vector< C > >::iterator, matrix::Matrix< C > &)
template<typename C>
void rowReduce (typename std::vector< std::vector< C > >::iterator, matrix::Matrix< C > &, size_t)
template<typename C>
void smithNormal (std::vector< C > &, typename std::vector< std::vector< C > >::iterator, const matrix::Matrix< C > &)
template<typename C>
void smithNormal (std::vector< C > &, typename std::vector< std::vector< C > >::iterator, const std::vector< std::vector< C > > &)
template<typename C>
void smithStep (typename std::vector< std::vector< C > >::iterator, matrix::Matrix< C > &)
template<typename C>
void blockReduce (Matrix< C > &m)
template<typename C>
void blockShape (typename std::vector< std::vector< C > >::iterator b, Matrix< C > &m)
template<typename C>
void columnReduce (Matrix< C > &m, size_t j)
template<typename C>
Matrix< C >::index_pair findBlockReduction (const Matrix< C > &m)
template<typename C>
Matrix< C >::index_pair findReduction (const Matrix< C > &m)
template<typename C>
bool hasBlockReduction (const Matrix< C > &m)
template<typename C>
bool hasReduction (const Matrix< C > &m)
template<typename C>
void reduce (typename std::vector< std::vector< C > >::iterator b, Matrix< C > &m)
template<typename C>
void prepareMatrix (typename std::vector< std::vector< C > >::iterator b, Matrix< C > &m)
template<typename C>
void rowReduce (typename std::vector< std::vector< C > >::iterator b, Matrix< C > &m, size_t i)
template<typename C>
void smithNormal (std::vector< C > &invf, typename std::vector< std::vector< C > >::iterator b, const Matrix< C > &m)
template<typename C>
void smithStep (typename std::vector< std::vector< C > >::iterator b, Matrix< C > &m)


Function Documentation

template<typename C>
void atlas::smithnormal::addMultiple std::vector< C > &  a,
const std::vector< C > &  b,
const C &  c
 

Adds c times b to a. It is assumed that the size of a is at least the size of b.

Definition at line 69 of file smithnormal_def.h.

Referenced by blockShape(), and rowReduce().

template<typename C>
void blockReduce Matrix< C > &  m  ) 
 

Assuming that hasBlockReduction has returned true, this function adds to column zero the column of m containing an element not divisible by m(0,0).

Definition at line 83 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::columnOperation(), and findBlockReduction().

Referenced by smithStep().

template<typename C>
void blockReduce typename std::vector< std::vector< C > >::iterator  ,
matrix::Matrix< C > & 
 

template<typename C>
void blockShape typename std::vector< std::vector< C > >::iterator  b,
Matrix< C > &  m
 

Finishes off the off-diagonal zeroeing of the first line and the first column of m. It is assumed that hasReduction(m) returns false, so that m(0,0) divides all entries in the first row and column.

Definition at line 100 of file smithnormal_def.h.

References addMultiple(), atlas::matrix::Matrix< C >::columnOperation(), atlas::matrix::Matrix< C >::columnSize(), and atlas::matrix::Matrix< C >::rowSize().

Referenced by smithStep().

template<typename C>
void blockShape typename std::vector< std::vector< C > >::iterator  ,
matrix::Matrix< C > & 
 

template<typename C>
void columnReduce Matrix< C > &  m,
size_t  j
 

Does the reduction in the case of a column operation. The reduction consists in subtracting from column j the multiple of row 0 which will leave in m(i,0) the remainder of the Euclidian division of m(0,j) by m(0,0), and then swapping the two columns.

Definition at line 133 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::columnOperation(), atlas::intutils::divide(), and atlas::matrix::Matrix< C >::swapColumns().

Referenced by reduce().

template<typename C>
void columnReduce matrix::Matrix< C > &  ,
size_t 
 

template<typename C>
Matrix<C>::index_pair findBlockReduction const Matrix< C > &  m  ) 
 

Assuming that hasReduction(m) has returned true, returns the coordinates of the actual reduction point.

Definition at line 151 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::columnSize(), and atlas::matrix::Matrix< C >::rowSize().

Referenced by blockReduce().

template<typename C>
matrix::Matrix<C>::index_pair findBlockReduction const matrix::Matrix< C > &   ) 
 

template<typename C>
Matrix<C>::index_pair findReduction const Matrix< C > &  m  ) 
 

Assuming that hasReduction(m) has returned true, returns the coordinates of the actual reduction point.

Definition at line 168 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::columnSize(), and atlas::matrix::Matrix< C >::rowSize().

Referenced by reduce().

template<typename C>
matrix::Matrix<C>::index_pair findReduction const matrix::Matrix< C > &   ) 
 

template<typename C>
bool hasBlockReduction const Matrix< C > &  m  ) 
 

Tells if m(0,0) divides all m(i,j), i,j > 1.

Definition at line 188 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::columnSize(), and atlas::matrix::Matrix< C >::rowSize().

Referenced by smithStep().

template<typename C>
bool hasBlockReduction const matrix::Matrix< C > &   ) 
 

template<typename C>
bool hasReduction const Matrix< C > &  m  ) 
 

Tells if m(0,0) divides all m(0,j) and all m(i,0).

Definition at line 207 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::columnSize(), and atlas::matrix::Matrix< C >::rowSize().

Referenced by smithStep().

template<typename C>
bool hasReduction const matrix::Matrix< C > &   ) 
 

template<typename C>
void prepareMatrix typename std::vector< std::vector< C > >::iterator  b,
Matrix< C > &  m
 

Does the preliminary work for the smith-normal algorithm : permutes rows and columns to put an entry with smallest non-zero absolute value in the upper left corner, and changes signs if necessary to make that entrey > 0.

It is assumed that m is non-zero.

Definition at line 252 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::absMinPos(), atlas::matrix::Matrix< C >::changeColumnSign(), atlas::matrix::Matrix< C >::swap(), atlas::matrix::Matrix< C >::swapColumns(), and atlas::matrix::Matrix< C >::swapRows().

Referenced by smithStep().

template<typename C>
void prepareMatrix typename std::vector< std::vector< C > >::iterator  ,
matrix::Matrix< C > & 
 

template<typename C>
void reduce typename std::vector< std::vector< C > >::iterator  b,
Matrix< C > &  m
 

Here we assume that hasReduction(m) has returned true. We have to do the actual reduction.

Definition at line 229 of file smithnormal_def.h.

References columnReduce(), findReduction(), and rowReduce().

Referenced by smithStep().

template<typename C>
void reduce typename std::vector< std::vector< C > >::iterator  ,
matrix::Matrix< C > & 
 

template<typename C>
void rowReduce typename std::vector< std::vector< C > >::iterator  b,
Matrix< C > &  m,
size_t  i
 

Does the reduction in the case of a row operation. The reduction consists in subtracting from row i the multiple of row 0 which will leave in m(i,0) the remainder of the Euclidian division of m(i,0) by m(0,0), and then swapping the two rows. One also has to update the basis b accordingly.

Definition at line 286 of file smithnormal_def.h.

References addMultiple(), atlas::intutils::divide(), atlas::matrix::Matrix< C >::rowOperation(), atlas::matrix::Matrix< C >::swap(), and atlas::matrix::Matrix< C >::swapRows().

Referenced by reduce().

template<typename C>
void rowReduce typename std::vector< std::vector< C > >::iterator  ,
matrix::Matrix< C > &  ,
size_t 
 

template<typename C>
void smithNormal std::vector< C > &  invf,
typename std::vector< std::vector< C > >::iterator  b,
const Matrix< C > &  m
 

This is a simple implementation of the Smith normal form algorithm, intended for use on small matrices such as Cartan matrices.

It is assumed that the matrix m is given, whose columns express the coordinates of a set of vectors relative to the basis b. This relation between m and b is preserved throughout the algorithm; the group generated by the column combinations does not change. The basis b and the matrix m change, until m reaches a diagonal form.

The invariant factors are appended to invf.

Definition at line 307 of file smithnormal_def.h.

References atlas::matrix::Matrix< C >::eraseColumn(), atlas::matrix::Matrix< C >::eraseRow(), atlas::matrix::Matrix< C >::isZero(), and smithStep().

Referenced by atlas::interpreter::annihilator_modulo(), atlas::abelian::basis(), atlas::interpreter::check_involution(), atlas::testrun::CoveringIterator::CoveringIterator(), atlas::rootdata::RootDatum::fillStatus(), atlas::fullMinusBasis(), atlas::fullPlusBasis(), atlas::interpreter::invfact_wrapper(), atlas::makeOrthogonal(), atlas::tori::minusBasis(), atlas::lattice::perp(), atlas::tori::plusBasis(), atlas::interpreter::Smith_basis_wrapper(), atlas::interpreter::Smith_wrapper(), atlas::interactive_lattice::smithBasis(), atlas::interpreter::smithBasis(), and smithNormal().

template<typename C>
void atlas::smithnormal::smithNormal std::vector< C > &  invf,
typename std::vector< std::vector< C > >::iterator  b,
const std::vector< std::vector< C > > &  f
 

Another interface to the smithNormal procedure, where we are given the sublattice through a generating family f, expressed by its coordinates in b.

Definition at line 351 of file smithnormal_def.h.

References smithNormal().

template<typename C>
void smithNormal std::vector< C > &  ,
typename std::vector< std::vector< C > >::iterator  ,
const matrix::Matrix< C > & 
 

template<typename C>
void smithStep typename std::vector< std::vector< C > >::iterator  b,
Matrix< C > &  m
 

This function carries out the main loop in the Smith normal form algorithm. Assuming m is non-zero, it finds one additional invariant factor, and a corresponding basis vector.

Definition at line 369 of file smithnormal_def.h.

References blockReduce(), blockShape(), hasBlockReduction(), hasReduction(), prepareMatrix(), and reduce().

Referenced by smithNormal().

template<typename C>
void smithStep typename std::vector< std::vector< C > >::iterator  ,
matrix::Matrix< C > & 
 


Generated on Wed Mar 26 16:53:05 2008 for atlas by  doxygen 1.3.9.1