atlas  0.6
Public Member Functions | Private Attributes | List of all members
atlas::subquotient::Subspace< dim > Class Template Reference

#include <Atlas.h>

Collaboration diagram for atlas::subquotient::Subspace< dim >:
Collaboration graph
[legend]

Public Member Functions

 Subspace ()
 
 Subspace (size_t n)
 
 Subspace (const BitVectorList< dim > &, size_t)
 Constructs the normalised subspace generated by the collection of |BitVectors| |b|, each of which has rank |n|. More...
 
 Subspace (const BitMatrix< dim > &)
 Constructs the normalised subspace generated by the columns of a |BitMatrix|, i.e., the image of that matrix. More...
 
const BitVector< dim > & basis (size_t j) const
 
const BitVectorList< dim > & basis () const
 
size_t dimension () const
 
const size_t rank () const
 
const BitSet< dim > & support () const
 
BitVectorList< dim > basis_perp () const
 
BitSet< dim > support_perp () const
 
BitVector< dim > toBasis (BitVector< dim > v) const
 Expresses |v| in the subspace basis. More...
 
BitVector< dim > fromBasis (const BitVector< dim > &v) const
 Interprets |v| in the subspace basis and returns external form. More...
 
bool contains (const BitVector< dim > &v) const
 
bool contains (const BitVectorList< dim > &m) const
 
BitVector< dim > representative (const BitVector< dim > &) const
 Return canonical representative of |v| modulo our subspace. More...
 
BitVector< dim > mod_image (const BitVector< dim > &w) const
 
void mod_reduce (BitVector< dim > &w) const
 
void apply (const BitMatrix< dim > &)
 
void swap (Subspace &)
 

Private Attributes

BitVectorList< dim > d_basis
 reduced echelon basis More...
 
BitSet< dim > d_support
 pivot (leading nonzero bit) positions More...
 
unsigned short int d_rank
 Dimension of the ambient vector space. More...
 

Constructor & Destructor Documentation

template<size_t dim>
atlas::subquotient::Subspace< dim >::Subspace ( )
inline
template<size_t dim>
atlas::subquotient::Subspace< dim >::Subspace ( size_t  n)
inlineexplicit
template<size_t dim>
atlas::subquotient::Subspace< dim >::Subspace ( const BitVectorList< dim > &  b,
size_t  n 
)

Constructs the normalised subspace generated by the collection of |BitVectors| |b|, each of which has rank |n|.

template<size_t dim>
atlas::subquotient::Subspace< dim >::Subspace ( const BitMatrix< dim > &  M)

Constructs the normalised subspace generated by the columns of a |BitMatrix|, i.e., the image of that matrix.

Member Function Documentation

template<size_t dim>
void atlas::subquotient::Subspace< dim >::apply ( const BitMatrix< dim > &  r)

Synopsis: applies |r| to our subspace, normalizing the resulting subspace.

Precondition: r is a matrix of the appropriate column size (it could go to a space of another dimension, even.)

template<size_t dim>
const BitVector<dim>& atlas::subquotient::Subspace< dim >::basis ( size_t  j) const
inline
template<size_t dim>
const BitVectorList<dim>& atlas::subquotient::Subspace< dim >::basis ( ) const
inline
template<size_t dim>
BitVectorList< dim > atlas::subquotient::Subspace< dim >::basis_perp ( ) const
template<size_t dim>
bool atlas::subquotient::Subspace< dim >::contains ( const BitVector< dim > &  v) const
template<size_t dim>
bool atlas::subquotient::Subspace< dim >::contains ( const BitVectorList< dim > &  m) const
template<size_t dim>
size_t atlas::subquotient::Subspace< dim >::dimension ( ) const
inline
template<size_t dim>
BitVector<dim> atlas::subquotient::Subspace< dim >::fromBasis ( const BitVector< dim > &  v) const
inline

Interprets |v| in the subspace basis and returns external form.

template<size_t dim>
BitVector<dim> atlas::subquotient::Subspace< dim >::mod_image ( const BitVector< dim > &  w) const
inline
template<size_t dim>
void atlas::subquotient::Subspace< dim >::mod_reduce ( BitVector< dim > &  w) const
inline
template<size_t dim>
const size_t atlas::subquotient::Subspace< dim >::rank ( ) const
inline
template<size_t dim>
BitVector< dim > atlas::subquotient::Subspace< dim >::representative ( const BitVector< dim > &  v) const

Return canonical representative of |v| modulo our subspace.

This representative is characterized by the vanishing of its bits in positions |d_support| (the leading bits of the canonical basis of our subspace). Note that we are making no reference to the space from which our subspace is divided out; this could be the whole space $(Z/2Z)^n$ (in any case |r| is expressed in its canonical basis) or some subspace containing our subspace.

The algorithm projects v onto the subspace, the result |pv| being expressed in the canonical basis of the subspace: the coordinates of pv are just the entries of |v| in the coordinates flagged by |d_support|. Then |w| is computed as the corresponding |BitVector| in $(Z/2Z)^n$, given by combining the canonical basis with coefficients from |pv|. Finally we set |r=v-w|.

template<size_t dim>
const BitSet<dim>& atlas::subquotient::Subspace< dim >::support ( ) const
inline
template<size_t dim>
BitSet<dim> atlas::subquotient::Subspace< dim >::support_perp ( ) const
inline
template<size_t dim>
void atlas::subquotient::Subspace< dim >::swap ( Subspace< dim > &  source)
template<size_t dim>
BitVector<dim> atlas::subquotient::Subspace< dim >::toBasis ( BitVector< dim >  v) const
inline

Expresses |v| in the subspace basis.

Member Data Documentation

template<size_t dim>
BitVectorList<dim> atlas::subquotient::Subspace< dim >::d_basis
private

reduced echelon basis

template<size_t dim>
unsigned short int atlas::subquotient::Subspace< dim >::d_rank
private

Dimension of the ambient vector space.

template<size_t dim>
BitSet<dim> atlas::subquotient::Subspace< dim >::d_support
private

pivot (leading nonzero bit) positions


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