atlas
0.6

Functions  
template<typename I , typename O >  
void  baseChange (I first, I last, O out, I firstb, I lastb) 
Functions for working with lattices. More...  
template<typename I , typename O >  
void  inverseBaseChange (I first, I last, O out, I firstb, I lastb) 
CoweightList  perp (const WeightList &b, size_t r) 
Returns a basis of the orthogonal of the sublattice generated by b in Z^r. More...  
LatticeMatrix  kernel (const LatticeMatrix &M) 
LatticeMatrix  eigen_lattice (LatticeMatrix M, LatticeCoeff lambda) 
LatticeMatrix  row_saturate (const LatticeMatrix &M) 
template void  baseChange (WeightList::iterator, WeightList::iterator, std::back_insert_iterator< WeightList >, WeightList::iterator, WeightList::iterator) 
void atlas::lattice::baseChange  (  I  first, 
I  last,  
O  out,  
I  firstb,  
I  lastb  
) 
Functions for working with lattices.
This namespace defines some general lattice functions. It includes change of basis functions, and calculating the orthogonal of a sublattice.
In this template, we assume that I, and O are respectively random access input and output iterator types for type Weight, and that [firstb,lastb[ holds a new $$basis for the lattice, in particular that lastbfirstb is equal to the size of the Weights.
As we iterate from first to last, we write the vectors in the new basis (this is supposed to be possible) and output the result to O.
Doing the base change amounts to applying the inverse of b's matrix.
NOTE: we don't assume that [firstb, lastb[ is necessarily a $$basis of the current lattice, only that it is a basis of a full rank sublattice containing the vectors in the input range; the new coordinates will then be integers. Users should be aware of the "full rank" condition; without it the specification still makes sense, but the implementation will fail.
template void atlas::lattice::baseChange  (  WeightList::iterator  , 
WeightList::iterator  ,  
std::back_insert_iterator< WeightList >  ,  
WeightList::iterator  ,  
WeightList::iterator  
) 
LatticeMatrix atlas::lattice::eigen_lattice  (  LatticeMatrix  M, 
LatticeCoeff  lambda  
) 
void atlas::lattice::inverseBaseChange  (  I  first, 
I  last,  
O  out,  
I  firstb,  
I  lastb  
) 
This (unsused) template function is like baseChange, but goes from weights expressed in terms of [firstb, lastb[ to ones expressed in terms of the original basis. This is easier, as we don't have to invert the matrix!
LatticeMatrix atlas::lattice::kernel  (  const LatticeMatrix &  M  ) 
CoweightList atlas::lattice::perp  (  const WeightList &  b, 
size_t  r  
) 
Returns a basis of the orthogonal of the sublattice generated by b in Z^r.
Algorithm: diagonalise the matrix M with columns b using row operations R (forgetting column operations C) as for Smith form; then image R*M is span of original images of canonical basis vectors (as many as nonzero factors), and orthogonal sublattice is spanned by the remaining rows of R.
Precondition: the (possibly dependent) vectors in b all have the size r.
LatticeMatrix atlas::lattice::row_saturate  (  const LatticeMatrix &  M  ) 