HLIBpro  2.4
Public Member Functions | List of all members
TPermutation Class Reference

Describes permutation of index sets.

#include <TPermutation.hh>

Inheritance diagram for TPermutation:

Public Member Functions

 TPermutation (const size_t asize=0)
 construct permutation of size asize
 
 TPermutation (const std::vector< idx_t > &perm)
 construct permutation with data defined by array perm
 
 TPermutation (const TPermutation &perm)
 copy ctor
 
virtual ~TPermutation ()
 dtor
 
idx_t permute (const idx_t idx) const
 permute given index
 
void permute (const TVector *x, TVector *y) const
 reorder given vector x and write result to y
 
void permute_inv (const TVector *x, TVector *y) const
 use inverse permutation to reorder given vector x and write result to y
 
void permute (TVector *x) const
 permute given vector inplace
 
void permute_inv (TVector *x) const
 apply inverse permutation to given vector
 
void invert ()
 invert permutation
 
TPermutation inverse ()
 return inverse permutation
 
virtual void read (TByteStream &s)
 read object data from bytestream s
 
virtual void write (TByteStream &s) const
 write object data to bytestream s
 
virtual size_t bs_size () const
 returns size of object in bytestream
 
TPermutationoperator= (const TPermutation &perm)
 copy operator
 
TPermutationoperator= (const std::vector< idx_t > &perm)
 copy operator for vector
 
virtual size_t byte_size () const
 return size in bytes used by this object