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

#include <Vector.hpp>

Collaboration diagram for Bial::Vector< bool >:
Collaboration graph

Public Member Functions

 Vector ()
 Basic Constructors. More...
 
 Vector (size_t n)
 
 Vector (size_t n, const bool &val)
 
template<class InputIterator >
 Vector (InputIterator first, InputIterator last)
 
 Vector (const Vector< bool > &x)
 
 Vector (Vector< bool > &&x)
 
 Vector (const std::vector< bool > &x)
 
 Vector (std::vector< bool > &&x)
 
 Vector (std::initializer_list< bool > il)
 
Vector< bool > & operator= (const Vector< bool > &x)
 Assign operator. More...
 
Vector< bool > & operator= (Vector< bool > &&x)
 
Vector< bool > & operator= (std::initializer_list< bool > il)
 
std::vector< bool >::iterator begin () noexcept
 Iterators. More...
 
std::vector< bool >::const_iterator begin () const noexcept
 
std::vector< bool >::iterator end () noexcept
 
std::vector< bool >::const_iterator end () const noexcept
 
std::vector< bool >::reverse_iterator rbegin () noexcept
 
std::vector< bool >::const_reverse_iterator rbegin () const noexcept
 
std::vector< bool >::reverse_iterator rend () noexcept
 
std::vector< bool >::const_reverse_iterator rend () const noexcept
 
std::vector< bool >::const_iterator cbegin () const noexcept
 
std::vector< bool >::const_iterator cend () const noexcept
 
std::vector< bool >::const_reverse_iterator crbegin () const noexcept
 
std::vector< bool >::const_reverse_iterator crend () const noexcept
 
size_t size () const noexcept
 Returns vector size. More...
 
size_t Size () const noexcept
 
size_t Dims () const noexcept
 Returns 1. For compatibility with Matrix and Image. More...
 
size_t max_size () const noexcept
 Returns maximum vector size. More...
 
void resize (size_t n)
 Resizes vector. More...
 
void resize (size_t n, const bool &val)
 Resizes vector. More...
 
size_t capacity () const noexcept
 Returns vector capacity. More...
 
bool empty () const noexcept
 Tests if vector is empty. More...
 
void reserve (size_t n)
 Changes vector capacity. More...
 
void shrink_to_fit ()
 Reduces vector capacity to size. More...
 
void Write (const std::string &filename) const
 Writes vector into file. More...
 
std::vector< bool >::reference operator[] (size_t n)
 Returns reference to data at position n. More...
 
bool operator[] (size_t n) const
 
std::vector< bool >::reference operator() (size_t n)
 Returns reference to data at position n. More...
 
bool operator() (size_t n) const
 
std::vector< bool >::reference at (size_t n)
 Returns reference to data at position n, checking if it exists. More...
 
bool at (size_t n) const
 
std::vector< bool >::reference front ()
 Returns vector's first element. More...
 
bool front () const
 
std::vector< bool >::reference back ()
 Returns vector's last element. More...
 
bool back () const
 
template<class InputIterator >
void assign (InputIterator first, InputIterator last)
 Assigns data to all elements. More...
 
void assign (size_t n, const bool &val)
 
void assign (std::initializer_list< bool > il)
 
void Set (bool val)
 Assigns data to all elements. More...
 
void push_back (const bool &val)
 Inserts element in the end of the vector. More...
 
void push_back (bool &&val)
 Inserts element in the end of the vector. More...
 
void pop_back ()
 Removes last element from vector. More...
 
std::vector< bool >::iterator insert (typename std::vector< bool >::iterator position, const bool &val)
 Inserts elements into the vector. More...
 
std::vector< bool >::iterator insert (typename std::vector< bool >::iterator position, size_t n, const bool &val)
 
template<class InputIterator >
std::vector< bool >::iterator insert (typename std::vector< bool >::iterator position, InputIterator first, InputIterator last)
 
std::vector< bool >::iterator insert (typename std::vector< bool >::iterator position, bool &&val)
 
std::vector< bool >::iterator insert (typename std::vector< bool >::iterator position, std::initializer_list< bool > il)
 
std::vector< bool >::iterator erase (typename std::vector< bool >::iterator position)
 Removes elements from the vector. More...
 
std::vector< bool >::iterator erase (typename std::vector< bool >::iterator first, typename std::vector< bool >::iterator last)
 
void swap (Vector &x)
 Exchanges content of this vector by x. More...
 
void clear () noexcept
 Removes all elements from vector. More...
 
template<class O >
O & Print (O &os) const
 Prints vector containts to output stream os. More...
 
template<class O >
O & PrintDimensions (O &os) const
 Prints vector dimensions to output stream os. More...
 

Static Public Member Functions

static Vector< bool > Read (const std::string &filename)
 Reads vector from file. More...
 

Protected Attributes

std::vector< bool > _data
 
bool qk_data
 
size_t _size
 

Detailed Description

template<>
class Bial::Vector< bool >

Definition at line 506 of file Vector.hpp.

Constructor & Destructor Documentation

Bial::Vector< bool >::Vector ( )
inlineexplicit

Basic Constructors.

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

Definition at line 2932 of file Vector.hpp.

Bial::Vector< bool >::Vector ( size_t  n)
inlineexplicit

Definition at line 2951 of file Vector.hpp.

Bial::Vector< bool >::Vector ( size_t  n,
const bool &  val 
)
inline

Definition at line 2970 of file Vector.hpp.

template<class InputIterator >
Bial::Vector< bool >::Vector ( InputIterator  first,
InputIterator  last 
)
inline

Definition at line 2990 of file Vector.hpp.

Bial::Vector< bool >::Vector ( const Vector< bool > &  x)
inline

Definition at line 3011 of file Vector.hpp.

Bial::Vector< bool >::Vector ( Vector< bool > &&  x)
inline

Definition at line 3031 of file Vector.hpp.

Bial::Vector< bool >::Vector ( const std::vector< bool > &  x)
inline

Definition at line 3052 of file Vector.hpp.

Bial::Vector< bool >::Vector ( std::vector< bool > &&  x)
inline

Definition at line 3072 of file Vector.hpp.

Bial::Vector< bool >::Vector ( std::initializer_list< bool >  il)
inline

Definition at line 3093 of file Vector.hpp.

Member Function Documentation

template<class InputIterator >
void Bial::Vector< bool >::assign ( InputIterator  first,
InputIterator  last 
)
inline

Assigns data to all elements.

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

Definition at line 3583 of file Vector.hpp.

void Bial::Vector< bool >::assign ( size_t  n,
const bool &  val 
)
inline

Definition at line 3606 of file Vector.hpp.

void Bial::Vector< bool >::assign ( std::initializer_list< bool >  il)
inline

Definition at line 3629 of file Vector.hpp.

std::vector< bool >::reference Bial::Vector< bool >::at ( size_t  n)
inline

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

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

Definition at line 3502 of file Vector.hpp.

bool Bial::Vector< bool >::at ( size_t  n) const
inline

Definition at line 3506 of file Vector.hpp.

std::vector< bool >::reference Bial::Vector< bool >::back ( )
inline

Returns vector's last element.

Date
2015/Apr/01
Parameters
none.
Returns
Vector's last element.
Warning
none.

Definition at line 3546 of file Vector.hpp.

bool Bial::Vector< bool >::back ( ) const
inline

Definition at line 3564 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::begin ( )
inlinenoexcept

Iterators.

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

Definition at line 3189 of file Vector.hpp.

std::vector< bool >::const_iterator Bial::Vector< bool >::begin ( ) const
inlinenoexcept

Definition at line 3193 of file Vector.hpp.

size_t Bial::Vector< bool >::capacity ( ) const
inlinenoexcept

Returns vector capacity.

Date
2015/Apr/01
Parameters
none.
Returns
Vector capacity.
Warning
none.

Definition at line 3263 of file Vector.hpp.

std::vector< bool >::const_iterator Bial::Vector< bool >::cbegin ( ) const
inlinenoexcept

Definition at line 3221 of file Vector.hpp.

std::vector< bool >::const_iterator Bial::Vector< bool >::cend ( ) const
inlinenoexcept

Definition at line 3225 of file Vector.hpp.

void Bial::Vector< bool >::clear ( )
inlinenoexcept

Removes all elements from vector.

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

Definition at line 3938 of file Vector.hpp.

std::vector< bool >::const_reverse_iterator Bial::Vector< bool >::crbegin ( ) const
inlinenoexcept

Definition at line 3229 of file Vector.hpp.

std::vector< bool >::const_reverse_iterator Bial::Vector< bool >::crend ( ) const
inlinenoexcept

Definition at line 3233 of file Vector.hpp.

size_t Bial::Vector< bool >::Dims ( ) const
inlinenoexcept

Returns 1. For compatibility with Matrix and Image.

Date
2015/Jun/25
Parameters
none.
Returns
Vector dimensions.
Warning
none.

Definition at line 3245 of file Vector.hpp.

bool Bial::Vector< bool >::empty ( ) const
inlinenoexcept

Tests if vector is empty.

Date
2015/Apr/01
Parameters
none.
Returns
true if vector is empty.
Warning
none.

Definition at line 3267 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::end ( )
inlinenoexcept

Definition at line 3197 of file Vector.hpp.

std::vector< bool >::const_iterator Bial::Vector< bool >::end ( ) const
inlinenoexcept

Definition at line 3201 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::erase ( typename std::vector< bool >::iterator  position)
inline

Removes elements from the vector.

Date
2015/Apr/01
Parameters
many.
Returns
Pointer to element after the lastest removed.
Warning
none.

Definition at line 3869 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::erase ( typename std::vector< bool >::iterator  first,
typename std::vector< bool >::iterator  last 
)
inline

Definition at line 3894 of file Vector.hpp.

std::vector< bool >::reference Bial::Vector< bool >::front ( )
inline

Returns vector's first element.

Date
2015/Apr/01
Parameters
none.
Returns
Vector's first element.
Warning
none.

Definition at line 3510 of file Vector.hpp.

bool Bial::Vector< bool >::front ( ) const
inline

Definition at line 3528 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::insert ( typename std::vector< bool >::iterator  position,
const bool &  val 
)
inline

Inserts elements into the vector.

Date
2015/Apr/01
Parameters
many.
Returns
Pointer to the first inserted element.
Warning
none.

Definition at line 3744 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::insert ( typename std::vector< bool >::iterator  position,
size_t  n,
const bool &  val 
)
inline

Definition at line 3768 of file Vector.hpp.

template<class InputIterator >
std::vector< bool >::iterator Bial::Vector< bool >::insert ( typename std::vector< bool >::iterator  position,
InputIterator  first,
InputIterator  last 
)
inline

Definition at line 3794 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::insert ( typename std::vector< bool >::iterator  position,
bool &&  val 
)
inline

Definition at line 3819 of file Vector.hpp.

std::vector< bool >::iterator Bial::Vector< bool >::insert ( typename std::vector< bool >::iterator  position,
std::initializer_list< bool >  il 
)
inline

Definition at line 3844 of file Vector.hpp.

size_t Bial::Vector< bool >::max_size ( ) const
inlinenoexcept

Returns maximum vector size.

Date
2015/Apr/01
Parameters
none.
Returns
Vector maximum size.
Warning
none.

Definition at line 3249 of file Vector.hpp.

std::vector< bool >::reference Bial::Vector< bool >::operator() ( size_t  n)
inline

Returns reference to data at position n.

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

Definition at line 3486 of file Vector.hpp.

bool Bial::Vector< bool >::operator() ( size_t  n) const
inline

Definition at line 3494 of file Vector.hpp.

Vector< bool > & Bial::Vector< bool >::operator= ( const Vector< bool > &  x)
inline

Assign operator.

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

Definition at line 3115 of file Vector.hpp.

Vector< bool > & Bial::Vector< bool >::operator= ( Vector< bool > &&  x)
inline

Definition at line 3140 of file Vector.hpp.

Vector< bool > & Bial::Vector< bool >::operator= ( std::initializer_list< bool >  il)
inline

Definition at line 3165 of file Vector.hpp.

std::vector< bool >::reference Bial::Vector< bool >::operator[] ( size_t  n)
inline

Returns reference to data at position n.

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

Definition at line 3470 of file Vector.hpp.

bool Bial::Vector< bool >::operator[] ( size_t  n) const
inline

Definition at line 3478 of file Vector.hpp.

void Bial::Vector< bool >::pop_back ( )
inline

Removes last element from vector.

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

Definition at line 3721 of file Vector.hpp.

template<class O >
O & Bial::Vector< bool >::Print ( O &  os) const
inline

Prints vector containts to output stream os.

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

Definition at line 3944 of file Vector.hpp.

template<class O >
O & Bial::Vector< bool >::PrintDimensions ( O &  os) const
inline

Prints vector dimensions to output stream os.

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

Definition at line 3962 of file Vector.hpp.

void Bial::Vector< bool >::push_back ( const bool &  val)
inline

Inserts element in the end of the vector.

Date
2015/Apr/01
Parameters
valThe element to be inserted.
Returns
none.
Warning
none.

Definition at line 3675 of file Vector.hpp.

void Bial::Vector< bool >::push_back ( bool &&  val)
inline

Inserts element in the end of the vector.

Date
2015/Apr/01
Parameters
valThe element to be inserted.
Returns
none.
Warning
none.

Definition at line 3698 of file Vector.hpp.

std::vector< bool >::reverse_iterator Bial::Vector< bool >::rbegin ( )
inlinenoexcept

Definition at line 3205 of file Vector.hpp.

std::vector< bool >::const_reverse_iterator Bial::Vector< bool >::rbegin ( ) const
inlinenoexcept

Definition at line 3209 of file Vector.hpp.

Vector< bool > Bial::Vector< bool >::Read ( const std::string &  filename)
inlinestatic

Reads vector from file.

Date
2015/Jun/25
Parameters
filenameName of the file conatining vector.
Returns
The read vector.
Warning
none.

Definition at line 3316 of file Vector.hpp.

std::vector< bool >::reverse_iterator Bial::Vector< bool >::rend ( )
inlinenoexcept

Definition at line 3213 of file Vector.hpp.

std::vector< bool >::const_reverse_iterator Bial::Vector< bool >::rend ( ) const
inlinenoexcept

Definition at line 3217 of file Vector.hpp.

void Bial::Vector< bool >::reserve ( size_t  n)
inline

Changes vector capacity.

Date
2015/Apr/01
Parameters
nnew vector capacity.
Returns
none.
Warning
none.

Definition at line 3271 of file Vector.hpp.

void Bial::Vector< bool >::resize ( size_t  n)
inline

Resizes vector.

Date
2015/Apr/01
Parameters
nnew size.
Returns
none.
Warning
none.

Definition at line 3253 of file Vector.hpp.

void Bial::Vector< bool >::resize ( size_t  n,
const bool &  val 
)
inline

Resizes vector.

Date
2015/Apr/01
Parameters
nnew size.
valvalue assigned to new elements.
Returns
none.
Warning
none.

Definition at line 3258 of file Vector.hpp.

void Bial::Vector< bool >::Set ( bool  val)
inline

Assigns data to all elements.

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

Definition at line 3652 of file Vector.hpp.

void Bial::Vector< bool >::shrink_to_fit ( )
inline

Reduces vector capacity to size.

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

Definition at line 3293 of file Vector.hpp.

size_t Bial::Vector< bool >::size ( ) const
inlinenoexcept

Returns vector size.

Date
2015/Apr/01
Parameters
none.
Returns
Vector size.
Warning
none.

Definition at line 3237 of file Vector.hpp.

size_t Bial::Vector< bool >::Size ( ) const
inlinenoexcept

Definition at line 3241 of file Vector.hpp.

void Bial::Vector< bool >::swap ( Vector< bool > &  x)
inline

Exchanges content of this vector by x.

Date
2015/Apr/01
Parameters
xa vector.
Returns
none.
Warning
none.

Definition at line 3919 of file Vector.hpp.

void Bial::Vector< bool >::Write ( const std::string &  filename) const
inline

Writes vector into file.

Date
2015/Jun/25
Parameters
filenameName of the file conatining vector.
Returns
none.
Warning
none.

Definition at line 3427 of file Vector.hpp.

Member Data Documentation

std::vector< bool > Bial::Vector< bool >::_data
protected

Definition at line 509 of file Vector.hpp.

size_t Bial::Vector< bool >::_size
protected

Definition at line 511 of file Vector.hpp.

bool Bial::Vector< bool >::qk_data
protected

Definition at line 510 of file Vector.hpp.


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