SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
DenseMatrixGeneric< T > Class Template Reference

#include <DenseMatrix.h>

Inheritance diagram for DenseMatrixGeneric< T >:
Matrix< T > MatrixBase MatrixInterface< T > PropertyManager Persistent

Public Member Functions

 DenseMatrixGeneric ()
 Constructors. More...
 
 DenseMatrixGeneric (size_type r, size_type c)
 
 DenseMatrixGeneric (size_type r, size_type c, T value)
 
 DenseMatrixGeneric (const DenseMatrixGeneric &)
 
 DenseMatrixGeneric (T scalar)
 
 DenseMatrixGeneric (const Transform &t)
 
 DenseMatrixGeneric (const Vector &vec)
 
 DenseMatrixGeneric (const Point &pnt)
 
 DenseMatrixGeneric (const Tensor &tens)
 
virtual ~DenseMatrixGeneric ()
 Destructor. More...
 
virtual DenseMatrixGenericclone () const
 Public member functions. More...
 
DenseMatrixGenericoperator= (const DenseMatrixGeneric &)
 assignment operator More...
 
virtual DenseMatrixdense ()
 Convert this matrix to the specified type. More...
 
virtual SparseRowMatrixsparse ()
 
virtual ColumnMatrixcolumn ()
 
virtual DenseColMajMatrixdense_col_maj ()
 
virtual T * get_data_pointer () const
 
virtual size_type get_data_size () const
 
virtual void zero ()
 slow setters/getter for polymorphic operations More...
 
virtual T get (index_type r, index_type c) const
 
virtual void put (index_type r, index_type c, T val)
 
virtual void add (index_type r, index_type c, T val)
 
virtual T min ()
 
virtual T max ()
 
virtual int compute_checksum ()
 
virtual void getRowNonzerosNoCopy (index_type r, size_type &size, index_type &stride, index_type *&cols, T *&vals)
 
virtual DenseMatrixGenericmake_transpose () const
 
virtual void mult (const ColumnMatrix &x, ColumnMatrix &b, index_type beg=-1, index_type end=-1, int spVec=0) const
 
virtual void mult_transpose (const ColumnMatrix &x, ColumnMatrix &b, index_type beg=-1, index_type end=-1, int spVec=0) const
 
virtual MatrixHandle submatrix (index_type r1, index_type c1, index_type r2, index_type c2)
 
void multiply (ColumnMatrix &x, ColumnMatrix &b) const
 
sumOfCol (index_type)
 
sumOfRow (index_type)
 
T * operator[] (index_type r)
 fast accessors More...
 
T const * operator[] (index_type r) const
 
T ** get_raw_2D_pointer () const
 
T & operator() (index_type i, index_type j)
 
const T & operator() (index_type i, index_type j) const
 
virtual bool invert ()
 return false if not invertible. More...
 
void transpose_square_in_place ()
 
determinant ()
 throws an assertion if not square More...
 
virtual void print (std::string &) const
 
virtual std::string dynamic_type_name () const
 Persistent representation... More...
 
virtual void io (Piostream &)
 
- Public Member Functions inherited from Matrix< T >
virtual ~Matrix ()
 
size_type nrows () const
 
size_type ncols () const
 
T * begin () const
 
T * end () const
 
size_type number_of_nonzero_elements () const
 
virtual bool is_zero () const
 
virtual void scalar_multiply (T s)
 
- Public Member Functions inherited from MatrixBase
 MatrixBase ()
 
void set_raw (bool v)
 
bool get_raw () const
 
void set_raw_filename (const std::string &f)
 
const std::string get_raw_filename () const
 
- Public Member Functions inherited from PropertyManager
 PropertyManager ()
 
 PropertyManager (const PropertyManager &copy)
 
virtual ~PropertyManager ()
 
PropertyManageroperator= (const PropertyManager &pm)
 
void copy_properties (const PropertyManager *src)
 
bool operator== (const PropertyManager &pm)
 
bool operator!= (const PropertyManager &pm)
 
template<class T >
void set_property (const std::string &, const T &, bool is_transient)
 
template<class T >
bool get_property (const std::string &, T &)
 
bool is_property (const std::string &)
 
std::string get_property_name (size_t index)
 
virtual void freeze ()
 – mutability – More...
 
virtual void thaw ()
 thaw will remove all transient properties from the PropertyManager. More...
 
bool is_frozen () const
 query frozen state of a PropertyManager. More...
 
void remove_property (const std::string &)
 
size_t nproperties () const
 
const std::map< std::string,
PropertyBase * > & 
properties () const
 
void set_name (const std::string &name)
 
std::string get_name ()
 
- Public Member Functions inherited from Persistent
virtual ~Persistent ()
 
- Public Member Functions inherited from MatrixInterface< T >
virtual ~MatrixInterface ()
 

Static Public Member Functions

static DenseMatrixGenericidentity (size_type size)
 
static DenseMatrixGenericzero_matrix (size_type rows, size_type cols)
 
static DenseMatrixmake_diagonal_from_column (const ColumnMatrix &column, size_type rows, size_type cols)
 
- Static Public Member Functions inherited from Persistent
static PersistentTypeIDPtr find_derived (const std::string &classname, const std::string &basename)
 
static bool is_base_of (const std::string &parent, const std::string &type)
 
static void add_class (const std::string &type, const std::string &parent, Persistent *(*maker)(), Persistent *(*bc_maker1)()=0, Persistent *(*bc_maker2)()=0)
 
static void add_mesh_class (const std::string &type, Persistent *(*maker)(), Persistent *(*bc_maker1)()=0, Persistent *(*bc_maker2)()=0)
 
static void add_field_class (const std::string &type, Persistent *(*maker)(), Persistent *(*bc_maker1)()=0, Persistent *(*bc_maker2)()=0)
 

Static Public Attributes

static PersistentTypeID type_id
 
- Static Public Attributes inherited from Matrix< T >
static PersistentTypeID type_id
 
- Static Public Attributes inherited from MatrixBase
static PersistentTypeID type_id
 
- Static Public Attributes inherited from PropertyManager
static PersistentTypeID type_id
 

Friends

SCISHARE friend void Mult (DenseMatrix &, const DenseMatrix &, const DenseMatrix &)
 Friend functions. More...
 

Additional Inherited Members

- Public Types inherited from Matrix< T >
typedef T element_type
 
- Protected Member Functions inherited from Matrix< T >
 Matrix (size_type nrows=0, size_type ncols=0)
 
- Protected Member Functions inherited from PropertyManager
void clear_transient ()
 A frozen PropertyManager may store transient data. More...
 
- Protected Attributes inherited from Matrix< T >
size_type nrows_
 
size_type ncols_
 
- Protected Attributes inherited from MatrixBase
bool separate_raw_
 
std::string raw_filename_
 
- Protected Attributes inherited from PropertyManager
bool frozen_
 
Core::Thread::Mutex lock
 

Constructor & Destructor Documentation

Constructors.

constructors

DenseMatrixGeneric ( size_type  r,
size_type  c,
value 
)
DenseMatrixGeneric ( scalar)
explicit
DenseMatrixGeneric ( const Transform t)
explicit
DenseMatrixGeneric ( const Vector vec)
explicit
DenseMatrixGeneric ( const Point pnt)
explicit
DenseMatrixGeneric ( const Tensor tens)
explicit
~DenseMatrixGeneric ( )
virtual

Destructor.

Member Function Documentation

void add ( index_type  r,
index_type  c,
val 
)
virtual

Implements Matrix< T >.

DenseMatrixGeneric< T > * clone ( ) const
virtual

Public member functions.

Implements Matrix< T >.

ColumnMatrix * column ( )
virtual

Implements Matrix< T >.

int compute_checksum ( )
virtual

Implements Matrix< T >.

DenseMatrix * dense ( )
virtual

Convert this matrix to the specified type.

Implements Matrix< T >.

DenseColMajMatrix * dense_col_maj ( )
virtual

Implements Matrix< T >.

T determinant ( )

throws an assertion if not square

std::string dynamic_type_name ( ) const
virtual

Persistent representation...

Reimplemented from Matrix< T >.

T get ( index_type  r,
index_type  c 
) const
virtual

Implements Matrix< T >.

T * get_data_pointer ( ) const
virtual

Implements Matrix< T >.

size_type get_data_size ( ) const
virtual

Implements Matrix< T >.

T** get_raw_2D_pointer ( ) const
inline
void getRowNonzerosNoCopy ( index_type  r,
size_type size,
index_type stride,
index_type *&  cols,
T *&  vals 
)
virtual

Implements Matrix< T >.

DenseMatrixGeneric< T > * identity ( size_type  size)
static
bool invert ( )
virtual

return false if not invertible.

Todo:
: this needs to be refactored

Reimplemented from Matrix< T >.

void io ( Piostream stream)
virtual

Reimplemented from MatrixBase.

DenseMatrix * make_diagonal_from_column ( const ColumnMatrix column,
size_type  rows,
size_type  cols 
)
static
DenseMatrixGeneric< T > * make_transpose ( ) const
virtual

Implements Matrix< T >.

T max ( )
virtual

Implements Matrix< T >.

T min ( )
virtual

Implements Matrix< T >.

void mult ( const ColumnMatrix x,
ColumnMatrix b,
index_type  beg = -1,
index_type  end = -1,
int  spVec = 0 
) const
virtual

Implements Matrix< T >.

void mult_transpose ( const ColumnMatrix x,
ColumnMatrix b,
index_type  beg = -1,
index_type  end = -1,
int  spVec = 0 
) const
virtual

Implements Matrix< T >.

void multiply ( ColumnMatrix x,
ColumnMatrix b 
) const
T& operator() ( index_type  i,
index_type  j 
)
inline
const T& operator() ( index_type  i,
index_type  j 
) const
inline
DenseMatrixGeneric< T > & operator= ( const DenseMatrixGeneric< T > &  m)

assignment operator

T* operator[] ( index_type  r)
inline

fast accessors

T const* operator[] ( index_type  r) const
inline
void print ( std::string &  str) const
virtual

Reimplemented from MatrixBase.

void put ( index_type  r,
index_type  c,
val 
)
virtual

Implements Matrix< T >.

SparseRowMatrix * sparse ( )
virtual

Implements Matrix< T >.

MatrixHandle submatrix ( index_type  r1,
index_type  c1,
index_type  r2,
index_type  c2 
)
virtual

Implements Matrix< T >.

T sumOfCol ( index_type  n)
T sumOfRow ( index_type  n)
void transpose_square_in_place ( )
void zero ( )
virtual

slow setters/getter for polymorphic operations

Implements Matrix< T >.

DenseMatrixGeneric< T > * zero_matrix ( size_type  rows,
size_type  cols 
)
static

Friends And Related Function Documentation

SCISHARE friend void Mult ( DenseMatrix out,
const DenseMatrix m1,
const DenseMatrix m2 
)
friend

Friend functions.

Member Data Documentation

PersistentTypeID type_id
static

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