cartodata
5.1.2
|
Functions | |
bool | sameSize (const std::vector< int > &s1, const std::vector< int > &s2) |
Used by the actual Volume and VolumeRef operators It allows to keep the loops in one place and to specialize for non arithmetic types. More... | |
std::vector< int > | maxSize (const std::vector< int > &s1, const std::vector< int > &s2) |
return the largest dimensions between s1 and s2 More... | |
std::vector< int > | minSize (const std::vector< int > &s1, const std::vector< int > &s2) |
return the smallest dimensions between s1 and s2 More... | |
template<typename T , typename U , typename OUTP , typename BinaryFunction > | |
Volume< OUTP > & | applyTowards (const T &cst1, const Volume< U > &vol2, Volume< OUTP > &dst, BinaryFunction func) |
template<typename T , typename UnaryFunction > | |
Volume< typename UnaryFunction::result_type > | apply (const Volume< T > &vol, UnaryFunction func) |
Apply a function to all the elements of a volume (create output version) More... | |
template<typename T , typename U , typename BinaryFunction > | |
Volume< typename BinaryFunction::result_type > | apply (const Volume< T > &vol1, const Volume< U > &vol2, BinaryFunction func) |
template<typename T , typename UnaryFunction > | |
rc_ptr< Volume< typename UnaryFunction::result_type > > | apply (const rc_ptr< Volume< T > > &vol, UnaryFunction func) |
template<typename T , typename U , typename BinaryFunction > | |
rc_ptr< Volume< typename BinaryFunction::result_type > > | apply (const rc_ptr< Volume< T > > &vol1, const Volume< U > &vol2, BinaryFunction func) |
template<typename T , typename UnaryFunction > | |
Volume< T > & | selfApply (Volume< T > &vol, UnaryFunction func) |
Apply a function to all the elements of a volume (in place version) More... | |
template<typename T , typename U , typename BinaryFunction > | |
Volume< T > & | selfApply (Volume< T > &vol1, const Volume< U > &vol2, BinaryFunction func) |
template<typename T , typename UnaryFunction > | |
rc_ptr< Volume< T > > & | selfApply (rc_ptr< Volume< T > > &vol, UnaryFunction func) |
template<typename T , typename U , typename BinaryFunction > | |
rc_ptr< Volume< T > > & | selfApply (rc_ptr< Volume< T > > &vol1, const Volume< U > &vol2, BinaryFunction func) |
template<typename T , typename OUTP , typename UnaryFunction > | |
Volume< OUTP > & | applyTowards (const Volume< T > &vol, Volume< OUTP > &dst, UnaryFunction func) |
Apply a function to all the elements of a volume (already allocated output version) More... | |
template<typename T , typename OUTP , typename UnaryFunction > | |
Volume< OUTP > & | applyTowards (const T &cst, Volume< OUTP > &dst, UnaryFunction func) |
template<typename T , typename U , typename OUTP , typename BinaryFunction > | |
Volume< OUTP > & | applyTowards (const Volume< T > &vol1, const Volume< U > &vol2, Volume< OUTP > &dst, BinaryFunction func) |
template<typename T , typename U , typename OUTP , typename BinaryFunction > | |
Volume< OUTP > & | applyTowards (const Volume< T > &vol1, const U &cst2, Volume< OUTP > &dst, BinaryFunction func) |
template<typename OUTP , typename T , typename BinaryFunction > | |
OUTP | accumulate (const Volume< T > &vol, BinaryFunction func, OUTP initial) |
Accumulation over a volume. More... | |
template<typename OUTP , typename T , typename BinaryFunction > | |
OUTP | accumulate (const rc_ptr< Volume< T > > &vol, BinaryFunction func, OUTP initial) |
|
inline |
Definition at line 832 of file volumeutil.h.
Referenced by carto::max(), carto::min(), and carto::sum().
|
inline |
Accumulation over a volume.
The result is equivalent to
Examples:
plus
performs a sum over the volumeselect_min
returns its minimum value Definition at line 814 of file volumeutil.h.
References carto::Volume< T >::at(), carto::NDIterator_base::ended(), carto::VolumeProxy< T >::getSize(), carto::Volume< T >::getStrides(), carto::const_line_NDIterator< class >::inc_line_ptr(), and carto::const_line_NDIterator< class >::line_length().
Referenced by carto::all(), and carto::any().
|
inline |
Definition at line 543 of file volumeutil.h.
References applyTowards().
|
inline |
Definition at line 554 of file volumeutil.h.
References applyTowards(), carto::VolumeProxy< T >::getSize(), and maxSize().
|
inline |
Apply a function to all the elements of a volume (create output version)
Definition at line 518 of file volumeutil.h.
References applyTowards().
Referenced by carto::invertMinMax(), carto::operator%(), carto::operator&(), carto::operator*(), carto::operator+(), carto::operator-(), carto::operator/(), carto::operator^(), carto::operator|(), and carto::operator~().
|
inline |
Definition at line 529 of file volumeutil.h.
References applyTowards(), carto::VolumeProxy< T >::getSize(), and maxSize().
|
inline |
Definition at line 723 of file volumeutil.h.
References applyTowards(), carto::Volume< T >::at(), carto::NDIterator_base::ended(), carto::VolumeProxy< T >::getSize(), carto::Volume< T >::getStrides(), carto::const_line_NDIterator< class >::inc_line_ptr(), carto::line_NDIterator< class >::inc_line_ptr(), carto::const_line_NDIterator< class >::line_length(), minSize(), carto::ref< class >::release(), carto::rc_ptr< class >::reset(), and sameSize().
|
inline |
Apply a function to all the elements of a volume (already allocated output version)
Definition at line 603 of file volumeutil.h.
References carto::Volume< T >::at(), carto::NDIterator_base::ended(), carto::VolumeProxy< T >::getSize(), carto::Volume< T >::getStrides(), carto::const_line_NDIterator< class >::inc_line_ptr(), carto::line_NDIterator< class >::inc_line_ptr(), carto::const_line_NDIterator< class >::line_length(), minSize(), carto::ref< class >::release(), carto::rc_ptr< class >::reset(), and sameSize().
Referenced by apply(), applyTowards(), carto::operator!(), carto::operator!=(), carto::operator&&(), carto::operator<(), carto::operator<=(), carto::operator==(), carto::operator||(), selfApply(), carto::transfer(), carto::valuesIn(), and carto::valuesNotIn().
|
inline |
Definition at line 768 of file volumeutil.h.
References applyTowards(), carto::Volume< T >::at(), carto::NDIterator_base::ended(), carto::VolumeProxy< T >::getSize(), carto::Volume< T >::getStrides(), carto::const_line_NDIterator< class >::inc_line_ptr(), carto::line_NDIterator< class >::inc_line_ptr(), carto::const_line_NDIterator< class >::line_length(), minSize(), carto::ref< class >::release(), carto::rc_ptr< class >::reset(), and sameSize().
|
inline |
Definition at line 666 of file volumeutil.h.
References applyTowards(), carto::Volume< T >::at(), carto::NDIterator_base::ended(), carto::VolumeProxy< T >::getSize(), carto::Volume< T >::getStrides(), carto::const_line_NDIterator< class >::inc_line_ptr(), carto::line_NDIterator< class >::inc_line_ptr(), carto::const_line_NDIterator< class >::line_length(), minSize(), carto::ref< class >::release(), carto::rc_ptr< class >::reset(), and sameSize().
|
inline |
return the largest dimensions between s1 and s2
Definition at line 479 of file volumeutil.h.
References carto::max().
Referenced by apply().
|
inline |
return the smallest dimensions between s1 and s2
Definition at line 497 of file volumeutil.h.
References carto::min().
Referenced by carto::Volume< T >::allocate(), and applyTowards().
|
inline |
Used by the actual Volume and VolumeRef operators It allows to keep the loops in one place and to specialize for non arithmetic types.
test if two volumes sizes vectors actually represent the same size (extending missing dimensions to 1)
Definition at line 460 of file volumeutil.h.
Referenced by applyTowards().
|
inline |
Definition at line 585 of file volumeutil.h.
References selfApply().
|
inline |
Definition at line 593 of file volumeutil.h.
References selfApply().
|
inline |
Apply a function to all the elements of a volume (in place version)
Definition at line 567 of file volumeutil.h.
References applyTowards().
Referenced by carto::conditionalSet(), carto::Volume< T >::fill(), carto::operator%=(), carto::operator&=(), carto::operator*=(), carto::operator++(), carto::operator+=(), carto::operator--(), carto::operator-=(), carto::operator/=(), carto::operator^=(), carto::operator|=(), and selfApply().
|
inline |
Definition at line 575 of file volumeutil.h.
References applyTowards().