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

#include <Matrix.h>

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

Public Types

typedef T element_type
 

Public Member Functions

virtual ~Matrix ()
 
virtual Matrixclone () const =0
 Make a duplicate, needed to support detach from LockingHandle. More...
 
virtual DenseMatrixdense ()=0
 Convert this matrix to the specified type. More...
 
virtual SparseRowMatrixGeneric
< T > * 
sparse ()=0
 
virtual ColumnMatrixGeneric< T > * column ()=0
 
virtual
DenseColMajMatrixGeneric< T > * 
dense_col_maj ()=0
 
size_type nrows () const
 
size_type ncols () const
 
virtual bool invert ()
 return false if not invertible. More...
 
virtual T * get_data_pointer () const =0
 
virtual size_type get_data_size () const =0
 
T * begin () const
 
T * end () const
 
virtual void zero ()=0
 
virtual T get (index_type r, index_type c) const =0
 
virtual void put (index_type r, index_type c, T val)=0
 
virtual void add (index_type r, index_type c, T val)=0
 
virtual T min ()=0
 
virtual T max ()=0
 
virtual int compute_checksum ()=0
 
size_type number_of_nonzero_elements () const
 
virtual bool is_zero () const
 
virtual void getRowNonzerosNoCopy (index_type r, index_type &size, index_type &stride, index_type *&cols, T *&vals)=0
 
virtual Matrix< T > * make_transpose () const =0
 
virtual void mult (const ColumnMatrix &x, ColumnMatrix &b, index_type beg=-1, index_type end=-1, int spVec=0) const =0
 
virtual void mult_transpose (const ColumnMatrix &x, ColumnMatrix &b, index_type beg=-1, index_type end=-1, int spVec=0) const =0
 
virtual MatrixHandle submatrix (index_type r1, index_type c1, index_type r2, index_type c2)=0
 
virtual std::string dynamic_type_name () 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
 
virtual void print (std::string &) const
 
virtual void io (Piostream &)
 
- 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 Attributes

static PersistentTypeID type_id
 
- Static Public Attributes inherited from MatrixBase
static PersistentTypeID type_id
 
- Static Public Attributes inherited from PropertyManager
static PersistentTypeID type_id
 

Protected Member Functions

 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

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
 

Additional Inherited Members

- 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)
 

Member Typedef Documentation

typedef T element_type

Constructor & Destructor Documentation

Matrix ( size_type  nrows = 0,
size_type  ncols = 0 
)
inlineprotected
virtual ~Matrix ( )
inlinevirtual

Member Function Documentation

virtual void add ( index_type  r,
index_type  c,
val 
)
pure virtual
T* begin ( ) const
inline
virtual Matrix* clone ( ) const
pure virtual

Make a duplicate, needed to support detach from LockingHandle.

Implemented in SparseRowMatrixGeneric< T >, DenseColMajMatrixGeneric< T >, DenseMatrixGeneric< T >, and ColumnMatrixGeneric< T >.

virtual ColumnMatrixGeneric<T>* column ( )
pure virtual
virtual int compute_checksum ( )
pure virtual
virtual DenseMatrix* dense ( )
pure virtual

Convert this matrix to the specified type.

Implemented in SparseRowMatrixGeneric< T >, DenseColMajMatrixGeneric< T >, DenseMatrixGeneric< T >, and ColumnMatrixGeneric< T >.

virtual DenseColMajMatrixGeneric<T>* dense_col_maj ( )
pure virtual
virtual std::string dynamic_type_name ( ) const
inlinevirtual
T* end ( ) const
inline
virtual T get ( index_type  r,
index_type  c 
) const
pure virtual
virtual T* get_data_pointer ( ) const
pure virtual
virtual size_type get_data_size ( ) const
pure virtual
virtual void getRowNonzerosNoCopy ( index_type  r,
index_type size,
index_type stride,
index_type *&  cols,
T *&  vals 
)
pure virtual
virtual bool invert ( )
inlinevirtual

return false if not invertible.

Reimplemented in DenseMatrixGeneric< T >.

virtual bool is_zero ( ) const
inlinevirtual

Reimplemented in SparseRowMatrixGeneric< T >.

virtual Matrix<T>* make_transpose ( ) const
pure virtual
virtual T max ( )
pure virtual
virtual T min ( )
pure virtual
virtual void mult ( const ColumnMatrix< T > &  x,
ColumnMatrix< T > &  b,
index_type  beg = -1,
index_type  end = -1,
int  spVec = 0 
) const
pure virtual
virtual void mult_transpose ( const ColumnMatrix< T > &  x,
ColumnMatrix< T > &  b,
index_type  beg = -1,
index_type  end = -1,
int  spVec = 0 
) const
pure virtual
size_type ncols ( ) const
inlinevirtual

Implements MatrixInterface< T >.

size_type nrows ( ) const
inlinevirtual

Implements MatrixInterface< T >.

size_type number_of_nonzero_elements ( ) const
inline
virtual void put ( index_type  r,
index_type  c,
val 
)
pure virtual
virtual void scalar_multiply ( s)
inlinevirtual
virtual SparseRowMatrixGeneric<T>* sparse ( )
pure virtual
virtual MatrixHandle submatrix ( index_type  r1,
index_type  c1,
index_type  r2,
index_type  c2 
)
pure virtual
virtual void zero ( )
pure virtual

Member Data Documentation

size_type ncols_
protected
size_type nrows_
protected
PersistentTypeID type_id
static

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