MyraMath
Public Types | Public Member Functions | List of all members
myra::PivotMatrix< Number > Class Template Reference

A mostly-identity matrix type, with the occasional Matrix22 at a specific diagonal offset (n,n). More...

#include <PivotMatrix.h>

Public Types

typedef std::vector< int > Offsets
 Useful typedefs.
 
typedef Matrix22< Number > Pivot
 
typedef std::vector< PivotPivots
 
typedef MatrixRange< Number > Range
 
typedef CMatrixRange< Number > CRange
 

Public Member Functions

 PivotMatrix ()
 Default constructor, makes size 0x0 empty PivotMatrix.
 
 PivotMatrix (int in_N)
 Initializes to identity matrix of size N.
 
 PivotMatrix (const PivotMatrix< Number > &that)
 Copy constructor.
 
void swap (PivotMatrix< Number > &that)
 Member swap.
 
PivotMatrix< Number > & operator= (PivotMatrix that)
 Copy-assignment operator.
 
 PivotMatrix (InputStream &in)
 InputStream constructor, complements write(OutputStream) method.
 
void write (OutputStream &out) const
 Writes to OutputStream, complements InputStream constructor.
 
Matrix22< Number > & operator[] (int n)
 Inserts new 2x2 block at offset n.
 
void push_back (const PivotMatrix< Number > &that)
 Enlarges *this PivotMatrix by appending that one.
 
void conjugate ()
 Applies conjugate to *this.
 
void transpose ()
 Applies transpose to *this.
 
void hermitian ()
 Applies hermitian transpose to *this.
 
void reverse ()
 Applies reverse operation to this (fliplr then flipud).
 
void solve (const Range &B, char side, char op) const
 Solves op(A)*X=B or X*op(A)=B, overwrites B with X.
 
void multiply (const Range &B, char side, char op) const
 Multiplies op(A)*B=X or B*op(A)=X, overwrites B with X.
 
Matrix< Number > make_Matrix () const
 Returns equivalent Matrix.
 

Detailed Description

template<class Number>
class myra::PivotMatrix< Number >

A mostly-identity matrix type, with the occasional Matrix22 at a specific diagonal offset (n,n).


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