Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Matrix< D > Class Template Reference

dimensional matrix handeling. When acessed by (x, y), or (x, y, z) operator, index x corresponds to the index of the column, and index y corresponds to the index of the row. This standard comes from text printing order and image display and storage in most of the computer systems. More...

#include <FileImage.hpp>

Collaboration diagram for Bial::Matrix< D >:
Collaboration graph

Public Member Functions

 Matrix ()
 Basic Constructor. More...
 
 Matrix (const Vector< size_t > &size)
 Basic Constructor. More...
 
 Matrix (D *new_data, const Vector< size_t > &new_dim)
 Basic Constructor. This constructor works as a wrapper for data already allocated. It will use the same space pointed by new_data to manipulate the matrix. Use this for compatibility with other data structures, in a easy convertion to Matrix class. More...
 
 Matrix (size_t size_0, size_t size_1)
 Basic Constructor for 2D matrix. More...
 
 Matrix (size_t size_0, size_t size_1, size_t size_2)
 Basic Constructor for 3D matrix. More...
 
 Matrix (const Matrix< D > &mtx)
 Copy constructor. More...
 
 Matrix (Matrix< D > &&)=default
 Move constructor. More...
 
template<class D2 >
 Matrix (const Matrix< D2 > &mtx)
 Copy constructor. More...
 
Matrix< D > & operator= (const Matrix< D > &other)
 Assigns 'other' matrix content to this matrix. More...
 
Matrix< D > & operator= (Matrix< D > &&)=default
 Assigns 'other' matrix content to this matrix, moving the content. More...
 
template<class D2 >
Matrix< D > & operator= (const Matrix< D2 > &other)
 Assigns 'other' matrix content to this matrix. More...
 
template<class D2 >
bool operator== (const Matrix< D2 > &other) const
 The matrices are considered equal if they have the same dimensions and their elements have the same value. More...
 
Matrix< D > & operator++ ()
 Increments all elements of this matrix and returns it. More...
 
Matrix< D > operator++ (int)
 Increments all elements of this matrix and returns it. More...
 
Matrix< D > & operator-- ()
 Decrements all elements of this matrix and returns it. More...
 
Matrix< D > operator-- (int)
 Decrements all elements of this matrix and returns it. More...
 
template<class D2 >
Matrix< D > operator+ (const Matrix< D2 > &other) const
 Computes the sum of the matrices 'this' and other and returns the resultant matrix. More...
 
template<class D2 >
Matrix< D > & operator+= (const Matrix< D2 > &other)
 Computes the sum of the matrices 'this' and other and assigns the result to this. More...
 
Matrix< D > operator- () const
 Computes the negative matrix of 'this' and returns the resultant matrix. More...
 
template<class D2 >
Matrix< D > operator- (const Matrix< D2 > &other) const
 Computes the difference of the matrices 'this' and other and returns the resultant matrix. More...
 
template<class D2 >
Matrix< D > & operator-= (const Matrix< D2 > &other)
 Computes the difference of the matrices 'this' and other and assigns the result to this. More...
 
template<class D2 >
Matrix< D > operator* (const Matrix< D2 > &other) const
 Computes the product of the matrices 'this' and other and returns the resultant matrix. More...
 
template<class D2 >
Matrix< D > & operator*= (const Matrix< D2 > &other)
 Computes the product of the matrices 'this' and other and assigns the result to this. More...
 
Matrix< D > operator+ (double scalar) const
 Computes the sum of 'this' matrix by the scalar. More...
 
Matrix< D > & operator+= (double scalar)
 Updates 'this' matrix with the sum of 'this' by the input scalar. More...
 
Matrix< D > operator- (double scalar) const
 Computes the difference between 'this' matrix and the scalar. More...
 
Matrix< D > & operator-= (double scalar)
 Updates 'this' matrix with the difference between 'this' and the input scalar. More...
 
Matrix< D > operator* (double scalar) const
 Computes the product of 'this' matrix by the scalar. More...
 
Matrix< D > & operator*= (double scalar)
 Updates 'this' matrix with the product of 'this' by the input scalar. More...
 
template<class D2 >
Matrix< D > operator/ (const Matrix< D2 > &other) const
 Computes the division of the matrices 'this' and other and returns the resultant matrix. More...
 
template<class D2 >
Matrix< D > & operator/= (const Matrix< D2 > &other)
 Computes the division of the matrices 'this' and other and assigns the result to this. More...
 
Matrix< D > operator/ (double scalar) const
 Computes the division of 'this' matrix by the scalar. More...
 
Matrix< D > & operator/= (double scalar)
 Updates 'this' matrix with the division of 'this' by the input scalar. More...
 
const D & operator[] (size_t p) const
 Returns a constant reference of data pointed by index p. It has the same effect as operator data( p ). More...
 
D & operator[] (size_t p)
 Returns the reference for data pointed by index p. It has the same effect as operator data( p ). More...
 
const D & operator() (size_t p) const
 Returns constant reference of data pointed by index p. It has the same effect as operator data[ p ]. More...
 
D & operator() (size_t p)
 Returns the reference for data pointed by index p. It has the same effect as operator data[ p ]. More...
 
const D & operator() (size_t p_0, size_t p_1) const
 Returns constant reference of data pointed by index ( p_0, p_1 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] ]. More...
 
D & operator() (size_t p_0, size_t p_1)
 Returns the reference for data pointed by index ( p_0, p_1 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] ]. More...
 
const D & operator() (size_t p_0, size_t p_1, size_t p_2) const
 Returns constant reference of data pointed by index ( p_0, p_1, p_2 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ]. More...
 
D & operator() (size_t p_0, size_t p_1, size_t p_2)
 Returns the reference for data pointed by index ( p_0, p_1, p_2 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ]. More...
 
const D & operator() (size_t p_0, size_t p_1, size_t p_2, size_t p_3) const
 Returns constant reference of data pointed by index ( p_0, p_1, p_2, p_3 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] ]. More...
 
D & operator() (size_t p_0, size_t p_1, size_t p_2, size_t p_3)
 Returns the reference for data pointed by index ( p_0, p_1, p_2, p_3 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] ]. More...
 
const D & operator() (size_t p_0, size_t p_1, size_t p_2, size_t p_3, size_t p_4) const
 Returns constant reference of data pointed by index ( p_0, p_1, p_2, p_3, p_4 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] + p_4 * acc_dim_size[ 3 ] ]. More...
 
D & operator() (size_t p_0, size_t p_1, size_t p_2, size_t p_3, size_t p_4)
 Returns the reference for data pointed by index ( p_0, p_1, p_2, p_3, p_4 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] + p_4 * acc_dim_size[ 3 ] ]. More...
 
const D & operator() (const Vector< size_t > &p) const
 Returns constant reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ]. More...
 
D & operator() (const Vector< size_t > &p)
 Returns the reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ]. More...
 
void Abs ()
 Computes the absolute value of the matrix elements. More...
 
Matrix< D > Abs () const
 Computes the absolute value of the matrix elements. More...
 
std::vector< D >::iterator begin () noexcept
 Returns iterator begin() of data. More...
 
std::vector< D >::const_iterator begin () const noexcept
 Returns const_iterator begin() of data. More...
 
std::vector< D >::iterator end () noexcept
 Returns iterator end() of data. More...
 
std::vector< D >::const_iterator end () const noexcept
 Returns const_iterator end() of data. More...
 
std::vector< D >::reverse_iterator rbegin () noexcept
 Returns the reverse_iterator rbegin() of data Vector. More...
 
std::vector< D >::const_reverse_iterator rbegin () const noexcept
 Returns const_reverse_iterator rbegin() of data Vector. More...
 
std::vector< D >::reverse_iterator rend () noexcept
 Returns reverse_iterator rend() of data Vector. More...
 
std::vector< D >::const_reverse_iterator rend () const noexcept
 Returns const_reverse_iterator rend() of data Vector. More...
 
std::vector< D >::const_iterator cbegin () const noexcept
 Returns the iterator cbegin() of data Vector. More...
 
std::vector< D >::const_iterator cend () const noexcept
 Returns the iterator cend() of data Vector. More...
 
std::vector< D >::const_reverse_iterator crbegin () const noexcept
 Returns the iterator crbegin() of data Vector. More...
 
std::vector< D >::const_reverse_iterator crend () const noexcept
 Returns the iterator crend() of data Vector. More...
 
const D * Data () const
 Returns a reference to data. More...
 
D * Data ()
 Returns a reference to data. More...
 
const D * data () const
 Returns a reference to data. More...
 
D * data ()
 Returns a reference to data. More...
 
size_t Size () const
 Returns size of data Vector. More...
 
size_t size () const
 Returns size of data Vector. Same as Size( ), just for compatibility with std containers. More...
 
size_t Elements () const
 Returns the number of elements of the matrix. Same as Size( ) method. More...
 
size_t Elements (D min, D max) const
 Returns the number of elements counted inside the interval limited by min and max. More...
 
size_t Coordinate (size_t position, size_t dimension) const
 Returns the coordinate of position in given dimension. More...
 
Vector< size_t > Coordinates (size_t position) const
 Returns the coordinates of the input position in this matrix. More...
 
size_t Position (size_t p_0, size_t p_1) const
 Returns the position corresponding to the input coordinates in this matrix. More...
 
size_t Position (size_t p_0, size_t p_1, size_t p_2) const
 Returns the position corresponding to the input coordinates in this matrix. More...
 
size_t Position (size_t p_0, size_t p_1, size_t p_2, size_t p_3) const
 Returns the position corresponding to the input coordinates in this matrix. More...
 
size_t Position (const Vector< size_t > &coordinates) const
 Returns the position corresponding to the input coordinates in this matrix. More...
 
size_t Position (const Vector< int > &coordinates) const
 Returns the position corresponding to the input coordinates in this matrix. More...
 
size_t Position (const Vector< float > &coordinates) const
 Returns the position corresponding to the input coordinates in this matrix. More...
 
void Set (D val)
 Sets val to each element of the matrix. More...
 
Vector< size_t > Dim () const
 Returns a Vector with all matrix dimensions. More...
 
size_t MinDim () const
 Returns the minimum size among all matrix dimensions. More...
 
size_t MaxDim () const
 Returns the maximum size among all matrix dimensions. More...
 
size_t Size (size_t dimension) const
 Returns matrix required dimension. More...
 
size_t size (size_t dimension) const
 Returns matrix required dimension. Just for symmetry with size( ) and Size( ) functions. More...
 
size_t Dims () const
 Returns the number of dimensions of 'this' matrix. More...
 
size_t Displacement (size_t dimension) const
 Returns the position displacement of one unit in dimension i. More...
 
const D & at (size_t p) const
 Reads the constant reverence of value contained at position p of data Vector. More...
 
D & at (size_t p)
 Reads the value contained at position p of data Vector and returns its reference. More...
 
const D & at (size_t p_0, size_t p_1) const
 Reads the constant reverence of value contained at position p_0, p_1 of data Vector. More...
 
D & at (size_t p_0, size_t p_1)
 Reads the value contained at position p_0, p_1 of data Vector and returns its reference. More...
 
const D & at (size_t p_0, size_t p_1, size_t p_2) const
 Reads the constant reverence of value contained at position p_0, p_1, p_2 of data Vector. More...
 
D & at (size_t p_0, size_t p_1, size_t p_2)
 Reads the value contained at position p_0, p_1, p_2 of data Vector and returns its reference. More...
 
const D & at (size_t p_0, size_t p_1, size_t p_2, size_t p_3) const
 Reads the constant reverence of value contained at position p_0, p_1, p_2, p_3 of data Vector. More...
 
D & at (size_t p_0, size_t p_1, size_t p_2, size_t p_3)
 Reads the value contained at position p_0, p_1, p_2, p_3 of data Vector and returns its reference. More...
 
const D & at (size_t p_0, size_t p_1, size_t p_2, size_t p_3, size_t p_4) const
 Reads the constant reverence of value contained at position p_0, p_1, p_2, p_3, p_4 of data Vector. More...
 
D & at (size_t p_0, size_t p_1, size_t p_2, size_t p_3, size_t p_4)
 Reads the value contained at position p_0, p_1, p_2, p_3, p_4 of data Vector and returns its reference. More...
 
const D & at (const Vector< size_t > &p) const
 Returns constant reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * acc_dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ]. More...
 
D & at (const Vector< size_t > &p)
 Returns constant reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * acc_dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ]. More...
 
bool ValidElement (const Vector< size_t > &p) const
 Verifies if element is in matrix domain. More...
 
void SetRange (D min, D max)
 Recalculate the amplitude scale of the matrix by the following formula: mat[ pxl ] = min + ( mat[ pxl ] - mat_min ) * ( max - min ) / ( mat_max - mat_min ) More...
 
Maximum () const
 Compute and return the maximum value among matrix elements. More...
 
Minimum () const
 Compute and return the minimum value among matrix elements. More...
 
template<class O >
O & Print (O &os) const
 Prints matrix containts to output stream os. More...
 
template<class O >
O & PrintDimensions (O &os) const
 Prints matrix dimensions to output stream os. More...
 
template<class D2 >
bool Equals (const Matrix< D2 > &src, double delta) const
 Compares src matrix to 'this' matrix. They are considere equal only if they have the same dimensions and data. More...
 
template<class D2 >
bool SameDimensions (const Matrix< D2 > &src) const
 Compares the dimensions of src matrix to the dimensions of 'this' matrix. More...
 
bool SameDimensions (const Adjacency &adj) const
 Compares the dimensions of adj adjacency relation to the dimensions of 'this' matrix. More...
 

Protected Attributes

Vector< D > _data
 data vector More...
 
D * qk_data
 Quick access reference for data. More...
 
size_t _size
 data size More...
 
size_t dims
 number of matrix dimensions More...
 
Vector< size_t > dim_size
 size of matrix dimensions. More...
 
Vector< size_t > acc_dim_size
 accumulated size of matrix dimensions. More...
 

Friends

class Adjacency
 
class Kernel
 
template<class D2 >
class Matrix
 
template<class D2 >
class Image
 

Detailed Description

template<class D>
class Bial::Matrix< D >

dimensional matrix handeling. When acessed by (x, y), or (x, y, z) operator, index x corresponds to the index of the column, and index y corresponds to the index of the row. This standard comes from text printing order and image display and storage in most of the computer systems.

Definition at line 29 of file FileImage.hpp.

Constructor & Destructor Documentation

template<class D >
Bial::Matrix< D >::Matrix ( )

Basic Constructor.

Date
2012/Jun/21
Parameters
none.
Returns
none.
Warning
null matrix.

Definition at line 1145 of file Matrix.hpp.

template<class D >
Bial::Matrix< D >::Matrix ( const Vector< size_t > &  size)

Basic Constructor.

Date
2012/Jun/21
Parameters
sizeVector with matrix dimensions.
Returns
none.
Warning
Uninitialized element values.

Definition at line 1149 of file Matrix.hpp.

template<class D>
Bial::Matrix< D >::Matrix ( D *  new_data,
const Vector< size_t > &  new_dim 
)

Basic Constructor. This constructor works as a wrapper for data already allocated. It will use the same space pointed by new_data to manipulate the matrix. Use this for compatibility with other data structures, in a easy convertion to Matrix class.

Date
2015/Set/10
Parameters
new_dataPointer to data allocated elsewhere.
new_dimMatrix dimensions.
Returns
none.
Warning
Data is not deallocated automatcally, since it may be stored in the stack. Also, DO NOT USE this constructure in Verbose or Debug compilation mode, as it will try to access invalid memory positions. Just compile without any Verbosity or Debug flags.

Definition at line 1185 of file Matrix.hpp.

template<class D>
Bial::Matrix< D >::Matrix ( size_t  size_0,
size_t  size_1 
)

Basic Constructor for 2D matrix.

Date
2012/Jun/21
Parameters
size_0matrix dimension 0.
size_1matrix dimension 1.
Returns
none.
Warning
Uninitialized element values.

Definition at line 1211 of file Matrix.hpp.

template<class D>
Bial::Matrix< D >::Matrix ( size_t  size_0,
size_t  size_1,
size_t  size_2 
)

Basic Constructor for 3D matrix.

Date
2012/Jun/21
Parameters
size_0matrix dimension 0.
size_1matrix dimension 1.
size_2matrix dimension 2.
Returns
none.
Warning
Uninitialized element values.

Definition at line 1247 of file Matrix.hpp.

template<class D>
Bial::Matrix< D >::Matrix ( const Matrix< D > &  mtx)

Copy constructor.

Date
2014/Oct/12
Parameters
mtxSource matrix to be clonned.
Returns
none.
Warning
none.

Definition at line 1283 of file Matrix.hpp.

template<class D>
Bial::Matrix< D >::Matrix ( Matrix< D > &&  )
default

Move constructor.

Date
2014/Oct/12
Parameters
mtxSource matrix to be clonned.
Returns
none.
Warning
none.
template<class D >
template<class D2 >
Bial::Matrix< D >::Matrix ( const Matrix< D2 > &  mtx)

Copy constructor.

Date
2013/jun/27
Parameters
mtxSource matrix to be clonned.
Returns
none.
Warning
none.

Definition at line 1308 of file Matrix.hpp.

Member Function Documentation

template<class D >
void Bial::Matrix< D >::Abs ( )

Computes the absolute value of the matrix elements.

Date
2013/Nov/06
Parameters
none.
Returns
Nothing.
Warning
none.

Definition at line 2106 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::Abs ( ) const

Computes the absolute value of the matrix elements.

Date
2013/Nov/06
Parameters
none.
Returns
Matrix with absolute values of all elements from this matrix.
Warning
none.

Definition at line 2123 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::at ( size_t  p) const

Reads the constant reverence of value contained at position p of data Vector.

Date
2012/Jun/21
Parameters
pglobal index of the data being accessed.
Returns
Constant reverence of value contained in position p of data Vector.
Warning
Works for matrices of any dimension. Index p is a global position.

Definition at line 2391 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::at ( size_t  p)

Reads the value contained at position p of data Vector and returns its reference.

Date
2012/Jun/21
Parameters
pglobal index of the data being accessed.
Returns
Reference to position p of data Vector.
Warning
Works for matrices of any dimension. Index p is a global position.

Definition at line 2401 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1 
) const

Reads the constant reverence of value contained at position p_0, p_1 of data Vector.

Date
2012/Jun/21
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
Returns
Constant reverence of value contained in position p_0, p_1 of data Vector.
Warning
2D matrix access.

Definition at line 2411 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1 
)

Reads the value contained at position p_0, p_1 of data Vector and returns its reference.

Date
2012/Jun/21
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
Returns
Reference to position p_0, p_1 of data Vector.
Warning
2D matrix access.

Definition at line 2424 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1,
size_t  p_2 
) const

Reads the constant reverence of value contained at position p_0, p_1, p_2 of data Vector.

Date
2012/Jun/21
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
p_2third index of the data being accessed.
Returns
Constant reverence of value contained in position p_0, p_1, p_2 of data Vector.
Warning
3D matrix access.

Definition at line 2437 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1,
size_t  p_2 
)

Reads the value contained at position p_0, p_1, p_2 of data Vector and returns its reference.

Date
2012/Jun/21
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
p_2third index of the data being accessed.
Returns
Reference to position p_0, p_1, p_2 of data Vector.
Warning
3D matrix access.

Definition at line 2450 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3 
) const

Reads the constant reverence of value contained at position p_0, p_1, p_2, p_3 of data Vector.

Date
2013/Aug/21
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
p_2third index of the data being accessed.
p_3fourth index of the data being accessed.
Returns
Constant reverence of value contained in position p_0, p_1, p_2, p_3 of data Vector.
Warning
4D matrix access.

Definition at line 2463 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3 
)

Reads the value contained at position p_0, p_1, p_2, p_3 of data Vector and returns its reference.

Date
2013/Aug/21
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
p_2third index of the data being accessed.
p_3fourth index of the data being accessed.
Returns
Reference to position p_0, p_1, p_2, p_3 of data Vector.
Warning
4D matrix access.

Definition at line 2477 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3,
size_t  p_4 
) const

Reads the constant reverence of value contained at position p_0, p_1, p_2, p_3, p_4 of data Vector.

Date
2014/Apr/14
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
p_2third index of the data being accessed.
p_3fourth index of the data being accessed.
p_4fifth index of the data being accessed.
Returns
Constant reverence of value contained in position p_0, p_1, p_2, p_3, p_4 of data Vector.
Warning
5D matrix access.

Definition at line 2491 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::at ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3,
size_t  p_4 
)

Reads the value contained at position p_0, p_1, p_2, p_3, p_4 of data Vector and returns its reference.

Date
2014/Apr/14
Parameters
p_0first index of the data being accessed.
p_1second index of the data being accessed.
p_2third index of the data being accessed.
p_3fourth index of the data being accessed.
p_4fifth index of the data being accessed.
Returns
Reference to position p_0, p_1, p_2, p_3, p_4 of data Vector.
Warning
5D matrix access.

Definition at line 2506 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::at ( const Vector< size_t > &  p) const

Returns constant reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * acc_dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ].

Date
2013/Aug/23
Parameters
pVector of indexes to be acessed.
Returns
Constant reference of data pointed by index Vector p.
Warning
none.

Definition at line 2522 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::at ( const Vector< size_t > &  p)

Returns constant reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * acc_dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ].

Date
2013/Aug/23
Parameters
pVector of indexes to be acessed.
Returns
Constant reference of data pointed by index Vector p.
Warning
none.

Definition at line 2537 of file Matrix.hpp.

template<class D >
std::vector< D >::iterator Bial::Matrix< D >::begin ( )
noexcept

Returns iterator begin() of data.

Date
2012/Jun/29
Parameters
none.
Returns
iterator begin() of data.
Warning
none.

Definition at line 2146 of file Matrix.hpp.

template<class D >
std::vector< D >::const_iterator Bial::Matrix< D >::begin ( ) const
noexcept

Returns const_iterator begin() of data.

Date
2012/Jun/29
Parameters
none.
Returns
const_iterator begin() of data.
Warning
none.

Definition at line 2152 of file Matrix.hpp.

template<class D >
std::vector< D >::const_iterator Bial::Matrix< D >::cbegin ( ) const
noexcept

Returns the iterator cbegin() of data Vector.

Date
2015/Apr/06
Parameters
none.
Returns
iterator cbegin() of data Vector.
Warning
none.

Definition at line 2190 of file Matrix.hpp.

template<class D >
std::vector< D >::const_iterator Bial::Matrix< D >::cend ( ) const
noexcept

Returns the iterator cend() of data Vector.

Date
2015/Apr/06
Parameters
none.
Returns
iterator cend() of data Vector.
Warning
none.

Definition at line 2195 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Coordinate ( size_t  position,
size_t  dimension 
) const

Returns the coordinate of position in given dimension.

Date
2013/Aug/27
Parameters
positionDimension index.
dimensionA matrix dimension.
Returns
The coordinate of position in given dimension.
Warning
No position or dimension validation are made.

Definition at line 2257 of file Matrix.hpp.

template<class D >
Vector< size_t > Bial::Matrix< D >::Coordinates ( size_t  position) const

Returns the coordinates of the input position in this matrix.

Date
2012/Oct/03
Parameters
indexelement position.
Returns
The coordinates of the input position in this matrix.
Warning
none.

Definition at line 2268 of file Matrix.hpp.

template<class D >
std::vector< D >::const_reverse_iterator Bial::Matrix< D >::crbegin ( ) const
noexcept

Returns the iterator crbegin() of data Vector.

Date
2015/Apr/06
Parameters
none.
Returns
iterator crbegin() of data Vector.
Warning
none.

Definition at line 2200 of file Matrix.hpp.

template<class D >
std::vector< D >::const_reverse_iterator Bial::Matrix< D >::crend ( ) const
noexcept

Returns the iterator crend() of data Vector.

Date
2015/Apr/06
Parameters
none.
Returns
iterator crend() of data Vector.
Warning
none.

Definition at line 2205 of file Matrix.hpp.

template<class D >
const D * Bial::Matrix< D >::Data ( ) const

Returns a reference to data.

Date
2012/Sep/11
Parameters
none.
Returns
A reference to data.
Warning
none.

Definition at line 2210 of file Matrix.hpp.

template<class D >
D * Bial::Matrix< D >::Data ( )

Returns a reference to data.

Date
2015/Feb/25
Parameters
none.
Returns
A reference to data.
Warning
none.

Definition at line 2215 of file Matrix.hpp.

template<class D >
const D * Bial::Matrix< D >::data ( ) const

Returns a reference to data.

Date
2015/Feb/25
Parameters
none.
Returns
A reference to data.
Warning
none.

Definition at line 2220 of file Matrix.hpp.

template<class D >
D * Bial::Matrix< D >::data ( )

Returns a reference to data.

Date
2015/Feb/25
Parameters
none.
Returns
A reference to data.
Warning
none.

Definition at line 2225 of file Matrix.hpp.

template<class D >
Vector< size_t > Bial::Matrix< D >::Dim ( ) const

Returns a Vector with all matrix dimensions.

Date
2012/Jun/21
Parameters
none.
Returns
A Vector with matrix dimensions.
Warning
It is a copy of the dimension Vector.

Definition at line 2344 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Dims ( ) const

Returns the number of dimensions of 'this' matrix.

Date
2012/Jun/21
Parameters
none.
Returns
The number of dimensions of 'this' matrix.
Warning
none.

Definition at line 2381 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Displacement ( size_t  dimension) const

Returns the position displacement of one unit in dimension i.

Date
2013/Aug/30
Parameters
dimensionThe required dimension.
Returns
Position displacement of one unit in dimension i.
Warning
Does not verify if dimension is valid.

Definition at line 2386 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Elements ( ) const

Returns the number of elements of the matrix. Same as Size( ) method.

Date
2012/Jul/17
Parameters
none.
Returns
The number of elements of the matrix.
Warning
none.

Definition at line 2240 of file Matrix.hpp.

template<class D>
size_t Bial::Matrix< D >::Elements ( min,
max 
) const

Returns the number of elements counted inside the interval limited by min and max.

Date
2012/Jul/17
Parameters
minMinimum value in interval.
maxMaximum value in interval.
Returns
the number of elements counted inside the interval limited by min and max.
Warning
none.

Definition at line 2245 of file Matrix.hpp.

template<class D >
std::vector< D >::iterator Bial::Matrix< D >::end ( )
noexcept

Returns iterator end() of data.

Date
2012/Jun/29
Parameters
none.
Returns
iterator end() of data.
Warning
none.

Definition at line 2158 of file Matrix.hpp.

template<class D >
std::vector< D >::const_iterator Bial::Matrix< D >::end ( ) const
noexcept

Returns const_iterator end() of data.

Date
2012/Jun/29
Parameters
none.
Returns
const_iterator end() of data.
Warning
none.

Definition at line 2164 of file Matrix.hpp.

template<class D >
template<class D2 >
bool Bial::Matrix< D >::Equals ( const Matrix< D2 > &  src,
double  delta 
) const

Compares src matrix to 'this' matrix. They are considere equal only if they have the same dimensions and data.

Date
2012/Jun/27
Parameters
srcMatrix to compare to.
deltaMaximum difference between any element of
'this'and src.
Returns
Weather src is equal or not to 'this' matrix.
Warning
none.

Definition at line 2701 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::MaxDim ( ) const

Returns the maximum size among all matrix dimensions.

Date
2014/Feb/07
Parameters
none.
Returns
Maximum size among all matrix dimensions.
Warning
none.

Definition at line 2360 of file Matrix.hpp.

template<class D >
D Bial::Matrix< D >::Maximum ( ) const

Compute and return the maximum value among matrix elements.

Date
2012/Jun/21
Parameters
none.
Returns
The maximum value among matrix elements.
Warning
none.

Definition at line 2608 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::MinDim ( ) const

Returns the minimum size among all matrix dimensions.

Date
2014/Feb/07
Parameters
none.
Returns
Minimum size among all matrix dimensions.
Warning
none.

Definition at line 2349 of file Matrix.hpp.

template<class D >
D Bial::Matrix< D >::Minimum ( ) const

Compute and return the minimum value among matrix elements.

Date
2012/Jun/21
Parameters
none.
Returns
The minimum value among matrix elements.
Warning
none.

Definition at line 2613 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::operator() ( size_t  p) const

Returns constant reference of data pointed by index p. It has the same effect as operator data[ p ].

Date
2012/Jun/21
Parameters
pa global index to be acessed.
Returns
Constant reference of data pointed by index p.
Warning
Matrix bounds are not verified, as in operator[].

Definition at line 2004 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::operator() ( size_t  p)

Returns the reference for data pointed by index p. It has the same effect as operator data[ p ].

Date
2012/Jun/21
Parameters
pa global index to be acessed.
Returns
Reference of data pointed by index p.
Warning
Matrix bounds are not verified, as in operator[].

Definition at line 2009 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1 
) const

Returns constant reference of data pointed by index ( p_0, p_1 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] ].

Date
2012/Jun/21
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
Returns
Constant reference of data pointed by index ( p_0, p_1 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 2D matrices. The behavior is undefined for other dimensions.

Definition at line 2014 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1 
)

Returns the reference for data pointed by index ( p_0, p_1 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] ].

Date
2012/Jun/21
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
Returns
Reference of data pointed by index ( p_0, p_1 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 2D matrices. The behavior is undefined for other dimensions.

Definition at line 2019 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1,
size_t  p_2 
) const

Returns constant reference of data pointed by index ( p_0, p_1, p_2 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ].

Date
2012/Jun/21
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
p_2third index to be acessed.
Returns
Constant reference of data pointed by index ( p_0, p_1, p_2 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 3D matrices. The behavior is undefined for other dimensions.

Definition at line 2024 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1,
size_t  p_2 
)

Returns the reference for data pointed by index ( p_0, p_1, p_2 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ].

Date
2012/Jun/21
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
p_2third index to be acessed.
Returns
Reference of data pointed by index ( p_0, p_1, p_2 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 3D matrices. The behavior is undefined for other dimensions.

Definition at line 2029 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3 
) const

Returns constant reference of data pointed by index ( p_0, p_1, p_2, p_3 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] ].

Date
2013/Aug/21
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
p_2third index to be acessed.
p_3fourth index to be acessed.
Returns
Constant reference of data pointed by index ( p_0, p_1, p_2, p_3 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 4D matrices. The behavior is undefined for other dimensions.

Definition at line 2034 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3 
)

Returns the reference for data pointed by index ( p_0, p_1, p_2, p_3 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] ].

Date
2012/Jun/21
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
p_2third index to be acessed.
p_3fourth index to be acessed.
Returns
Reference of data pointed by index ( p_0, p_1, p_2, p_3 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 4D matrices. The behavior is undefined for other dimensions.

Definition at line 2039 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3,
size_t  p_4 
) const

Returns constant reference of data pointed by index ( p_0, p_1, p_2, p_3, p_4 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] + p_4 * acc_dim_size[ 3 ] ].

Date
2014/Apr/14
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
p_2third index to be acessed.
p_3fourth index to be acessed.
p_4fifth index to be acessed.
Returns
Constant reference of data pointed by index ( p_0, p_1, p_2, p_3, p_4 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 5D matrices. The behavior is undefined for other dimensions.

Definition at line 2044 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::operator() ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3,
size_t  p_4 
)

Returns the reference for data pointed by index ( p_0, p_1, p_2, p_3, p_4 ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] + p_3 * acc_dim_size[ 2 ] + p_4 * acc_dim_size[ 3 ] ].

Date
2014/Apr/14
Parameters
p_0first index to be acessed.
p_1second index to be acessed.
p_2third index to be acessed.
p_3fourth index to be acessed.
p_4fifth index to be acessed.
Returns
Reference of data pointed by index ( p_0, p_1, p_2, p_3, p_4 ).
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for 5D matrices. The behavior is undefined for other dimensions.

Definition at line 2050 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::operator() ( const Vector< size_t > &  p) const

Returns constant reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ].

Date
2013/Jun/25
Parameters
pVector of indexes to be acessed.
Returns
Constant reference of data pointed by index Vector p.
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for N-D matrices.

Definition at line 2056 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::operator() ( const Vector< size_t > &  p)

Returns the reference of data pointed by index ( p[ 0 ], p[ 1 ], p[ 2 ], ... ). It has the same effect as operator data[ p_0 + p_1 * dim_size[ 0 ] + p_2 * acc_dim_size[ 1 ] ... ].

Date
2013/Jun/25
Parameters
pVector of indexes to be acessed.
Returns
Reference of data pointed by index Vector p.
Warning
Matrix dimensions and bounds are not verified, as in operator data[]. Designed for N-D matrices.

Definition at line 2081 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > Bial::Matrix< D >::operator* ( const Matrix< D2 > &  other) const

Computes the product of the matrices 'this' and other and returns the resultant matrix.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Product of matrices 'this' and other.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1641 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::operator* ( double  scalar) const

Computes the product of 'this' matrix by the scalar.

Date
2012/Jun/21
Parameters
scalara scalar.
Returns
Product of 'this' matrix by the scalar.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1883 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > & Bial::Matrix< D >::operator*= ( const Matrix< D2 > &  other)

Computes the product of the matrices 'this' and other and assigns the result to this.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Reference to 'this'.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1684 of file Matrix.hpp.

template<class D >
Matrix< D > & Bial::Matrix< D >::operator*= ( double  scalar)

Updates 'this' matrix with the product of 'this' by the input scalar.

Date
2012/Jun/21
Parameters
scalara scalar.
Returns
reference to 'this'.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1910 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > Bial::Matrix< D >::operator+ ( const Matrix< D2 > &  other) const

Computes the sum of the matrices 'this' and other and returns the resultant matrix.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Sum of matrices 'this' and other.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1500 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::operator+ ( double  scalar) const

Computes the sum of 'this' matrix by the scalar.

Date
2012/jul/02
Parameters
scalara scalar.
Returns
Sum of 'this' matrix by the scalar.
Warning
none.

Definition at line 1781 of file Matrix.hpp.

template<class D >
Matrix< D > & Bial::Matrix< D >::operator++ ( )

Increments all elements of this matrix and returns it.

Date
2014/Nov/03
Parameters
none.
Returns
Reference to this.
Warning
none.

Definition at line 1427 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::operator++ ( int  )

Increments all elements of this matrix and returns it.

Date
2014/Nov/03
Parameters
none.
Returns
A copy of this matrix before incrementing its element's intensities.
Warning
none.

Definition at line 1435 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > & Bial::Matrix< D >::operator+= ( const Matrix< D2 > &  other)

Computes the sum of the matrices 'this' and other and assigns the result to this.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Reference to 'this'.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1532 of file Matrix.hpp.

template<class D >
Matrix< D > & Bial::Matrix< D >::operator+= ( double  scalar)

Updates 'this' matrix with the sum of 'this' by the input scalar.

Date
2012/jul/02
Parameters
scalara scalar.
Returns
reference to 'this'.
Warning
none.

Definition at line 1808 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::operator- ( ) const

Computes the negative matrix of 'this' and returns the resultant matrix.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Negative matrix of 'this'.
Warning
none.

Definition at line 1556 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > Bial::Matrix< D >::operator- ( const Matrix< D2 > &  other) const

Computes the difference of the matrices 'this' and other and returns the resultant matrix.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Sum of matrices 'this' and other.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1584 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::operator- ( double  scalar) const

Computes the difference between 'this' matrix and the scalar.

Date
2012/jul/02
Parameters
scalara scalar.
Returns
Difference between 'this' matrix and the scalar.
Warning
none.

Definition at line 1832 of file Matrix.hpp.

template<class D >
Matrix< D > & Bial::Matrix< D >::operator-- ( )

Decrements all elements of this matrix and returns it.

Date
2014/Nov/03
Parameters
none.
Returns
Reference to this.
Warning
none.

Definition at line 1460 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::operator-- ( int  )

Decrements all elements of this matrix and returns it.

Date
2014/Nov/03
Parameters
none.
Returns
A copy of this matrix before decrementing its element's intensities.
Warning
none.

Definition at line 1474 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > & Bial::Matrix< D >::operator-= ( const Matrix< D2 > &  other)

Computes the difference of the matrices 'this' and other and assigns the result to this.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Reference to 'this'.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1616 of file Matrix.hpp.

template<class D >
Matrix< D > & Bial::Matrix< D >::operator-= ( double  scalar)

Updates 'this' matrix with the difference between 'this' and the input scalar.

Date
2012/jul/02
Parameters
scalara scalar.
Returns
reference to 'this'.
Warning
none.

Definition at line 1859 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > Bial::Matrix< D >::operator/ ( const Matrix< D2 > &  other) const

Computes the division of the matrices 'this' and other and returns the resultant matrix.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Division of matrices 'this' and other.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1709 of file Matrix.hpp.

template<class D >
Matrix< D > Bial::Matrix< D >::operator/ ( double  scalar) const

Computes the division of 'this' matrix by the scalar.

Date
2012/Jun/21
Parameters
scalara scalar.
Returns
Division of 'this' matrix by the scalar.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1934 of file Matrix.hpp.

template<class D >
template<class D2 >
Matrix< D > & Bial::Matrix< D >::operator/= ( const Matrix< D2 > &  other)

Computes the division of the matrices 'this' and other and assigns the result to this.

Date
2012/Jun/21
Parameters
othersecond other.
Returns
Reference to 'this'.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1757 of file Matrix.hpp.

template<class D >
Matrix< D > & Bial::Matrix< D >::operator/= ( double  scalar)

Updates 'this' matrix with the division of 'this' by the input scalar.

Date
2012/Jun/21
Parameters
scalara scalar.
Returns
reference to 'this'.
Warning
'this' matrix must have the same dimensions of other matrix.

Definition at line 1966 of file Matrix.hpp.

template<class D>
Matrix< D > & Bial::Matrix< D >::operator= ( const Matrix< D > &  other)

Assigns 'other' matrix content to this matrix.

Date
2014/Oct/10
Parameters
othermatrix to be assigned.
Returns
none.
Warning
none.

Definition at line 1337 of file Matrix.hpp.

template<class D>
Matrix< D >& Bial::Matrix< D >::operator= ( Matrix< D > &&  )
default

Assigns 'other' matrix content to this matrix, moving the content.

Date
2014/Oct/10
Parameters
othermatrix to be assigned.
Returns
none.
Warning
none.
template<class D >
template<class D2 >
Matrix< D > & Bial::Matrix< D >::operator= ( const Matrix< D2 > &  other)

Assigns 'other' matrix content to this matrix.

Date
2014/Oct/10
Parameters
othermatrix to be assigned.
Returns
none.
Warning
none.

Definition at line 1370 of file Matrix.hpp.

template<class D >
template<class D2 >
bool Bial::Matrix< D >::operator== ( const Matrix< D2 > &  other) const

The matrices are considered equal if they have the same dimensions and their elements have the same value.

Date
2012/Jun/21
Parameters
othermatrix to be compared.
Returns
true if matrices are equal.
Warning
Equality may be tricky for floating point matrices. In these cases, use Equals method.

Definition at line 1405 of file Matrix.hpp.

template<class D >
const D & Bial::Matrix< D >::operator[] ( size_t  p) const

Returns a constant reference of data pointed by index p. It has the same effect as operator data( p ).

Date
2012/Jun/21
Parameters
pa global index to be acessed.
Returns
Constant reference of data pointed by index p.
Warning
Matrix bounds are not verified.

Definition at line 1993 of file Matrix.hpp.

template<class D >
D & Bial::Matrix< D >::operator[] ( size_t  p)

Returns the reference for data pointed by index p. It has the same effect as operator data( p ).

Date
2012/Jun/21
Parameters
pa global index to be acessed.
Returns
Reference of data pointed by index p.
Warning
Matrix bounds are not verified.

Definition at line 1999 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Position ( size_t  p_0,
size_t  p_1 
) const

Returns the position corresponding to the input coordinates in this matrix.

Date
2013/Oct/30
Parameters
p_0dim 0 coordinate.
p_1dim 1 coordinate.
Returns
The position corresponding to the input coordinates in this matrix.
Warning
none.

Definition at line 2279 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Position ( size_t  p_0,
size_t  p_1,
size_t  p_2 
) const

Returns the position corresponding to the input coordinates in this matrix.

Date
2013/Oct/30
Parameters
p_0dim 0 coordinate.
p_1dim 1 coordinate.
p_2dim 2 coordinate.
Returns
The position corresponding to the input coordinates in this matrix.
Warning
none.

Definition at line 2284 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Position ( size_t  p_0,
size_t  p_1,
size_t  p_2,
size_t  p_3 
) const

Returns the position corresponding to the input coordinates in this matrix.

Date
2013/Oct/30
Parameters
p_0dim 0 coordinate.
p_1dim 1 coordinate.
p_2dim 2 coordinate.
p_3dim 3 coordinate.
Returns
The position corresponding to the input coordinates in this matrix.
Warning
none.

Definition at line 2289 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Position ( const Vector< size_t > &  coordinates) const

Returns the position corresponding to the input coordinates in this matrix.

Date
2012/Oct/03
Parameters
coordinateselement coordinates.
Returns
The position corresponding to the input coordinates in this matrix.
Warning
none.

Definition at line 2294 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Position ( const Vector< int > &  coordinates) const

Returns the position corresponding to the input coordinates in this matrix.

Date
2015/Jul/07
Parameters
coordinateselement coordinates.
Returns
The position corresponding to the input coordinates in this matrix.
Warning
none.

Definition at line 2306 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Position ( const Vector< float > &  coordinates) const

Returns the position corresponding to the input coordinates in this matrix.

Date
2015/Jul/07
Parameters
coordinateselement coordinates.
Returns
The position corresponding to the input coordinates in this matrix.
Warning
none.

Definition at line 2318 of file Matrix.hpp.

template<class D >
template<class O >
O & Bial::Matrix< D >::Print ( O &  os) const

Prints matrix containts to output stream os.

Date
2012/Jun/21
Parameters
osan output stream.
Returns
The output stream.
Warning
'this' matrix must be 1D, 2D, or 3D.

Definition at line 2619 of file Matrix.hpp.

template<class D >
template<class O >
O & Bial::Matrix< D >::PrintDimensions ( O &  os) const

Prints matrix dimensions to output stream os.

Date
2012/Jun/21
Parameters
none.
Returns
The dimensions of the matrix.
Warning
none.

Definition at line 2679 of file Matrix.hpp.

template<class D >
std::vector< D >::reverse_iterator Bial::Matrix< D >::rbegin ( )
noexcept

Returns the reverse_iterator rbegin() of data Vector.

Date
2013/Aug/09
Parameters
none.
Returns
reverse_iterator rbegin() of data Vector.
Warning
none.

Definition at line 2170 of file Matrix.hpp.

template<class D >
std::vector< D >::const_reverse_iterator Bial::Matrix< D >::rbegin ( ) const
noexcept

Returns const_reverse_iterator rbegin() of data Vector.

Date
2013/Aug/09
Parameters
none.
Returns
const_reverse_iterator rbegin() of data Vector.
Warning
none.

Definition at line 2175 of file Matrix.hpp.

template<class D >
std::vector< D >::reverse_iterator Bial::Matrix< D >::rend ( )
noexcept

Returns reverse_iterator rend() of data Vector.

Date
2013/Aug/09
Parameters
none.
Returns
reverse_iterator rend() of data Vector.
Warning
none.

Definition at line 2180 of file Matrix.hpp.

template<class D >
std::vector< D >::const_reverse_iterator Bial::Matrix< D >::rend ( ) const
noexcept

Returns const_reverse_iterator rend() of data Vector.

Date
2013/Aug/09
Parameters
none.
Returns
const_reverse_iterator rend() of data Vector.
Warning
none.

Definition at line 2185 of file Matrix.hpp.

template<class D >
template<class D2 >
bool Bial::Matrix< D >::SameDimensions ( const Matrix< D2 > &  src) const

Compares the dimensions of src matrix to the dimensions of 'this' matrix.

Date
2012/Jun/27
Parameters
srcMatrix to compare to.
Returns
Weather src has the same dimensions as 'this' matrix.
Warning
none.

Definition at line 2727 of file Matrix.hpp.

template<class D >
bool Bial::Matrix< D >::SameDimensions ( const Adjacency adj) const

Compares the dimensions of adj adjacency relation to the dimensions of 'this' matrix.

Date
2012/Jun/27
Parameters
adjAdjacency relation to compare to.
Returns
Weather adj has the same dimensions as 'this' matrix.
Warning
none.

Definition at line 2735 of file Matrix.hpp.

template<class D>
void Bial::Matrix< D >::Set ( val)

Sets val to each element of the matrix.

Date
2012/Jun/29
Parameters
valvalue to be set to the entire matrix.
Returns
none.
Warning
none.

Definition at line 2330 of file Matrix.hpp.

template<class D>
void Bial::Matrix< D >::SetRange ( min,
max 
)

Recalculate the amplitude scale of the matrix by the following formula: mat[ pxl ] = min + ( mat[ pxl ] - mat_min ) * ( max - min ) / ( mat_max - mat_min )

Date
2014/Apr/23
Parameters
minminimum value of the new amplitude scale
maxmaximum value of the new amplitude scale
Returns
none
Warning
The PNM format won't support negative values.

Definition at line 2562 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Size ( ) const

Returns size of data Vector.

Date
2012/Jun/21
Parameters
none.
Returns
the number of elements of data Vector.
Warning
none.

Definition at line 2235 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::size ( ) const

Returns size of data Vector. Same as Size( ), just for compatibility with std containers.

Date
2012/Jun/21
Parameters
none.
Returns
the number of elements of data Vector.
Warning
none.

Definition at line 2230 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::Size ( size_t  dimension) const

Returns matrix required dimension.

Date
2012/Jun/21
Parameters
iThe required dimension.
Returns
Matrix required dimension.
Warning
Do not verify if dimension is valid.

Definition at line 2371 of file Matrix.hpp.

template<class D >
size_t Bial::Matrix< D >::size ( size_t  dimension) const

Returns matrix required dimension. Just for symmetry with size( ) and Size( ) functions.

Date
2012/Jun/21
Parameters
dimensionThe required dimension.
Returns
Matrix required dimension.
Warning
Do not verify if dimension is valid.

Definition at line 2376 of file Matrix.hpp.

template<class D >
bool Bial::Matrix< D >::ValidElement ( const Vector< size_t > &  p) const

Verifies if element is in matrix domain.

Date
2014/Mar/18
Parameters
pVector of indexes to be acessed.
Returns
True if element is inside matrix domain.
Warning
Does not verify if number of dimensions of p match matrix number of dimensions.

Definition at line 2552 of file Matrix.hpp.

Friends And Related Function Documentation

template<class D>
friend class Adjacency
friend

Definition at line 36 of file Matrix.hpp.

template<class D>
template<class D2 >
friend class Image
friend

Definition at line 41 of file Matrix.hpp.

template<class D>
friend class Kernel
friend

Definition at line 37 of file Matrix.hpp.

template<class D>
template<class D2 >
friend class Matrix
friend

Definition at line 39 of file Matrix.hpp.

Member Data Documentation

template<class D>
Vector< D > Bial::Matrix< D >::_data
protected

data vector

Definition at line 46 of file Matrix.hpp.

template<class D>
size_t Bial::Matrix< D >::_size
protected

data size

Definition at line 50 of file Matrix.hpp.

template<class D>
Vector< size_t > Bial::Matrix< D >::acc_dim_size
protected

accumulated size of matrix dimensions.

Definition at line 56 of file Matrix.hpp.

template<class D>
Vector< size_t > Bial::Matrix< D >::dim_size
protected

size of matrix dimensions.

Definition at line 54 of file Matrix.hpp.

template<class D>
size_t Bial::Matrix< D >::dims
protected

number of matrix dimensions

Definition at line 52 of file Matrix.hpp.

template<class D>
D* Bial::Matrix< D >::qk_data
protected

Quick access reference for data.

Definition at line 48 of file Matrix.hpp.


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