Loading...
Searching...
No Matches
TinyMatrix< Type > Class Template Reference

#include <TinyMatrix.h>

Public Member Functions

 TinyMatrix ()
 TinyMatrix (int rows, int columns)
void Allocate (int rows, int columns)
 ~TinyMatrix ()
Type * operator[] (int row)
const Type * operator[] (int row) const

Private Attributes

int r
int c
Type * data

Detailed Description

template<class Type>
class TinyMatrix< Type >

Definition at line 6 of file TinyMatrix.h.

Constructor & Destructor Documentation

◆ TinyMatrix() [1/2]

template<class Type>
TinyMatrix< Type >::TinyMatrix ( )
inline

Definition at line 8 of file TinyMatrix.h.

8{ data = 0; }
Type * data
Definition TinyMatrix.h:21

◆ TinyMatrix() [2/2]

template<class Type>
TinyMatrix< Type >::TinyMatrix ( int rows,
int columns )
inline

Definition at line 9 of file TinyMatrix.h.

void Allocate(int rows, int columns)
Definition TinyMatrix.h:10

◆ ~TinyMatrix()

template<class Type>
TinyMatrix< Type >::~TinyMatrix ( )
inline

Definition at line 15 of file TinyMatrix.h.

15{ delete[] data; }

Member Function Documentation

◆ Allocate()

template<class Type>
void TinyMatrix< Type >::Allocate ( int rows,
int columns )
inline

Definition at line 10 of file TinyMatrix.h.

10 {
11 r = rows;
12 c = columns;
13 data = new Type[r * c];
14 }

◆ operator[]() [1/2]

template<class Type>
Type * TinyMatrix< Type >::operator[] ( int row)
inline

Definition at line 16 of file TinyMatrix.h.

16{ return data + c * row; }

◆ operator[]() [2/2]

template<class Type>
const Type * TinyMatrix< Type >::operator[] ( int row) const
inline

Definition at line 17 of file TinyMatrix.h.

17{ return data + c * row; }

Member Data Documentation

◆ c

template<class Type>
int TinyMatrix< Type >::c
private

Definition at line 20 of file TinyMatrix.h.

◆ data

template<class Type>
Type* TinyMatrix< Type >::data
private

Definition at line 21 of file TinyMatrix.h.

◆ r

template<class Type>
int TinyMatrix< Type >::r
private

Definition at line 20 of file TinyMatrix.h.


The documentation for this class was generated from the following file:
  • /home/runner/work/eOn/eOn/include/eon/potentials/EMT/Asap/TinyMatrix.h