|
MyraMath
|
Represents a Permutation matrix, used to reorder rows/columns/etc of various numeric containers. More...
#include <Permutation.h>
Classes | |
| class | ipermTag |
| class | permTag |
| class | swapsTag |
Public Member Functions | |
| Permutation () | |
| Default constructor, makes size 0x0 empty Permutation. | |
| Permutation (const Permutation &that) | |
| Copy constructor. | |
| void | swap (Permutation &that) |
| Member swap. | |
| Permutation (Permutation &&that) | |
| Move constructor, default construct and swap idiom. | |
| Permutation & | operator= (Permutation that) |
| Copy-assignment operator, copy construct and swap idiom. | |
| Permutation (InputStream &in) | |
| InputStream constructor, complements write(OutputStream) method. | |
| void | write (OutputStream &out) const |
| Writes to OutputStream, complements InputStream constructor. | |
| ~Permutation () | |
| Releases internal resources. | |
| int | size () const |
| Size inspector. | |
| template<class Number > | |
| SparseMatrix< Number > | make_SparseMatrix () const |
| Returns a SparseMatrix equivalent to *this Permutation. | |
| void | verify () const |
| Performs various checks. Throws if there's a problem. | |
| template<> | |
| SparseMatrix< NumberS > | make_SparseMatrix () const |
| template<> | |
| SparseMatrix< NumberD > | make_SparseMatrix () const |
| template<> | |
| SparseMatrix< NumberC > | make_SparseMatrix () const |
| template<> | |
| SparseMatrix< NumberZ > | make_SparseMatrix () const |
| template<> | |
| SparseMatrix< NumberS > | make_SparseMatrix () const |
| template<> | |
| SparseMatrix< NumberD > | make_SparseMatrix () const |
| template<> | |
| SparseMatrix< NumberC > | make_SparseMatrix () const |
| template<> | |
| SparseMatrix< NumberZ > | make_SparseMatrix () const |
| Permutation (const intCRange &perm, const permTag &) | |
| Constructs a Permutation from one of its components, either perm[], iperm[], or swaps[]. | |
| Permutation (const intCRange &iperm, const ipermTag &) | |
| Constructs a Permutation from one of its components, either perm[], iperm[], or swaps[]. | |
| Permutation (const intCRange &swaps, const swapsTag &) | |
| Constructs a Permutation from one of its components, either perm[], iperm[], or swaps[]. | |
| const intCRange | perm () const |
| Returns perm[], a forward permutation. | |
| int | perm (int n) const |
| Returns perm[], a forward permutation. | |
| const intCRange | iperm () const |
| Returns iperm[], an inverse permutation. | |
| int | iperm (int n) const |
| Returns iperm[], an inverse permutation. | |
| const intCRange | swaps () const |
| Returns swaps[], a swap sequence that applies perm[]. | |
| int | swaps (int n) const |
| Returns swaps[], a swap sequence that applies perm[]. | |
Static Public Member Functions | |
| static Permutation | identity (int N) |
| Generates an identity Matrix of specified size. | |
| static Permutation | random (int N) |
| Generates a random Matrix of specified size. | |
| static Permutation | from_perm (const intCRange &perm) |
| Delegates to one of the tagged constructors above. | |
| static Permutation | from_iperm (const intCRange &iperm) |
| Delegates to one of the tagged constructors above. | |
| static Permutation | from_swaps (const intCRange &swaps) |
| Delegates to one of the tagged constructors above. | |
Represents a Permutation matrix, used to reorder rows/columns/etc of various numeric containers.
1.8.13