SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
Public Member Functions | Protected Attributes | List of all members
Matrix< T > Class Template Reference

A class representing a matrix, stored in the machine's free space. More...

#include <types_basic.hpp>

Inheritance diagram for Matrix< T >:
Inheritance graph
Collaboration diagram for Matrix< T >:
Collaboration graph

Public Member Functions

 Matrix ()
 Constructs an empty Matrix with no elements. Needs to be initialized first (init).
 
 Matrix (size_t cols, size_t rows)
 Constructs a Matrix with 'cols' * 'rows' elements.
 
 Matrix (size_t cols, size_t rows, T initVal)
 Constructs a Matrix with 'cols' * 'rows' elements and fills it with 'initVal'.
 
 Matrix (Matrix &&other)
 Move constructor.
 
Matrixoperator= (Matrix &&other)
 Move assignment operator.
 
virtual ~Matrix ()
 Empty destructor.
 
virtual size_t cols () const
 Returns number of columns.
 
virtual size_t rows () const
 Returns number of rows.
 
virtual void init (size_t cols, size_t rows)
 Initializes the matrix with a specified number of cols and rows.
 
virtual void init (size_t cols, size_t rows, T initVal)
 Initializes the matrix with a specified number of cols and rows and fills it with 'val'.
 
virtual T * data ()
 Returns a pointer to the contained data.
 
virtual const T * data () const
 Returns a const pointer to the contained data.
 
virtual size_t length () const
 Returns number of elements in the container.
 
virtual size_t size () const
 Returns the size of the contained data (i.e. length * sizeof(T))
 
virtual void fill (T val)
 Fills the container with the 'val'.
 
virtual T & operator() (size_t col, size_t row)
 Accesses an element in the matrix. Doesn't check for bounds.
 
virtual const T & operator() (size_t col, size_t row) const
 Accesses an element in the matrix. Doesn't check for bounds.
 
- Public Member Functions inherited from MatrixType< T >
virtual ~MatrixType ()
 Empty destructor.
 
- Public Member Functions inherited from ArrayType< T >
virtual ~ArrayType ()
 Empty destructor.
 
- Public Member Functions inherited from DataType
virtual ~DataType ()
 Empty destructor.
 

Protected Attributes

Vector< T > m_vector
 A Matrix is composed using a large Vector.
 
size_t m_cols
 Number of columns.
 
size_t m_rows
 Number of rows.
 

Additional Inherited Members

- Protected Member Functions inherited from MatrixType< T >
 MatrixType ()
 Protected constructor.
 
- Protected Member Functions inherited from ArrayType< T >
 ArrayType ()
 Protected constructor.
 
- Protected Member Functions inherited from DataType
 DataType ()
 Protected constructor.
 

Detailed Description

template<class T>
class Matrix< T >

A class representing a matrix, stored in the machine's free space.


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