NEURON
OcMatrix Class Reference

#include <ocmatrix.h>

Inheritance diagram for OcMatrix:
OcFullMatrix OcSparseMatrix

Public Types

enum  { MFULL = 1 , MSPARSE , MBAND }
 

Public Member Functions

virtual ~OcMatrix ()=default
 
double * mep (int i, int j)
 
double operator() (int i, int j) const
 
virtual double & coeff (int i, int j)
 
double & operator() (int i, int j)
 
virtual double getval (int i, int j) const
 
virtual int nrow () const
 
virtual int ncol () const
 
virtual void resize (int, int)
 
virtual std::vector< std::pair< int, int > > nonzeros () const
 
OcFullMatrixfull ()
 
void mulv (Vect &in, Vect &out) const
 
virtual void mulv (Vect *in, Vect *out) const
 
virtual void mulm (Matrix *in, Matrix *out) const
 
virtual void muls (double, Matrix *out) const
 
virtual void add (Matrix *, Matrix *out) const
 
virtual void getrow (int, Vect *out) const
 
virtual void getcol (int, Vect *out) const
 
virtual void getdiag (int, Vect *out) const
 
virtual void setrow (int, Vect *in)
 
virtual void setcol (int, Vect *in)
 
virtual void setdiag (int, Vect *in)
 
virtual void setrow (int, double in)
 
virtual void setcol (int, double in)
 
virtual void setdiag (int, double in)
 
virtual void zero ()
 
virtual void ident ()
 
virtual void exp (Matrix *out) const
 
virtual void pow (int, Matrix *out) const
 
virtual void inverse (Matrix *out) const
 
virtual void solv (Vect *vin, Vect *vout, bool use_lu)
 
virtual void copy (Matrix *out) const
 
virtual void bcopy (Matrix *mout, int i0, int j0, int n0, int m0, int i1, int j1) const
 
virtual void transpose (Matrix *out)
 
virtual void symmeigen (Matrix *mout, Vect *vout) const
 
virtual void svd1 (Matrix *u, Matrix *v, Vect *d) const
 
virtual double det (int *e) const
 
virtual int sprowlen (int) const
 
virtual double spgetrowval (int i, int jindx, int *j) const
 
void unimp () const
 

Static Public Member Functions

static OcMatrixinstance (int nrow, int ncol, int type=MFULL)
 

Public Attributes

Objectobj_ {}
 

Protected Member Functions

 OcMatrix (int type)
 

Private Attributes

int type_ {}
 

Detailed Description

Definition at line 18 of file ocmatrix.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
MFULL 
MSPARSE 
MBAND 

Definition at line 20 of file ocmatrix.h.

Constructor & Destructor Documentation

◆ ~OcMatrix()

virtual OcMatrix::~OcMatrix ( )
virtualdefault

◆ OcMatrix()

OcMatrix::OcMatrix ( int  type)
protected

Definition at line 24 of file ocmatrix.cpp.

Member Function Documentation

◆ add()

virtual void OcMatrix::add ( Matrix ,
Matrix out 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 76 of file ocmatrix.h.

◆ bcopy()

virtual void OcMatrix::bcopy ( Matrix mout,
int  i0,
int  j0,
int  n0,
int  m0,
int  i1,
int  j1 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 127 of file ocmatrix.h.

◆ coeff()

virtual double& OcMatrix::coeff ( int  i,
int  j 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 34 of file ocmatrix.h.

◆ copy()

virtual void OcMatrix::copy ( Matrix out) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 124 of file ocmatrix.h.

◆ det()

virtual double OcMatrix::det ( int *  e) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 139 of file ocmatrix.h.

◆ exp()

virtual void OcMatrix::exp ( Matrix out) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 112 of file ocmatrix.h.

◆ full()

OcFullMatrix * OcMatrix::full ( )

Definition at line 53 of file ocmatrix.cpp.

◆ getcol()

virtual void OcMatrix::getcol ( int  ,
Vect out 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 82 of file ocmatrix.h.

◆ getdiag()

virtual void OcMatrix::getdiag ( int  ,
Vect out 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 85 of file ocmatrix.h.

◆ getrow()

virtual void OcMatrix::getrow ( int  ,
Vect out 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 79 of file ocmatrix.h.

◆ getval()

virtual double OcMatrix::getval ( int  i,
int  j 
) const
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 44 of file ocmatrix.h.

◆ ident()

virtual void OcMatrix::ident ( )
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 109 of file ocmatrix.h.

◆ instance()

OcMatrix * OcMatrix::instance ( int  nrow,
int  ncol,
int  type = MFULL 
)
static

Definition at line 27 of file ocmatrix.cpp.

◆ inverse()

virtual void OcMatrix::inverse ( Matrix out) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 118 of file ocmatrix.h.

◆ mep()

double* OcMatrix::mep ( int  i,
int  j 
)
inline

Definition at line 26 of file ocmatrix.h.

◆ mulm()

virtual void OcMatrix::mulm ( Matrix in,
Matrix out 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 70 of file ocmatrix.h.

◆ muls()

virtual void OcMatrix::muls ( double  ,
Matrix out 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 73 of file ocmatrix.h.

◆ mulv() [1/2]

void OcMatrix::mulv ( Vect in,
Vect out 
) const
inline

Definition at line 64 of file ocmatrix.h.

◆ mulv() [2/2]

virtual void OcMatrix::mulv ( Vect in,
Vect out 
) const
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 67 of file ocmatrix.h.

◆ ncol()

virtual int OcMatrix::ncol ( ) const
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 52 of file ocmatrix.h.

◆ nonzeros()

std::vector< std::pair< int, int > > OcMatrix::nonzeros ( ) const
virtual

Reimplemented in OcSparseMatrix.

Definition at line 41 of file ocmatrix.cpp.

◆ nrow()

virtual int OcMatrix::nrow ( ) const
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 48 of file ocmatrix.h.

◆ operator()() [1/2]

double& OcMatrix::operator() ( int  i,
int  j 
)
inline

Definition at line 40 of file ocmatrix.h.

◆ operator()() [2/2]

double OcMatrix::operator() ( int  i,
int  j 
) const
inline

Definition at line 30 of file ocmatrix.h.

◆ pow()

virtual void OcMatrix::pow ( int  ,
Matrix out 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 115 of file ocmatrix.h.

◆ resize()

virtual void OcMatrix::resize ( int  ,
int   
)
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 56 of file ocmatrix.h.

◆ setcol() [1/2]

virtual void OcMatrix::setcol ( int  ,
double  in 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 100 of file ocmatrix.h.

◆ setcol() [2/2]

virtual void OcMatrix::setcol ( int  ,
Vect in 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 91 of file ocmatrix.h.

◆ setdiag() [1/2]

virtual void OcMatrix::setdiag ( int  ,
double  in 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 103 of file ocmatrix.h.

◆ setdiag() [2/2]

virtual void OcMatrix::setdiag ( int  ,
Vect in 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 94 of file ocmatrix.h.

◆ setrow() [1/2]

virtual void OcMatrix::setrow ( int  ,
double  in 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 97 of file ocmatrix.h.

◆ setrow() [2/2]

virtual void OcMatrix::setrow ( int  ,
Vect in 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 88 of file ocmatrix.h.

◆ solv()

virtual void OcMatrix::solv ( Vect vin,
Vect vout,
bool  use_lu 
)
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 121 of file ocmatrix.h.

◆ spgetrowval()

virtual double OcMatrix::spgetrowval ( int  i,
int  jindx,
int *  j 
) const
inlinevirtual

Reimplemented in OcSparseMatrix.

Definition at line 147 of file ocmatrix.h.

◆ sprowlen()

virtual int OcMatrix::sprowlen ( int  ) const
inlinevirtual

Reimplemented in OcSparseMatrix.

Definition at line 143 of file ocmatrix.h.

◆ svd1()

virtual void OcMatrix::svd1 ( Matrix u,
Matrix v,
Vect d 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 136 of file ocmatrix.h.

◆ symmeigen()

virtual void OcMatrix::symmeigen ( Matrix mout,
Vect vout 
) const
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 133 of file ocmatrix.h.

◆ transpose()

virtual void OcMatrix::transpose ( Matrix out)
inlinevirtual

Reimplemented in OcFullMatrix.

Definition at line 130 of file ocmatrix.h.

◆ unimp()

void OcMatrix::unimp ( ) const

Definition at line 37 of file ocmatrix.cpp.

◆ zero()

virtual void OcMatrix::zero ( )
inlinevirtual

Reimplemented in OcSparseMatrix, and OcFullMatrix.

Definition at line 106 of file ocmatrix.h.

Member Data Documentation

◆ obj_

Object* OcMatrix::obj_ {}

Definition at line 158 of file ocmatrix.h.

◆ type_

int OcMatrix::type_ {}
private

Definition at line 161 of file ocmatrix.h.


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