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

atlas::lattice Namespace Reference

Functions for working with lattices. More...


Functions

void numeratorMatrix (latticetypes::LatticeMatrix &q, const latticetypes::RatWeightList &rwl)
void perp (WeightList &b1, const WeightList &b2, size_t r)
void toCommonDenominator (latticetypes::RatWeightList &dest, const latticetypes::RatWeightList &source)
template<typename I, typename J, typename O>
void baseChange (const I &, const I &, O, const J &, const J &)
template<typename I, typename J, typename O>
void inverseBaseChange (const I &, const I &, O, const J &, const J &)
template<size_t dim>
void mod2 (bitvector::BitVector< dim > &, const latticetypes::LatticeElt &)
template<size_t dim>
void mod2 (std::vector< bitvector::BitVector< dim > > &, const latticetypes::WeightList &)
template<size_t dim>
void mod2 (bitvector::BitMatrix< dim > &, const latticetypes::LatticeMatrix &)
void perp (latticetypes::WeightList &, const latticetypes::WeightList &, size_t)


Detailed Description

Functions for working with lattices.

This namespace defines some more general lattice functions, less simple than what is defined in latticetypes.cpp. It includes change of basis functions, reduction modulo two, and calculating the orthogonal of a sublattice.


Function Documentation

template<typename I, typename J, typename O>
void atlas::lattice::baseChange const I &  first,
const I &  last,
out,
const J &  firstb,
const J &  lastb
 

In this template, we assume that I, J and O are respectively input and output iterators for type Weight, and that [firstb, lastb[ holds a new basis for the current lattice, expressed in terms of the current basis. As we range from begin to end, we write the vectors in the new basis and output them to O.

Doing the base change amounts to multiplying with the inverse matrix of b's matrix.

NOTE : we don't assume that [firstb, lastb[ is necessarily a Z-basis of the current lattice, only that it is a basis of the sublattice. On the other hand, we assume that the vectors in the input range are actually in the sublattice spanned by b, so that the new coordinates will still be integers.

Definition at line 77 of file lattice_def.h.

References atlas::matrix::Matrix< C >::apply(), atlas::matrix::Matrix< C >::inverse(), atlas::latticetypes::LatticeCoeff, atlas::latticetypes::LatticeMatrix, atlas::matrix::Matrix< C >::numRows(), and atlas::latticetypes::Weight.

Referenced by atlas::fillPositiveRoots(), and atlas::rootdata::RootDatum::toRootBasis().

template<typename I, typename J, typename O>
void atlas::lattice::inverseBaseChange const I &  first,
const I &  last,
out,
const J &  firstb,
const J &  lastb
 

Like baseChange, but we go from a list expressed in terms of [firstb, lastb[ to list expressed in terms of the original basis. This is actually easier, as we don't have to invert the base change matrix!

Definition at line 114 of file lattice_def.h.

References atlas::matrix::Matrix< C >::apply(), atlas::latticetypes::LatticeMatrix, atlas::matrix::Matrix< C >::numRows(), and atlas::latticetypes::Weight.

Referenced by atlas::fillPositiveRoots().

template<size_t dim>
void atlas::lattice::mod2 bitvector::BitMatrix< dim > &  m2,
const latticetypes::LatticeMatrix m
 

Reduce the matrix |m| modulo 2 into |m2|; it is assumed that the number of rows in |m| is at most |dim|.

Definition at line 62 of file lattice_def.h.

References atlas::latticetypes::LatticeMatrix, atlas::matrix::Matrix< C >::numColumns(), atlas::matrix::Matrix< C >::numRows(), atlas::bitvector::BitMatrix< dim >::resize(), and atlas::bitvector::BitMatrix< dim >::set_mod2().

Referenced by mod2().

template<size_t dim>
void atlas::lattice::mod2 std::vector< bitvector::BitVector< dim > > &  wl2,
const latticetypes::WeightList wl
 

Reduces all elements in the list modulo 2.

Definition at line 42 of file lattice_def.h.

References mod2(), and atlas::bitvector::BitVector< dim >::resize().

template<size_t dim>
void atlas::lattice::mod2 bitvector::BitVector< dim > &  v2,
const latticetypes::LatticeElt v
 

Reduces v modulo 2. It is assumed that v.size() <= dim.

Definition at line 28 of file lattice_def.h.

References atlas::bitvector::BitVector< dim >::resize(), and atlas::bitvector::BitVector< dim >::set_mod2().

void atlas::lattice::numeratorMatrix latticetypes::LatticeMatrix q,
const latticetypes::RatWeightList rwl
 

Synopsis: puts in q the matrix whose columns are the numerator vectors of rwl.

Precondition: the vectors in rwl all have the same dimension.

Definition at line 57 of file lattice.cpp.

References atlas::latticetypes::LatticeMatrix, atlas::matrix::Matrix< C >::numColumns(), atlas::matrix::Matrix< C >::numRows(), and atlas::matrix::Matrix< C >::resize().

Referenced by atlas::makeOrthogonal().

void perp latticetypes::WeightList ,
const latticetypes::WeightList ,
size_t 
 

Referenced by atlas::rootdata::RootDatum::RootDatum().

void perp WeightList b1,
const WeightList b2,
size_t  r
 

This function puts in b1 a basis of the orthogonal of the sublattice generated by b2 in Z^r. The algorithm is simple : find a Smith normal basis for b2; then the last elements of the dual basis generate the orthogonal.

Definition at line 82 of file lattice.cpp.

References atlas::matrix::Matrix< C >::column(), atlas::matrix::initBasis(), atlas::matrix::Matrix< C >::inverse(), atlas::latticetypes::LatticeElt, atlas::latticetypes::LatticeMatrix, atlas::matrix::Matrix< C >::numColumns(), atlas::smithnormal::smithNormal(), atlas::matrix::Matrix< C >::transposed(), and atlas::latticetypes::WeightList.

void atlas::lattice::toCommonDenominator latticetypes::RatWeightList dest,
const latticetypes::RatWeightList source
 

Synopsis: puts in dest the vectors equivalent to those in source, but reduced to the smallest common denominator.

More precisely, we use as denominator the l.c.m. of the denominators in source.

Definition at line 120 of file lattice.cpp.

References atlas::arithmetic::lcm(), and atlas::matrix::Matrix< C >::resize().

Referenced by atlas::makeOrthogonal().


Generated on Wed Mar 26 16:52:59 2008 for atlas by  doxygen 1.3.9.1