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

atlas::setutils::Permutation Struct Reference

#include <setutils.h>

List of all members.

Public Types

typedef std::vector< unsigned
long > 
Base

Public Member Functions

 Permutation ()
 Permutation (unsigned long n)
 Permutation (unsigned long n, int unsused)
 Permutation (const Permutation &pi, int unused)
template<typename I>
 Permutation (I b, I e)
template<typename T>
std::vector< T > pull_back (const std::vector< T > &v) const
template<typename U>
std::vector< U > renumber (const std::vector< U > &v) const
template<typename U>
std::vector< U > renumber (const std::vector< U > &v, U except) const
template<typename T>
void permute (std::vector< T > &v) const


Member Typedef Documentation

typedef std::vector<unsigned long> atlas::setutils::Permutation::Base
 

Definition at line 31 of file setutils.h.


Constructor & Destructor Documentation

atlas::setutils::Permutation::Permutation  )  [inline]
 

Definition at line 32 of file setutils.h.

atlas::setutils::Permutation::Permutation unsigned long  n  )  [inline]
 

Definition at line 33 of file setutils.h.

atlas::setutils::Permutation::Permutation unsigned long  n,
int  unsused
 

Definition at line 26 of file setutils.cpp.

atlas::setutils::Permutation::Permutation const Permutation pi,
int  unused
 

Definition at line 32 of file setutils.cpp.

template<typename I>
atlas::setutils::Permutation::Permutation b,
e
[inline]
 

Definition at line 36 of file setutils.h.


Member Function Documentation

template<typename T>
void atlas::setutils::Permutation::permute std::vector< T > &  v  )  const
 

Applies our permutation |pi| to the vector |v|. In other words, we send each entry v[i] to the new position v[pi[i]]; this means that afterwards for all |i|: |new_v[pi[i]]==old_v[i]|, or equivalently $new_v[i]=old_v[pi^{-1}[i]]$.

Note that this is {not} the same notion of permutation of entries used in the methods above, nor in the |permute| methods of matrices and bitsets; with respect to those we use the inverse permutation

We are able to perform this permutation essentially in-place, using an auxiliary vector<bool>.

Definition at line 79 of file setutils_def.h.

template<typename T>
std::vector< T > atlas::setutils::Permutation::pull_back const std::vector< T > &  v  )  const
 

Definition at line 28 of file setutils_def.h.

Referenced by atlas::kgb::KGBHelp::export_tables().

template<typename U>
std::vector< U > atlas::setutils::Permutation::renumber const std::vector< U > &  v,
except
const
 

Definition at line 57 of file setutils_def.h.

template<typename U>
std::vector< U > atlas::setutils::Permutation::renumber const std::vector< U > &  v  )  const
 

Definition at line 43 of file setutils_def.h.

Referenced by atlas::kgb::KGBHelp::export_tables().


The documentation for this struct was generated from the following files:
Generated on Wed Mar 26 16:53:04 2008 for atlas by  doxygen 1.3.9.1