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

A array that calls almost all std::array functions (C++11 standard). More...

#include <Array.hpp>

Collaboration diagram for Bial::Array< D, S >:
Collaboration graph

Public Member Functions

 Array ()
 Basic Constructors. More...
 
 Array (const D &val)
 
 Array (const Array< D, S > &x)
 
template<class D2 >
 Array (const Array< D2, S > &src)
 
template<class D2 >
 Array (const std::array< D2, S > &src)
 
Array< D, S > & operator= (const Array< D, S > &x)
 Fill operator. More...
 
template<class D2 >
Array< D, S > & operator= (const Array< D2, S > &x)
 
Array< D, S > & operator= (double val)
 
template<class D2 >
Array< D, S > & operator+= (const Array< D2, S > &other)
 Arithmetic operators. More...
 
template<class D2 >
Array< D, S > & operator-= (const Array< D2, S > &other)
 
template<class D2 >
Array< D, S > & operator*= (const Array< D2, S > &other)
 
template<class D2 >
Array< D, S > & operator/= (const Array< D2, S > &other)
 
template<class D2 >
Array< D, S > operator+ (const Array< D2, S > &other) const
 
template<class D2 >
Array< D, S > operator- (const Array< D2, S > &other) const
 
template<class D2 >
Array< D, S > operator* (const Array< D2, S > &other) const
 
template<class D2 >
Array< D, S > operator/ (const Array< D2, S > &other) const
 
Array< D, S > & operator+= (const double scalar)
 
Array< D, S > & operator-= (const double scalar)
 
Array< D, S > & operator*= (const double scalar)
 
Array< D, S > & operator/= (const double scalar)
 
Array< D, S > operator+ (const double scalar) const
 
Array< D, S > operator- (const double scalar) const
 
Array< D, S > operator* (const double scalar) const
 
Array< D, S > operator/ (const double scalar) const
 
void Abs ()
 Computes the absolute value of array. More...
 
Array< D, S > Abs () const
 Computes the absolute value of array. More...
 
std::array< D, S >::iterator begin () noexcept
 Iterators. More...
 
std::array< D, S >::const_iterator begin () const noexcept
 
std::array< D, S >::iterator end () noexcept
 
std::array< D, S >::const_iterator end () const noexcept
 
std::array< D, S >::reverse_iterator rbegin () noexcept
 
std::array< D, S >::const_reverse_iterator rbegin () const noexcept
 
std::array< D, S >::reverse_iterator rend () noexcept
 
std::array< D, S >::const_reverse_iterator rend () const noexcept
 
std::array< D, S >::const_iterator cbegin () const noexcept
 
std::array< D, S >::const_iterator cend () const noexcept
 
std::array< D, S >::const_reverse_iterator crbegin () const noexcept
 
std::array< D, S >::const_reverse_iterator crend () const noexcept
 
size_t size () const noexcept
 Returns array size. More...
 
size_t Size () const noexcept
 
bool empty () const noexcept
 Tests if array is empty. More...
 
D & operator[] (size_t n)
 Returns reference to data at position n. More...
 
const D & operator[] (size_t n) const
 
D & operator() (size_t n)
 Returns reference to data at position n. More...
 
const D & operator() (size_t n) const
 
D & at (size_t n)
 Returns reference to data at position n, checking if it exists. More...
 
const D & at (size_t n) const
 
D & front ()
 Returns array's first element. More...
 
const D & front () const
 
D & back ()
 Returns array's last element. More...
 
const D & back () const
 
D * data () noexcept
 Returns pointer to _data array. More...
 
const D * data () const noexcept
 
void fill (const D &val)
 Fills data to all elements. More...
 
void Set (double val)
 Fills data to all elements. More...
 
void swap (Array &x)
 Exchanges content of this array by x. More...
 
Maximum () const
 Compute and return the maximum value among array elements. More...
 
Minimum () const
 Compute and return the minimum value among array elements. More...
 
template<class O >
O & Print (O &os) const
 Prints array containts to output stream os. More...
 
template<class O >
O & PrintDimensions (O &os) const
 Prints array dimensions to output stream os. More...
 

Protected Attributes

std::array< D, S > _data
 data array More...
 

Friends

template<class D2 , size_t S2>
class Array
 

Detailed Description

template<class D, size_t S>
class Bial::Array< D, S >

A array that calls almost all std::array functions (C++11 standard).

Definition at line 25 of file Array.hpp.

Constructor & Destructor Documentation

template<class D , size_t S>
Bial::Array< D, S >::Array ( )

Basic Constructors.

Date
2015/Apr/22
Parameters
many.
Returns
none.
Warning
none.

Definition at line 336 of file Array.hpp.

template<class D, size_t S>
Bial::Array< D, S >::Array ( const D &  val)

Definition at line 355 of file Array.hpp.

template<class D, size_t S>
Bial::Array< D, S >::Array ( const Array< D, S > &  x)

Definition at line 377 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Bial::Array< D, S >::Array ( const Array< D2, S > &  src)

Definition at line 423 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Bial::Array< D, S >::Array ( const std::array< D2, S > &  src)

Definition at line 400 of file Array.hpp.

Member Function Documentation

template<class D , size_t S>
void Bial::Array< D, S >::Abs ( )

Computes the absolute value of array.

Date
2015/Apr/22
Parameters
none.
Returns
Nothing.
Warning
none.

Definition at line 945 of file Array.hpp.

template<class D , size_t S>
Array< D, S > Bial::Array< D, S >::Abs ( ) const

Computes the absolute value of array.

Date
2015/Apr/22
Parameters
none.
Returns
Image with absolute values of array.
Warning
none.

Definition at line 953 of file Array.hpp.

template<class D , size_t S>
D & Bial::Array< D, S >::at ( size_t  n)

Returns reference to data at position n, checking if it exists.

Date
2015/Apr/22
Parameters
na array reference.
Returns
Reference to data at position n.
Warning
none.

Definition at line 1095 of file Array.hpp.

template<class D , size_t S>
const D & Bial::Array< D, S >::at ( size_t  n) const

Definition at line 1100 of file Array.hpp.

template<class D , size_t S>
D & Bial::Array< D, S >::back ( )

Returns array's last element.

Date
2015/Apr/22
Parameters
none.
Returns
Array's last element.
Warning
none.

Definition at line 1143 of file Array.hpp.

template<class D , size_t S>
const D & Bial::Array< D, S >::back ( ) const

Definition at line 1162 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::iterator Bial::Array< D, S >::begin ( )
noexcept

Iterators.

Date
2015/Apr/22
Parameters
many.
Returns
none.
Warning
none.

Definition at line 971 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_iterator Bial::Array< D, S >::begin ( ) const
noexcept

Definition at line 976 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_iterator Bial::Array< D, S >::cbegin ( ) const
noexcept

Definition at line 1011 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_iterator Bial::Array< D, S >::cend ( ) const
noexcept

Definition at line 1016 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_reverse_iterator Bial::Array< D, S >::crbegin ( ) const
noexcept

Definition at line 1021 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_reverse_iterator Bial::Array< D, S >::crend ( ) const
noexcept

Definition at line 1026 of file Array.hpp.

template<class D , size_t S>
D * Bial::Array< D, S >::data ( )
noexcept

Returns pointer to _data array.

Date
2015/Apr/22
Parameters
none.
Returns
Pointer to _data array.
Warning
none.

Definition at line 1181 of file Array.hpp.

template<class D , size_t S>
const D * Bial::Array< D, S >::data ( ) const
noexcept

Definition at line 1186 of file Array.hpp.

template<class D , size_t S>
bool Bial::Array< D, S >::empty ( ) const
noexcept

Tests if array is empty.

Date
2015/Apr/22
Parameters
none.
Returns
true if array is empty.
Warning
none.

Definition at line 1041 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::iterator Bial::Array< D, S >::end ( )
noexcept

Definition at line 981 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_iterator Bial::Array< D, S >::end ( ) const
noexcept

Definition at line 986 of file Array.hpp.

template<class D, size_t S>
void Bial::Array< D, S >::fill ( const D &  val)

Fills data to all elements.

Date
2015/Apr/22
Parameters
none.
Returns
none.
Warning
none.

Definition at line 1191 of file Array.hpp.

template<class D , size_t S>
D & Bial::Array< D, S >::front ( )

Returns array's first element.

Date
2015/Apr/22
Parameters
none.
Returns
Array's first element.
Warning
none.

Definition at line 1105 of file Array.hpp.

template<class D , size_t S>
const D & Bial::Array< D, S >::front ( ) const

Definition at line 1124 of file Array.hpp.

template<class D , size_t S>
D Bial::Array< D, S >::Maximum ( ) const

Compute and return the maximum value among array elements.

Date
2015/Apr/22
Parameters
none.
Returns
The maximum value among array elements.
Warning
none.

Definition at line 1372 of file Array.hpp.

template<class D , size_t S>
D Bial::Array< D, S >::Minimum ( ) const

Compute and return the minimum value among array elements.

Date
2015/Apr/22
Parameters
none.
Returns
The minimum value among array elements.
Warning
none.

Definition at line 1391 of file Array.hpp.

template<class D , size_t S>
D & Bial::Array< D, S >::operator() ( size_t  n)

Returns reference to data at position n.

Date
2015/Apr/22
Parameters
na array index.
Returns
Reference to data at position n.
Warning
none.

Definition at line 1071 of file Array.hpp.

template<class D , size_t S>
const D & Bial::Array< D, S >::operator() ( size_t  n) const

Definition at line 1083 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > Bial::Array< D, S >::operator* ( const Array< D2, S > &  other) const
inline

Definition at line 691 of file Array.hpp.

template<class D , size_t S>
Array< D, S > Bial::Array< D, S >::operator* ( const double  scalar) const
inline

Definition at line 897 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > & Bial::Array< D, S >::operator*= ( const Array< D2, S > &  other)
inline

Definition at line 575 of file Array.hpp.

template<class D , size_t S>
Array< D, S > & Bial::Array< D, S >::operator*= ( const double  scalar)
inline

Definition at line 792 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > Bial::Array< D, S >::operator+ ( const Array< D2, S > &  other) const
inline

Definition at line 641 of file Array.hpp.

template<class D , size_t S>
Array< D, S > Bial::Array< D, S >::operator+ ( const double  scalar) const
inline

Definition at line 849 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > & Bial::Array< D, S >::operator+= ( const Array< D2, S > &  other)
inline

Arithmetic operators.

Date
2015/Apr/22
Parameters
many.
Returns
none.
Warning
none.

Definition at line 521 of file Array.hpp.

template<class D , size_t S>
Array< D, S > & Bial::Array< D, S >::operator+= ( const double  scalar)
inline

Definition at line 740 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > Bial::Array< D, S >::operator- ( const Array< D2, S > &  other) const
inline

Definition at line 666 of file Array.hpp.

template<class D , size_t S>
Array< D, S > Bial::Array< D, S >::operator- ( const double  scalar) const
inline

Definition at line 873 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > & Bial::Array< D, S >::operator-= ( const Array< D2, S > &  other)
inline

Definition at line 548 of file Array.hpp.

template<class D , size_t S>
Array< D, S > & Bial::Array< D, S >::operator-= ( const double  scalar)
inline

Definition at line 766 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > Bial::Array< D, S >::operator/ ( const Array< D2, S > &  other) const
inline

Definition at line 716 of file Array.hpp.

template<class D , size_t S>
Array< D, S > Bial::Array< D, S >::operator/ ( const double  scalar) const
inline

Definition at line 921 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > & Bial::Array< D, S >::operator/= ( const Array< D2, S > &  other)
inline

Definition at line 602 of file Array.hpp.

template<class D , size_t S>
Array< D, S > & Bial::Array< D, S >::operator/= ( const double  scalar)
inline

Definition at line 818 of file Array.hpp.

template<class D, size_t S>
Array< D, S > & Bial::Array< D, S >::operator= ( const Array< D, S > &  x)

Fill operator.

Date
2015/Apr/22
Parameters
many.
Returns
none.
Warning
none.

Definition at line 443 of file Array.hpp.

template<class D , size_t S>
template<class D2 >
Array< D, S > & Bial::Array< D, S >::operator= ( const Array< D2, S > &  x)

Definition at line 468 of file Array.hpp.

template<class D, size_t S>
Array< D, S > & Bial::Array< D, S >::operator= ( double  val)

Definition at line 494 of file Array.hpp.

template<class D , size_t S>
D & Bial::Array< D, S >::operator[] ( size_t  n)

Returns reference to data at position n.

Date
2015/Apr/22
Parameters
na array index.
Returns
Reference to data at position n.
Warning
none.

Definition at line 1046 of file Array.hpp.

template<class D , size_t S>
const D & Bial::Array< D, S >::operator[] ( size_t  n) const

Definition at line 1059 of file Array.hpp.

template<class D , size_t S>
template<class O >
O & Bial::Array< D, S >::Print ( O &  os) const

Prints array containts to output stream os.

Date
2015/Apr/22
Parameters
osan output stream.
Returns
The output stream.
Warning
'this' array must be 1D, 2D, or 3D.

Definition at line 1411 of file Array.hpp.

template<class D , size_t S>
template<class O >
O & Bial::Array< D, S >::PrintDimensions ( O &  os) const

Prints array dimensions to output stream os.

Date
2015/Apr/22
Parameters
none.
Returns
The dimensions of the array.
Warning
none.

Definition at line 1430 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::reverse_iterator Bial::Array< D, S >::rbegin ( )
noexcept

Definition at line 991 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_reverse_iterator Bial::Array< D, S >::rbegin ( ) const
noexcept

Definition at line 996 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::reverse_iterator Bial::Array< D, S >::rend ( )
noexcept

Definition at line 1001 of file Array.hpp.

template<class D , size_t S>
std::array< D, S >::const_reverse_iterator Bial::Array< D, S >::rend ( ) const
noexcept

Definition at line 1006 of file Array.hpp.

template<class D , size_t S>
void Bial::Array< D, S >::Set ( double  val)

Fills data to all elements.

Date
2015/Apr/22
Parameters
none.
Returns
none.
Warning
none.

Definition at line 1214 of file Array.hpp.

template<class D , size_t S>
size_t Bial::Array< D, S >::size ( ) const
noexcept

Returns array size.

Date
2015/Apr/22
Parameters
none.
Returns
Array size.
Warning
none.

Definition at line 1031 of file Array.hpp.

template<class D , size_t S>
size_t Bial::Array< D, S >::Size ( ) const
noexcept

Definition at line 1036 of file Array.hpp.

template<class D , size_t S>
void Bial::Array< D, S >::swap ( Array< D, S > &  x)

Exchanges content of this array by x.

Date
2015/Apr/22
Parameters
xa array.
Returns
none.
Warning
none.

Definition at line 1239 of file Array.hpp.

Friends And Related Function Documentation

template<class D, size_t S>
template<class D2 , size_t S2>
friend class Array
friend

Definition at line 28 of file Array.hpp.

Member Data Documentation

template<class D, size_t S>
std::array< D, S > Bial::Array< D, S >::_data
protected

data array

Definition at line 33 of file Array.hpp.


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