RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDNumeric::SquareMatrix< TYPE > Class Template Reference

#include <SquareMatrix.h>

Inheritance diagram for RDNumeric::SquareMatrix< TYPE >:
RDNumeric::Matrix< TYPE >

Public Member Functions

 SquareMatrix ()
 brief Square matrix of size N
 
 SquareMatrix (unsigned int N)
 
 SquareMatrix (unsigned int N, TYPE val)
 
 SquareMatrix (unsigned int N, typename Matrix< TYPE >::DATA_SPTR data)
 
SquareMatrix< TYPE > & operator*= (TYPE scale) override
 Multiplication by a scalar.
 
virtual SquareMatrix< TYPE > & operator*= (const SquareMatrix< TYPE > &B)
 In place matrix multiplication.
 
virtual SquareMatrix< TYPE > & transposeInplace ()
 In place matrix transpose.
 
- Public Member Functions inherited from RDNumeric::Matrix< TYPE >
 Matrix (unsigned int nRows, unsigned int nCols)
 Initialize with a size.
 
 Matrix (unsigned int nRows, unsigned int nCols, TYPE val)
 Initialize with a size and default value.
 
 Matrix (unsigned int nRows, unsigned int nCols, DATA_SPTR data)
 Initialize from a pointer.
 
 Matrix (const Matrix< TYPE > &other)
 copy constructor
 
virtual ~Matrix ()
 
unsigned int numRows () const
 returns the number of rows
 
unsigned int numCols () const
 returns the number of columns
 
unsigned int getDataSize () const
 
virtual TYPE getVal (unsigned int i, unsigned int j) const
 returns a particular element of the matrix
 
virtual void setVal (unsigned int i, unsigned int j, TYPE val)
 sets a particular element of the matrix
 
virtual void getRow (unsigned int i, Vector< TYPE > &row) const
 returns a copy of a row of the matrix
 
virtual void getCol (unsigned int i, Vector< TYPE > &col) const
 returns a copy of a column of the matrix
 
TYPE * getData ()
 returns a pointer to our data array
 
const TYPE * getData () const
 returns a const pointer to our data array
 
Matrix< TYPE > & assign (const Matrix< TYPE > &other)
 Copy operator.
 
virtual Matrix< TYPE > & operator+= (const Matrix< TYPE > &other)
 Matrix addition.
 
virtual Matrix< TYPE > & operator-= (const Matrix< TYPE > &other)
 Matrix subtraction.
 
virtual Matrix< TYPE > & operator/= (TYPE scale)
 division by a scalar
 
virtual Matrix< TYPE > & transpose (Matrix< TYPE > &transpose) const
 copies the transpose of this Matrix into another, returns the result
 

Additional Inherited Members

- Public Types inherited from RDNumeric::Matrix< TYPE >
typedef boost::shared_array< TYPE > DATA_SPTR
 
- Protected Member Functions inherited from RDNumeric::Matrix< TYPE >
 Matrix ()
 
- Protected Attributes inherited from RDNumeric::Matrix< TYPE >
unsigned int d_nRows {0}
 
unsigned int d_nCols {0}
 
unsigned int d_dataSize {0}
 
DATA_SPTR d_data
 

Detailed Description

template<typename TYPE>
class RDNumeric::SquareMatrix< TYPE >

Definition at line 18 of file SquareMatrix.h.

Constructor & Destructor Documentation

◆ SquareMatrix() [1/4]

template<typename TYPE >
RDNumeric::SquareMatrix< TYPE >::SquareMatrix ( )
inline

brief Square matrix of size N

Definition at line 21 of file SquareMatrix.h.

◆ SquareMatrix() [2/4]

template<typename TYPE >
RDNumeric::SquareMatrix< TYPE >::SquareMatrix ( unsigned int  N)
inlineexplicit

Definition at line 23 of file SquareMatrix.h.

◆ SquareMatrix() [3/4]

template<typename TYPE >
RDNumeric::SquareMatrix< TYPE >::SquareMatrix ( unsigned int  N,
TYPE  val 
)
inline

Definition at line 25 of file SquareMatrix.h.

◆ SquareMatrix() [4/4]

template<typename TYPE >
RDNumeric::SquareMatrix< TYPE >::SquareMatrix ( unsigned int  N,
typename Matrix< TYPE >::DATA_SPTR  data 
)
inline

Definition at line 27 of file SquareMatrix.h.

Member Function Documentation

◆ operator*=() [1/2]

template<typename TYPE >
virtual SquareMatrix< TYPE > & RDNumeric::SquareMatrix< TYPE >::operator*= ( const SquareMatrix< TYPE > &  B)
inlinevirtual

◆ operator*=() [2/2]

template<typename TYPE >
SquareMatrix< TYPE > & RDNumeric::SquareMatrix< TYPE >::operator*= ( TYPE  scale)
inlineoverridevirtual

Multiplication by a scalar.

Reimplemented from RDNumeric::Matrix< TYPE >.

Definition at line 34 of file SquareMatrix.h.

References RDNumeric::Matrix< TYPE >::operator*=().

◆ transposeInplace()

template<typename TYPE >
virtual SquareMatrix< TYPE > & RDNumeric::SquareMatrix< TYPE >::transposeInplace ( )
inlinevirtual

In place matrix transpose.

Definition at line 68 of file SquareMatrix.h.

References RDNumeric::Matrix< TYPE >::d_data, RDNumeric::Matrix< TYPE >::d_nCols, and RDNumeric::Matrix< TYPE >::d_nRows.


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