SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
slip::Array3d< T > Class Template Reference

This is a three-dimensional dynamic and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access. More...

#include <Array3d.hpp>

Public Types

typedef T value_type
 
typedef Array3d< T > self
 
typedef const Array3d< T > const_self
 
typedef value_typereference
 
typedef value_type const & const_reference
 
typedef value_typepointer
 
typedef value_type const * const_pointer
 
typedef ptrdiff_t difference_type
 
typedef std::size_t size_type
 
typedef value_typeiterator
 
typedef value_type const * const_iterator
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 
typedef stride_iterator< pointerslice_iterator
 
typedef stride_iterator
< const_pointer
const_slice_iterator
 
typedef pointer row_iterator
 
typedef const_pointer const_row_iterator
 
typedef slip::stride_iterator
< pointer
col_iterator
 
typedef slip::stride_iterator
< const_pointer
const_col_iterator
 
typedef slip::stride_iterator
< slice_iterator
slice_range_iterator
 
typedef slip::stride_iterator
< const_slice_iterator
const_slice_range_iterator
 
typedef slip::stride_iterator
< pointer
row_range_iterator
 
typedef slip::stride_iterator
< const_pointer
const_row_range_iterator
 
typedef slip::stride_iterator
< col_iterator
col_range_iterator
 
typedef slip::stride_iterator
< const_col_iterator
const_col_range_iterator
 
typedef std::reverse_iterator
< slice_iterator
reverse_slice_iterator
 
typedef std::reverse_iterator
< const_slice_iterator
const_reverse_slice_iterator
 
typedef std::reverse_iterator
< iterator
reverse_row_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_row_iterator
 
typedef std::reverse_iterator
< col_iterator
reverse_col_iterator
 
typedef std::reverse_iterator
< const_col_iterator
const_reverse_col_iterator
 
typedef std::reverse_iterator
< slice_range_iterator
reverse_slice_range_iterator
 
typedef std::reverse_iterator
< const_slice_range_iterator
const_reverse_slice_range_iterator
 
typedef std::reverse_iterator
< row_range_iterator
reverse_row_range_iterator
 
typedef std::reverse_iterator
< const_row_range_iterator
const_reverse_row_range_iterator
 
typedef std::reverse_iterator
< col_range_iterator
reverse_col_range_iterator
 
typedef std::reverse_iterator
< const_col_range_iterator
const_reverse_col_range_iterator
 
typedef slip::iterator3d_plane
< self
iterator2d
 
typedef
slip::const_iterator3d_plane
< const_self
const_iterator2d
 
typedef std::reverse_iterator
< iterator2d
reverse_iterator2d
 
typedef std::reverse_iterator
< const_iterator2d
const_reverse_iterator2d
 
typedef slip::iterator3d_box
< self
iterator3d
 
typedef
slip::const_iterator3d_box
< const_self
const_iterator3d
 
typedef slip::iterator3d_range
< self
iterator3d_range
 
typedef
slip::const_iterator3d_range
< const_self
const_iterator3d_range
 
typedef std::reverse_iterator
< iterator3d
reverse_iterator3d
 
typedef std::reverse_iterator
< const_iterator3d
const_reverse_iterator3d
 
typedef std::reverse_iterator
< iterator3d_range
reverse_iterator3d_range
 
typedef std::reverse_iterator
< const_iterator3d_range
const_reverse_iterator3d_range
 
typedef iterator3d default_iterator
 
typedef const_iterator3d const_default_iterator
 

Public Member Functions

void resize (std::size_t d1, std::size_t d2, std::size_t d3, const T &val=T())
 Resizes a Array3d. More...
 
std::string name () const
 Returns the name of the class. More...
 
size_type dim1 () const
 Returns the number of slices (first dimension size) in the Array3d. More...
 
size_type slices () const
 Returns the number of slices (first dimension size) in the Array3d. More...
 
size_type dim2 () const
 Returns the number of rows (second dimension size) in the Array3d. More...
 
size_type rows () const
 Returns the number of rows (second dimension size) in the Array3d. More...
 
size_type dim3 () const
 Returns the number of columns (third dimension size) in the Array3d. More...
 
size_type cols () const
 Returns the number of columns (third dimension size) in the Array3d. More...
 
size_type columns () const
 Returns the number of columns (third dimension size) in the Array3d. More...
 
size_type size () const
 Returns the number of elements in the Array3d. More...
 
size_type max_size () const
 Returns the maximal size (number of elements) in the Array3d. More...
 
size_type slice_size () const
 Returns the number of elements in a slice of the Array3d. More...
 
bool empty () const
 Returns true if the Array3d is empty. (Thus size() == 0) More...
 
void swap (Array3d &M)
 Swaps data with another Array3d. More...
 
template<typename T>
 Array3d (const typename Array3d< T >::size_type d1, const typename Array3d< T >::size_type d2, const typename Array3d< T >::size_type d3)
 
template<typename T>
 Array3d (const typename Array3d< T >::size_type d1, const typename Array3d< T >::size_type d2, const typename Array3d< T >::size_type d3, const T &val)
 
template<typename T>
 Array3d (const typename Array3d< T >::size_type d1, const typename Array3d< T >::size_type d2, const typename Array3d< T >::size_type d3, const T *val)
 
Constructors & Destructors
 Array3d ()
 Constructs a Array3d. More...
 
 Array3d (const std::size_t d1, const std::size_t d2, const std::size_t d3)
 Constructs a Array3d. More...
 
 Array3d (const std::size_t d1, const std::size_t d2, const std::size_t d3, const T &val)
 Constructs a Array3d initialized by the scalar value val. More...
 
 Array3d (const std::size_t d1, const std::size_t d2, const std::size_t d3, const T *val)
 Constructs a Array3d initialized by an array val. More...
 
template<typename InputIterator >
 Array3d (const size_type d1, const size_type d2, const size_type d3, InputIterator first, InputIterator last)
 Contructs a Array3d from a range. More...
 
 Array3d (const Array3d< T > &rhs)
 Constructs a copy of the Array3d rhs. More...
 
 ~Array3d ()
 Destructor of the Array3d. More...
 
One dimensional global iterators
const_iterator begin () const
 Returns a read-only (constant) iterator that points to the first element in the Array3d. Iteration is done in ordinary element order. More...
 
iterator begin ()
 Returns a read/write iterator that points to the first element in the Array3d. Iteration is done in ordinary element order. More...
 
iterator end ()
 Returns a read/write iterator that points one past the last element in the Array3d. Iteration is done in ordinary element order. More...
 
const_iterator end () const
 Returns a read-only (constant) iterator that points one past the last element in the Array3d. Iteration is done in ordinary element order. More...
 
reverse_iterator rbegin ()
 Returns a read/write reverse iterator that points to the last element in the Array3d. Iteration is done in reverse element order. More...
 
const_reverse_iterator rbegin () const
 Returns a read-only (constant) reverse iterator that points to the last element in the Array3d. Iteration is done in reverse element order. More...
 
reverse_iterator rend ()
 Returns a read/write reverse iterator that points to one before the first element in the Array3d. Iteration is done in reverse element order. More...
 
const_reverse_iterator rend () const
 Returns a read-only (constant) reverse iterator that points to one before the first element in the Array3d. Iteration is done in reverse element order. More...
 
One dimensional slice iterators
slice_iterator slice_begin (const size_type row, const size_type col)
 Returns a read/write iterator that points to the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number). More...
 
const_slice_iterator slice_begin (const size_type row, const size_type col) const
 Returns a read-only (constant) iterator that points to the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number). More...
 
slice_iterator slice_end (const size_type row, const size_type col)
 Returns a read/write iterator that points to the one past the end element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number). More...
 
const_slice_iterator slice_end (const size_type row, const size_type col) const
 Returns a read-only (constant) iterator that points to the one past the end element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number). More...
 
reverse_slice_iterator slice_rbegin (const size_type row, const size_type col)
 Returns a read/write iterator that points to the last element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number). More...
 
const_reverse_slice_iterator slice_rbegin (const size_type row, const size_type col) const
 Returns a read-only (constant) iterator that points to the last element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number). More...
 
reverse_slice_iterator slice_rend (const size_type row, const size_type col)
 Returns a read/write iterator that points to the one before the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number). More...
 
const_reverse_slice_iterator slice_rend (const size_type row, const size_type col) const
 Returns a read (constant) iterator that points to the one before the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number). More...
 
One dimensional row iterators
row_iterator row_begin (const size_type slice, const size_type row)
 Returns a read/write iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order. More...
 
const_row_iterator row_begin (const size_type slice, const size_type row) const
 Returns a read_only iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order. More...
 
row_iterator row_end (const size_type slice, const size_type row)
 Returns a read/write iterator that points to the past-the-end element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order. More...
 
const_row_iterator row_end (const size_type slice, const size_type row) const
 Returns a read_only iterator that points to the past-the-end element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order. More...
 
reverse_row_iterator row_rbegin (const size_type slice, const size_type row)
 Returns a read/write reverse iterator that points to the last element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order. More...
 
const_reverse_row_iterator row_rbegin (const size_type slice, const size_type row) const
 Returns a read_only reverse iterator that points to the last element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order. More...
 
reverse_row_iterator row_rend (const size_type slice, const size_type row)
 Returns a read/write reverse iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order. More...
 
const_reverse_row_iterator row_rend (const size_type slice, const size_type row) const
 Returns a read_only reverse iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order. More...
 
One dimensional col iterators
col_iterator col_begin (const size_type slice, const size_type col)
 Returns a read/write iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
const_col_iterator col_begin (const size_type slice, const size_type col) const
 Returns a read_only iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
col_iterator col_end (const size_type slice, const size_type col)
 Returns a read/write iterator that points to the past-the-end element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
const_col_iterator col_end (const size_type slice, const size_type col) const
 Returns a read_only iterator that points to the past-the-end element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
reverse_col_iterator col_rbegin (const size_type slice, const size_type col)
 Returns a read/write reverse iterator that points to the last element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
const_reverse_col_iterator col_rbegin (const size_type slice, const size_type col) const
 Returns a read_only reverse iterator that points to the last element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
reverse_col_iterator col_rend (const size_type slice, const size_type col)
 Returns a read/write reverse iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
const_reverse_col_iterator col_rend (const size_type slice, const size_type col) const
 Returns a read_only reverse iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns. More...
 
One dimensional slice range iterators
slice_range_iterator slice_begin (const size_type row, const size_type col, const slip::Range< int > &range)
 Returns a read/write iterator that points to the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
slice_range_iterator slice_end (const size_type row, const size_type col, const slip::Range< int > &range)
 Returns a read/write iterator that points one past the end element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
const_slice_range_iterator slice_begin (const size_type row, const size_type col, const slip::Range< int > &range) const
 Returns a read only (constant) iterator that points to the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
const_slice_range_iterator slice_end (const size_type row, const size_type col, const slip::Range< int > &range) const
 Returns a read_only iterator that points one past the last element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
reverse_slice_range_iterator slice_rbegin (const size_type row, const size_type col, const slip::Range< int > &range)
 Returns a read/write iterator that points to the last element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
reverse_slice_range_iterator slice_rend (const size_type row, const size_type col, const slip::Range< int > &range)
 Returns a read/write iterator that points to the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order according to the Range. More...
 
const_reverse_slice_range_iterator slice_rbegin (const size_type row, const size_type col, const slip::Range< int > &range) const
 Returns a read only (constant) iterator that points to the last element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order according to the Range. More...
 
const_reverse_slice_range_iterator slice_rend (const size_type row, const size_type col, const slip::Range< int > &range) const
 Returns a read_only iterator that points one past the lastto the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order according to the Range. More...
 
One dimensional row range iterators
row_range_iterator row_begin (const size_type slice, const size_type row, const slip::Range< int > &range)
 Returns a read/write iterator that points to the first element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
row_range_iterator row_end (const size_type slice, const size_type row, const slip::Range< int > &range)
 Returns a read/write iterator that points one past the end element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
const_row_range_iterator row_begin (const size_type slice, const size_type row, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the first element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
const_row_range_iterator row_end (const size_type slice, const size_type row, const slip::Range< int > &range) const
 Returns a read_only iterator that points one past the last element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
reverse_row_range_iterator row_rbegin (const size_type slice, const size_type row, const slip::Range< int > &range)
 Returns a read-write iterator that points to the last element of the Range range of the row of a slice row and slice in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
reverse_row_range_iterator row_rend (const size_type slice, const size_type row, const slip::Range< int > &range)
 Returns a read-write iterator that points one before the first element of the Range range of the row of a slice row in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_row_range_iterator row_rbegin (const size_type slice, const size_type row, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the last element of the Range range of the row of a slice row in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_row_range_iterator row_rend (const size_type slice, const size_type row, const slip::Range< int > &range) const
 Returns a read-only iterator that points one before the first element of the Range range of the row of a slice row in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
One dimensional col range iterators
col_range_iterator col_begin (const size_type slice, const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to the first element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
col_range_iterator col_end (const size_type slice, const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to the past the end element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
const_col_range_iterator col_begin (const size_type slice, const size_type col, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the first element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
const_col_range_iterator col_end (const size_type slice, const size_type col, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the past the end element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range. More...
 
reverse_col_range_iterator col_rbegin (const size_type slice, const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to the last element of the Range range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
reverse_col_range_iterator col_rend (const size_type slice, const size_type col, const slip::Range< int > &range)
 Returns a read-write iterator that points to one before the first element of the Range range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_col_range_iterator col_rbegin (const size_type slice, const size_type col, const slip::Range< int > &range) const
 Returns a read_only iterator that points to the last element of the Range & range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_col_range_iterator col_rend (const size_type slice, const size_type col, const slip::Range< int > &range) const
 Returns a read-only iterator that points to the first element of the Range range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range. More...
 
One dimensional global plane iterators
iterator plane_begin (const size_type slice)
 Returns a read/write iterator that points to the first element in the in the slice plane of the Array3d. Iteration is done in ordinary element order. More...
 
const_iterator plane_begin (const size_type slice) const
 Returns a read-only (constant) iterator that points to the first element in the slice plane of the Array3d. Iteration is done in ordinary element order. More...
 
iterator plane_end (const size_type slice)
 Returns a read/write iterator that points one past the last element in the slice plane of the Array3d. Iteration is done in ordinary element order. More...
 
const_iterator plane_end (const size_type slice) const
 Returns a read-only (constant) iterator that points one past the last element in the slice plane of the Array3d. Iteration is done in ordinary element order. More...
 
reverse_iterator plane_rbegin (const size_type slice)
 Returns a read/write reverse iterator that points to the last element in the slice plane of the Array3d. Iteration is done in reverse element order. More...
 
const_reverse_iterator plane_rbegin (const size_type slice) const
 Returns a read-only (constant) reverse iterator that points to the last element in the slice plane k of the Array3d. Iteration is done in reverse element order. More...
 
reverse_iterator plane_rend (const size_type slice)
 Returns a read/write reverse iterator that points to one before the first element in the slice plane of the Array3d. Iteration is done in reverse element order. More...
 
const_reverse_iterator plane_rend (const size_type slice) const
 Returns a read-only (constant) reverse iterator that points to one before the first element in the slice plane of the Array3d. Iteration is done in reverse element order. More...
 
two dimensionnal plane iterators : Global iterators
iterator2d plane_upper_left (PLANE_ORIENTATION P, const size_type plane_coordinate)
 Returns a read/write iterator that points to the first element of the plane in the Array3d. It points to the upper left element of the plane Iteration is done in ordinary element order. More...
 
iterator2d plane_bottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate)
 Returns a read/write iterator that points to the last element of the plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order. More...
 
const_iterator2d plane_upper_left (PLANE_ORIENTATION P, const size_type plane_coordinate) const
 Returns a read/write const iterator that points to the first element of the plane in the Array3d. It points to the upper left element of the plane Iteration is done in ordinary element order. More...
 
const_iterator2d plane_bottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate) const
 Returns a read/write const iterator that points to the last element of the plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order. More...
 
reverse_iterator2d plane_rupper_left (PLANE_ORIENTATION P, const size_type plane_coordinate)
 Returns a read/write reverse_iterator that points to the bottom right element of the plane in the Array3d. Iteration is done in backward element order. More...
 
reverse_iterator2d plane_rbottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate)
 Returns a read/write reverse_iterator that points to the upper left element of the plane in the Array3d. Iteration is done in backward element order. More...
 
const_reverse_iterator2d plane_rupper_left (PLANE_ORIENTATION P, const size_type plane_coordinate) const
 Returns a read/write const reverse iterator that points to the bottom right element of the plane in the Array3d. Iteration is done in backward element order. More...
 
const_reverse_iterator2d plane_rbottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate) const
 Returns a read/write const reverse iterator that points to the upper left element of the plane in the Array3d. Iteration is done in backward element order. More...
 
two dimensionnal plane iterators : box iterators
iterator2d plane_upper_left (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b)
 Returns a read/write iterator that points to the first element of a box within a plane in the Array3d. It points to the upper left element of the box Iteration is done in ordinary element order. More...
 
iterator2d plane_bottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b)
 Returns a read/write iterator that points to the last element of a box within a plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order. More...
 
const_iterator2d plane_upper_left (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b) const
 Returns a read/write const iterator that points to the first element of a box within a plane in the Array3d. It points to the upper left element of the plane Iteration is done in ordinary element order. More...
 
const_iterator2d plane_bottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b) const
 Returns a read/write const iterator that points to the last element of a box within a plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order. More...
 
reverse_iterator2d plane_rupper_left (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b)
 Returns a read/write reverse iterator that points to the last element of a box within a plane in the Array3d. It points to the bottom right element of the box Iteration is done in backward element order. More...
 
reverse_iterator2d plane_rbottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b)
 Returns a read/write reverse iterator that points to the first element of a box within a plane in the Array3d. It points to the upper left element of the plane Iteration is done in backward element order. More...
 
const_reverse_iterator2d plane_rupper_left (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b) const
 Returns a read/write const reverse iterator that points to the last element of a box within a plane in the Array3d. It points to the bottom right element of the plane Iteration is done in backward element order. More...
 
const_reverse_iterator2d plane_rbottom_right (PLANE_ORIENTATION P, const size_type plane_coordinate, const Box2d< int > &b) const
 Returns a read/write const reverse iterator that points to the first element of a box within a plane in the Array3d. It points to the bottom right element of the plane Iteration is done in backward element order. More...
 
three dimensionnal iterators : Global iterators
iterator3d front_upper_left ()
 Returns a read/write iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Array3d. More...
 
iterator3d back_bottom_right ()
 Returns a read/write iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Array3d. More...
 
const_iterator3d front_upper_left () const
 Returns a read-only iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Array3d. More...
 
const_iterator3d back_bottom_right () const
 Returns a read-only iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Array3d. More...
 
reverse_iterator3d rfront_upper_left ()
 Returns a read/write reverse iterator3d. It points to the back bottom right element of the Array3d. Iteration is done within the Array3d in the reverse order. More...
 
reverse_iterator3d rback_bottom_right ()
 Returns a read/write reverse iterator3d. It points to past the front upper left element of the Array3d. Iteration is done in the reverse order. More...
 
const_reverse_iterator3d rfront_upper_left () const
 Returns a read only reverse iterator3d that points. It points to the back bottom right element of the Array3d. Iteration is done within the Array3d in the reverse order. More...
 
const_reverse_iterator3d rback_bottom_right () const
 Returns a read only reverse iterator3d. It points to past the front upper left element of the Array3d. Iteration is done in the reverse order. More...
 
three dimensionnal iterators : Box iterators
iterator3d front_upper_left (const Box3d< int > &box)
 Returns a read/write iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Box3d associated to the Array3d. More...
 
iterator3d back_bottom_right (const Box3d< int > &box)
 Returns a read/write iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Box3d associated to the Array3d. More...
 
const_iterator3d front_upper_left (const Box3d< int > &box) const
 Returns a read only iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Box3d associated to the Array3d. More...
 
const_iterator3d back_bottom_right (const Box3d< int > &box) const
 Returns a read only iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Box3d associated to the Array3d. More...
 
reverse_iterator3d rfront_upper_left (const Box3d< int > &box)
 Returns a read/write reverse iterator3d. It points to the back bottom right element of the Box3d associated to the Array3d. Iteration is done in the reverse order. More...
 
reverse_iterator3d rback_bottom_right (const Box3d< int > &box)
 Returns a read/write reverse iterator3d. It points to one before the front upper left element of the Box3d box associated to the Array3d. More...
 
const_reverse_iterator3d rfront_upper_left (const Box3d< int > &box) const
 Returns a read only reverse iterator3d. It points to the back bottom right element of the Box3d box associated to the Array3d. Iteration is done in the reverse order. More...
 
const_reverse_iterator3d rback_bottom_right (const Box3d< int > &box) const
 Returns a read-only reverse iterator3d. It points to one before the front element of the bottom right element of the Box3d box associated to the Array3d. More...
 
three dimensionnal iterators : Range iterators
iterator3d_range front_upper_left (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write iterator3d_range that points to the front upper left element of the ranges slice_range, row_range and col_range associated to the Array3d. More...
 
iterator3d_range back_bottom_right (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write iterator3d_range that points to the past the end back bottom right element of the ranges slice_range, row_range and col_range associated to the Array3d. More...
 
const_iterator3d_range front_upper_left (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only iterator3d_range that points to the to the front upper left element of the ranges slice_range, row_range and col_range associated to the Array3d. More...
 
const_iterator3d_range back_bottom_right (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only iterator3d_range that points to the past the end back bottom right element of the ranges slice_range, row_range and col_range associated to the Array3d. More...
 
reverse_iterator3d_range rfront_upper_left (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write reverse_iterator3d_range that points to the past the back bottom right element of the ranges row_range and col_range associated to the Array3d. Iteration is done in the reverse order. More...
 
reverse_iterator3d_range rback_bottom_right (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write reverse_iterator3d_range that points to one before the front upper left element of the ranges row_range and col_range associated to the Array3d. Iteration is done in the reverse order. More...
 
const_reverse_iterator3d_range rfront_upper_left (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only reverse_iterator3d_range that points to the past the back bottom right element of the ranges row_range and col_range associated to the Array3d. Iteration is done in the reverse order. More...
 
const_reverse_iterator3d_range rback_bottom_right (const Range< int > &slice_range, const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only reverse_iterator3d_range that points to one before the front upper left element of the ranges row_range and col_range associated to the Array3d.Iteration is done in the reverse order. More...
 
Assignment operators and methods
selfoperator= (const Array3d< T > &rhs)
 Assign a Array3d. More...
 
selfoperator= (const T &value)
 Assign all the elments of the Array3d by value. More...
 
void fill (const T &value)
 Fills the container range [begin(),begin()+size()) with copies of value. More...
 
void fill (const T *value)
 Fills the container range [begin(),begin()+size()) with a copy of the value array. More...
 
template<typename InputIterator >
void fill (InputIterator first, InputIterator last)
 Fills the container range [begin(),begin()+size()) with a copy of the range [first,last) More...
 
Element access operators
T ** operator[] (const size_type k)
 
const T *const * operator[] (const size_type k) const
 
reference operator() (const size_type k, const size_type i, const size_type j)
 Subscript access to the data contained in the Array3d. More...
 
const_reference operator() (const size_type k, const size_type i, const size_type j) const
 Subscript access to the data contained in the Array3d. More...
 

Static Public Attributes

static const std::size_t DIM = 3
 

Friends

class boost::serialization::access
 
i/o operators
std::ostream & operator<< (std::ostream &out, const self &a)
 Write the Array3d to the ouput stream. More...
 
Comparison operators
bool operator== (const Array3d< T > &x, const Array3d< T > &y)
 Array3d equality comparison More...
 
bool operator!= (const Array3d< T > &x, const Array3d< T > &y)
 Array3d inequality comparison More...
 
bool operator< (const Array3d< T > &x, const Array3d< T > &y)
 Less than comparison operator (Array3d ordering relation) More...
 
bool operator> (const Array3d< T > &x, const Array3d< T > &y)
 More than comparison operator. More...
 
bool operator<= (const Array3d< T > &x, const Array3d< T > &y)
 Less than equal comparison operator. More...
 
bool operator>= (const Array3d< T > &x, const Array3d< T > &y)
 More than equal comparison operator. More...
 

Detailed Description

template<typename T>
class slip::Array3d< T >

This is a three-dimensional dynamic and generic container. This container statisfies the BidirectionnalContainer concepts of the STL. It is also an 2d extension of the RandomAccessContainer concept. That is to say the bracket element access is replaced by the triple bracket element access.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.3
Date
2014/03/15
Since
1.0.0
Parameters
TType of the elements in the Array3d.
Axis conventions:
iterator3d_conventions.jpg
axis and notation conventions

Definition at line 109 of file Array3d.hpp.

Member Typedef Documentation

template<typename T>
typedef slip::stride_iterator<pointer> slip::Array3d< T >::col_iterator

Definition at line 190 of file Array3d.hpp.

Definition at line 196 of file Array3d.hpp.

Definition at line 191 of file Array3d.hpp.

Definition at line 197 of file Array3d.hpp.

template<typename T>
typedef const_iterator3d slip::Array3d< T >::const_default_iterator

Definition at line 241 of file Array3d.hpp.

template<typename T>
typedef value_type const* slip::Array3d< T >::const_iterator

Definition at line 180 of file Array3d.hpp.

Definition at line 223 of file Array3d.hpp.

Definition at line 230 of file Array3d.hpp.

Definition at line 232 of file Array3d.hpp.

template<typename T>
typedef value_type const* slip::Array3d< T >::const_pointer

Definition at line 174 of file Array3d.hpp.

template<typename T>
typedef value_type const& slip::Array3d< T >::const_reference

Definition at line 171 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_col_iterator> slip::Array3d< T >::const_reverse_col_iterator

Definition at line 204 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_col_range_iterator> slip::Array3d< T >::const_reverse_col_range_iterator

Definition at line 210 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_iterator> slip::Array3d< T >::const_reverse_iterator

Definition at line 183 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_iterator2d> slip::Array3d< T >::const_reverse_iterator2d

Definition at line 226 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_iterator3d> slip::Array3d< T >::const_reverse_iterator3d

Definition at line 235 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_iterator3d_range> slip::Array3d< T >::const_reverse_iterator3d_range

Definition at line 237 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_iterator> slip::Array3d< T >::const_reverse_row_iterator

Definition at line 202 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_row_range_iterator> slip::Array3d< T >::const_reverse_row_range_iterator

Definition at line 208 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_slice_iterator> slip::Array3d< T >::const_reverse_slice_iterator

Definition at line 200 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<const_slice_range_iterator> slip::Array3d< T >::const_reverse_slice_range_iterator

Definition at line 206 of file Array3d.hpp.

template<typename T>
typedef const_pointer slip::Array3d< T >::const_row_iterator

Definition at line 189 of file Array3d.hpp.

Definition at line 195 of file Array3d.hpp.

template<typename T>
typedef const Array3d<T> slip::Array3d< T >::const_self

Definition at line 168 of file Array3d.hpp.

template<typename T>
typedef stride_iterator<const_pointer> slip::Array3d< T >::const_slice_iterator

Definition at line 187 of file Array3d.hpp.

Definition at line 193 of file Array3d.hpp.

template<typename T>
typedef iterator3d slip::Array3d< T >::default_iterator

Definition at line 240 of file Array3d.hpp.

template<typename T>
typedef ptrdiff_t slip::Array3d< T >::difference_type

Definition at line 176 of file Array3d.hpp.

template<typename T>
typedef value_type* slip::Array3d< T >::iterator

Definition at line 179 of file Array3d.hpp.

template<typename T>
typedef slip::iterator3d_plane<self> slip::Array3d< T >::iterator2d

Definition at line 222 of file Array3d.hpp.

template<typename T>
typedef slip::iterator3d_box<self> slip::Array3d< T >::iterator3d

Definition at line 229 of file Array3d.hpp.

template<typename T>
typedef slip::iterator3d_range<self> slip::Array3d< T >::iterator3d_range

Definition at line 231 of file Array3d.hpp.

template<typename T>
typedef value_type* slip::Array3d< T >::pointer

Definition at line 173 of file Array3d.hpp.

template<typename T>
typedef value_type& slip::Array3d< T >::reference

Definition at line 170 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<col_iterator> slip::Array3d< T >::reverse_col_iterator

Definition at line 203 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<col_range_iterator> slip::Array3d< T >::reverse_col_range_iterator

Definition at line 209 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<iterator> slip::Array3d< T >::reverse_iterator

Definition at line 182 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<iterator2d> slip::Array3d< T >::reverse_iterator2d

Definition at line 225 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<iterator3d> slip::Array3d< T >::reverse_iterator3d

Definition at line 234 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<iterator3d_range> slip::Array3d< T >::reverse_iterator3d_range

Definition at line 236 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<iterator> slip::Array3d< T >::reverse_row_iterator

Definition at line 201 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<row_range_iterator> slip::Array3d< T >::reverse_row_range_iterator

Definition at line 207 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<slice_iterator> slip::Array3d< T >::reverse_slice_iterator

Definition at line 199 of file Array3d.hpp.

template<typename T>
typedef std::reverse_iterator<slice_range_iterator> slip::Array3d< T >::reverse_slice_range_iterator

Definition at line 205 of file Array3d.hpp.

template<typename T>
typedef pointer slip::Array3d< T >::row_iterator

Definition at line 188 of file Array3d.hpp.

template<typename T>
typedef slip::stride_iterator<pointer> slip::Array3d< T >::row_range_iterator

Definition at line 194 of file Array3d.hpp.

template<typename T>
typedef Array3d<T> slip::Array3d< T >::self

Definition at line 167 of file Array3d.hpp.

template<typename T>
typedef std::size_t slip::Array3d< T >::size_type

Definition at line 177 of file Array3d.hpp.

template<typename T>
typedef stride_iterator<pointer> slip::Array3d< T >::slice_iterator

Definition at line 186 of file Array3d.hpp.

Definition at line 192 of file Array3d.hpp.

template<typename T>
typedef T slip::Array3d< T >::value_type

Definition at line 166 of file Array3d.hpp.

Constructor & Destructor Documentation

template<typename T >
slip::Array3d< T >::Array3d ( )
inline

Constructs a Array3d.

Definition at line 3509 of file Array3d.hpp.

template<typename T>
slip::Array3d< T >::Array3d ( const std::size_t  d1,
const std::size_t  d2,
const std::size_t  d3 
)

Constructs a Array3d.

Parameters
d1first dimension of the Array3d
d2second dimension of the Array3d
d3third dimension of the Array3d
The Array3d is initialized by the default value of T.
template<typename T>
slip::Array3d< T >::Array3d ( const std::size_t  d1,
const std::size_t  d2,
const std::size_t  d3,
const T &  val 
)

Constructs a Array3d initialized by the scalar value val.

Parameters
d1first dimension of the Array3d
d2second dimension of the Array3d
d3third dimension of the Array3d
valinitialization value of the elements
template<typename T>
slip::Array3d< T >::Array3d ( const std::size_t  d1,
const std::size_t  d2,
const std::size_t  d3,
const T *  val 
)

Constructs a Array3d initialized by an array val.

Parameters
d1first dimension of the Array3d
d2second dimension of the Array3d
d3third dimension of the Array3d
valinitialization array value of the elements
template<typename T>
template<typename InputIterator >
slip::Array3d< T >::Array3d ( const size_type  d1,
const size_type  d2,
const size_type  d3,
InputIterator  first,
InputIterator  last 
)
inline

Contructs a Array3d from a range.

Parameters
d1first dimension of the Array3d
d2second dimension of the Array3d
d3third dimension of the Array3d
firstAn input iterator.
lastAn input iterator.
Date
2014/03/13 Create a Array3d consisting of copies of the elements from [first,last).

Definition at line 303 of file Array3d.hpp.

template<typename T>
slip::Array3d< T >::Array3d ( const Array3d< T > &  rhs)
inline

Constructs a copy of the Array3d rhs.

Definition at line 3551 of file Array3d.hpp.

template<typename T >
slip::Array3d< T >::~Array3d ( )
inline

Destructor of the Array3d.

Definition at line 3563 of file Array3d.hpp.

template<typename T>
template<typename T>
slip::Array3d< T >::Array3d ( const typename Array3d< T >::size_type  d1,
const typename Array3d< T >::size_type  d2,
const typename Array3d< T >::size_type  d3 
)
inline

Definition at line 3516 of file Array3d.hpp.

template<typename T>
template<typename T>
slip::Array3d< T >::Array3d ( const typename Array3d< T >::size_type  d1,
const typename Array3d< T >::size_type  d2,
const typename Array3d< T >::size_type  d3,
const T &  val 
)
inline

Definition at line 3527 of file Array3d.hpp.

template<typename T>
template<typename T>
slip::Array3d< T >::Array3d ( const typename Array3d< T >::size_type  d1,
const typename Array3d< T >::size_type  d2,
const typename Array3d< T >::size_type  d3,
const T *  val 
)
inline

Definition at line 3539 of file Array3d.hpp.

Member Function Documentation

template<typename T >
Array3d< T >::iterator3d slip::Array3d< T >::back_bottom_right ( )
inline

Returns a read/write iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Array3d.

Returns
begin iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
//Print M
std::ostream_iterator<double>(std::cout," "));

Definition at line 4897 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator3d slip::Array3d< T >::back_bottom_right ( ) const
inline

Returns a read-only iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Array3d.

Returns
begin const iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
//Print M
std::ostream_iterator<double>(std::cout," "));

Definition at line 4906 of file Array3d.hpp.

template<typename T >
Array3d< T >::iterator3d slip::Array3d< T >::back_bottom_right ( const Box3d< int > &  box)
inline

Returns a read/write iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Box3d associated to the Array3d.

Parameters
boxa Box3d defining the range of indices to iterate within the Array3d.
Returns
end iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the Array3d ones.
Example
slip::Box3d<int> b(1,1,1,2,2,3);
//Print M within a box
std::ostream_iterator<double>(std::cout," "));

Definition at line 4967 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator3d slip::Array3d< T >::back_bottom_right ( const Box3d< int > &  box) const
inline

Returns a read only iterator3d that points to the past the end element of the Array3d. It points to past the end element of the back bottom right element of the Box3d associated to the Array3d.

Parameters
boxa Box3d defining the range of indices to iterate within the Array3d.
Returns
end const iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the Array3d ones.
Example
slip::Array3d<double> const M(3,4,5);
slip::Box3d<int> b(1,1,1,2,2,4);
//Print M within a box
std::ostream_iterator<double>(std::cout," "));

Definition at line 4977 of file Array3d.hpp.

template<typename T >
Array3d< T >::iterator3d_range slip::Array3d< T >::back_bottom_right ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write iterator3d_range that points to the past the end back bottom right element of the ranges slice_range, row_range and col_range associated to the Array3d.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range, row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range
std::ostream_iterator<double>(std::cout," "));

Definition at line 5032 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator3d_range slip::Array3d< T >::back_bottom_right ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only iterator3d_range that points to the past the end back bottom right element of the ranges slice_range, row_range and col_range associated to the Array3d.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range, row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
const_iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range
std::ostream_iterator<double>(std::cout," "));

Definition at line 5053 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator slip::Array3d< T >::begin ( ) const
inline

Returns a read-only (constant) iterator that points to the first element in the Array3d. Iteration is done in ordinary element order.

Returns
const begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 3644 of file Array3d.hpp.

template<typename T >
Array3d< T >::iterator slip::Array3d< T >::begin ( )
inline

Returns a read/write iterator that points to the first element in the Array3d. Iteration is done in ordinary element order.

Returns
begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 3658 of file Array3d.hpp.

template<typename T>
col_iterator slip::Array3d< T >::col_begin ( const size_type  slice,
const size_type  col 
)

Returns a read/write iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
begin col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_col_iterator slip::Array3d< T >::col_begin ( const size_type  slice,
const size_type  col 
) const

Returns a read_only iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
begin const_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
col_range_iterator slip::Array3d< T >::col_begin ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the first element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate
Returns
begin col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the the elements of the column 0 of the slice 0 of A1 iterated according to the
//range in the column 1 of the slice 1 of A2
std::copy(A1.col_begin(0,0,range),A1.col_end(0,0,range),A2.col_begin(1,1));
template<typename T>
const_col_range_iterator slip::Array3d< T >::col_begin ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the first element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin const_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Array3d<double> const A1(8,8,8);
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the the elements of the column 0 of the slice 0 of A1 iterated according to the
//range in the column 1 of the slice 1 of A2
std::copy(A1.col_begin(0,0,range),A1.col_end(0,0,range),A2.col_begin(1,1));
template<typename T>
col_iterator slip::Array3d< T >::col_end ( const size_type  slice,
const size_type  col 
)

Returns a read/write iterator that points to the past-the-end element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
end col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_col_iterator slip::Array3d< T >::col_end ( const size_type  slice,
const size_type  col 
) const

Returns a read_only iterator that points to the past-the-end element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
end const_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
col_range_iterator slip::Array3d< T >::col_end ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the past the end element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the the elements of the column 0 of the slice 0 of A1 iterated according to the
//range in the column 1 of the slice 1 of A2
std::copy(A1.col_begin(0,0,range),A1.col_end(0,0,range),A2.col_begin(1,1));
template<typename T>
const_col_range_iterator slip::Array3d< T >::col_end ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the past the end element of the Range range of the col col in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate
Returns
begin const_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Array3d<double> const A1(8,8,8);
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the the elements of the column 0 of the slice 0 of A1 iterated according to the
//range in the column 1 of the slice 1 of A2
std::copy(A1.col_begin(0,0,range),A1.col_end(0,0,range),A2.col_begin(1,1));
template<typename T>
reverse_col_iterator slip::Array3d< T >::col_rbegin ( const size_type  slice,
const size_type  col 
)

Returns a read/write reverse iterator that points to the last element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
begin reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_reverse_col_iterator slip::Array3d< T >::col_rbegin ( const size_type  slice,
const size_type  col 
) const

Returns a read_only reverse iterator that points to the last element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
begin const_reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
reverse_col_range_iterator slip::Array3d< T >::col_rbegin ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the last element of the Range range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T>
const_reverse_col_range_iterator slip::Array3d< T >::col_rbegin ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read_only iterator that points to the last element of the Range & range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
begin const_reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T>
reverse_col_iterator slip::Array3d< T >::col_rend ( const size_type  slice,
const size_type  col 
)

Returns a read/write reverse iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
end reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_reverse_col_iterator slip::Array3d< T >::col_rend ( const size_type  slice,
const size_type  col 
) const

Returns a read_only reverse iterator that points to the first element of the column column of the slice slice in the Array3d. Iteration is done modulo the number of columns.

Parameters
sliceThe index of the slice.
colThe index of the column
Returns
end const_reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
reverse_col_range_iterator slip::Array3d< T >::col_rend ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to one before the first element of the Range range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T>
const_reverse_col_range_iterator slip::Array3d< T >::col_rend ( const size_type  slice,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the first element of the Range range of the col of a slice col in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
colThe index of the column to iterate.
rangeRange of the column to iterate.
Returns
const_reverse_col_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T >
Array3d< T >::size_type slip::Array3d< T >::cols ( ) const
inline

Returns the number of columns (third dimension size) in the Array3d.

Definition at line 5216 of file Array3d.hpp.

template<typename T >
Array3d< T >::size_type slip::Array3d< T >::columns ( ) const
inline

Returns the number of columns (third dimension size) in the Array3d.

Definition at line 5221 of file Array3d.hpp.

template<typename T >
Array3d< T >::size_type slip::Array3d< T >::dim1 ( ) const
inline

Returns the number of slices (first dimension size) in the Array3d.

Definition at line 5191 of file Array3d.hpp.

template<typename T >
Array3d< T >::size_type slip::Array3d< T >::dim2 ( ) const
inline

Returns the number of rows (second dimension size) in the Array3d.

Definition at line 5201 of file Array3d.hpp.

template<typename T >
Array3d< T >::size_type slip::Array3d< T >::dim3 ( ) const
inline

Returns the number of columns (third dimension size) in the Array3d.

Definition at line 5211 of file Array3d.hpp.

template<typename T >
bool slip::Array3d< T >::empty ( ) const
inline

Returns true if the Array3d is empty. (Thus size() == 0)

Definition at line 5245 of file Array3d.hpp.

template<typename T >
Array3d< T >::iterator slip::Array3d< T >::end ( )
inline

Returns a read/write iterator that points one past the last element in the Array3d. Iteration is done in ordinary element order.

Returns
end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 3665 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator slip::Array3d< T >::end ( ) const
inline

Returns a read-only (constant) iterator that points one past the last element in the Array3d. Iteration is done in ordinary element order.

Returns
const end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of A1 and A2 in S
std::transform(A1.begin(),A1.end(),
A2.begin(),S.begin(),
std::plus<double>());

Definition at line 3651 of file Array3d.hpp.

template<typename T>
void slip::Array3d< T >::fill ( const T &  value)
inline

Fills the container range [begin(),begin()+size()) with copies of value.

Parameters
valueA reference-to-const of arbitrary type.

Definition at line 3207 of file Array3d.hpp.

template<typename T>
void slip::Array3d< T >::fill ( const T *  value)
inline

Fills the container range [begin(),begin()+size()) with a copy of the value array.

Parameters
valueA pointer of arbitrary type.

Definition at line 3218 of file Array3d.hpp.

template<typename T>
template<typename InputIterator >
void slip::Array3d< T >::fill ( InputIterator  first,
InputIterator  last 
)
inline

Fills the container range [begin(),begin()+size()) with a copy of the range [first,last)

Parameters
firstAn input iterator.
lastAn input iterator.

Definition at line 3232 of file Array3d.hpp.

template<typename T >
Array3d< T >::iterator3d slip::Array3d< T >::front_upper_left ( )
inline

Returns a read/write iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Array3d.

Returns
begin iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
//Print M
std::ostream_iterator<double>(std::cout," "));

Definition at line 4882 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator3d slip::Array3d< T >::front_upper_left ( ) const
inline

Returns a read-only iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Array3d.

Returns
begin const iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
//Print M
std::ostream_iterator<double>(std::cout," "));

Definition at line 4889 of file Array3d.hpp.

template<typename T >
Array3d< T >::iterator3d slip::Array3d< T >::front_upper_left ( const Box3d< int > &  box)
inline

Returns a read/write iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Box3d associated to the Array3d.

Parameters
boxA Box3d defining the range of indices to iterate within the Array3d.
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Returns
end iterator3d value
Precondition
The box indices must be inside the range of the Array3d ones.
Example
slip::Box3d<int> b(1,1,1,2,2,3);
//Print M within a box
std::ostream_iterator<double>(std::cout," "));

Definition at line 4951 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator3d slip::Array3d< T >::front_upper_left ( const Box3d< int > &  box) const
inline

Returns a read only iterator3d that points to the first element of the Array3d. It points to the front upper left element of the Box3d associated to the Array3d.

Parameters
boxa Box3d defining the range of indices to iterate within the Array3d.
Returns
end const iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the Array3d ones.
Example
slip::Array3d<double> const M(3,4,5);
slip::Box3d<int> b(1,1,1,2,2,4);
//Print M within a box
std::ostream_iterator<double>(std::cout," "));

Definition at line 4958 of file Array3d.hpp.

template<typename T >
Array3d< T >::iterator3d_range slip::Array3d< T >::front_upper_left ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write iterator3d_range that points to the front upper left element of the ranges slice_range, row_range and col_range associated to the Array3d.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range
std::ostream_iterator<double>(std::cout," "));

Definition at line 5023 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_iterator3d_range slip::Array3d< T >::front_upper_left ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only iterator3d_range that points to the to the front upper left element of the ranges slice_range, row_range and col_range associated to the Array3d.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range, row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
const_iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range
std::ostream_iterator<double>(std::cout," "));

Definition at line 5043 of file Array3d.hpp.

template<typename T >
Array3d< T >::size_type slip::Array3d< T >::max_size ( ) const
inline

Returns the maximal size (number of elements) in the Array3d.

Definition at line 5232 of file Array3d.hpp.

template<typename T >
std::string slip::Array3d< T >::name ( ) const
inline

Returns the name of the class.

Definition at line 5185 of file Array3d.hpp.

template<typename T>
reference slip::Array3d< T >::operator() ( const size_type  k,
const size_type  i,
const size_type  j 
)

Subscript access to the data contained in the Array3d.

Parameters
kThe index of the slice for which the data should be accessed.
iThe index of the row for which the data should be accessed.
jThe index of the column for which the data should be accessed.
Returns
Read/Write reference to data.
Precondition
k < slices()
i < rows()
j < cols() This operator allows for easy, 3d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.
template<typename T>
const_reference slip::Array3d< T >::operator() ( const size_type  k,
const size_type  i,
const size_type  j 
) const

Subscript access to the data contained in the Array3d.

Parameters
kThe index of the slice for which the data should be accessed.
iThe index of the row for which the data should be accessed.
jThe index of the column for which the data should be accessed.
Returns
Read_only (constant) reference to data.
Precondition
k < slices()
i < rows()
j < cols() This operator allows for easy, 3d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.
template<typename T>
Array3d< T > & slip::Array3d< T >::operator= ( const Array3d< T > &  rhs)
inline

Assign a Array3d.

Assign elements of Array3d in rhs

Parameters
rhsArray3d to get the values from.
Returns

Definition at line 3576 of file Array3d.hpp.

template<typename T>
Array3d< T > & slip::Array3d< T >::operator= ( const T &  value)
inline

Assign all the elments of the Array3d by value.

Parameters
valueA reference-to-const of arbitrary type.
Returns

Definition at line 3596 of file Array3d.hpp.

template<typename T>
T** slip::Array3d< T >::operator[] ( const size_type  k)
template<typename T>
const T* const* slip::Array3d< T >::operator[] ( const size_type  k) const
template<typename T>
iterator slip::Array3d< T >::plane_begin ( const size_type  slice)

Returns a read/write iterator that points to the first element in the in the slice plane of the Array3d. Iteration is done in ordinary element order.

Parameters
slicethe slice coordinate of the plane
Returns
begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the first plane (in slice direction) of A1 in A2
std::copy(A1.plane_begin(0),A1.plane_end(0),A2.plane_begin(0));
template<typename T>
const_iterator slip::Array3d< T >::plane_begin ( const size_type  slice) const

Returns a read-only (constant) iterator that points to the first element in the slice plane of the Array3d. Iteration is done in ordinary element order.

Parameters
slicethe slice coordinate of the plane
Returns
const begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(2,3,2);
//copy the first plane (in slice direction) of A1 in A2
std::copy(A1.plane_begin(0),A1.plane_end(0),A2.plane_begin(0));
template<typename T>
iterator2d slip::Array3d< T >::plane_bottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
)

Returns a read/write iterator that points to the last element of the plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example:
//Print the 2nd plane of M in the KI_PLANE direction
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_iterator2d slip::Array3d< T >::plane_bottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
) const

Returns a read/write const iterator that points to the last element of the plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin const_iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example:
slip::Array3d<double> const M(3,4,5);
//Print the 2nd plane of M in the KI_PLANE direction
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
iterator2d slip::Array3d< T >::plane_bottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
)

Returns a read/write iterator that points to the last element of a box within a plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_iterator2d slip::Array3d< T >::plane_bottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
) const

Returns a read/write const iterator that points to the last element of a box within a plane in the Array3d. It points to past the end element of the bottom right element of the plane Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin const_iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T>
iterator slip::Array3d< T >::plane_end ( const size_type  slice)

Returns a read/write iterator that points one past the last element in the slice plane of the Array3d. Iteration is done in ordinary element order.

Parameters
slicethe slice coordinate of the plane
Returns
end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the first plane (in slice direction) of A1 in A2
std::copy(A1.plane_begin(0),A1.plane_end(0),A2.plane_begin(0));
template<typename T>
const_iterator slip::Array3d< T >::plane_end ( const size_type  slice) const

Returns a read-only (constant) iterator that points one past the last element in the slice plane of the Array3d. Iteration is done in ordinary element order.

Parameters
slicethe slice coordinate of the plane
Returns
const end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(2,3,2);
//copy the first plane (in slice direction) of A1 in A2
std::copy(A1.plane_begin(0),A1.plane_end(0),A2.plane_begin(0));
template<typename T>
reverse_iterator slip::Array3d< T >::plane_rbegin ( const size_type  slice)

Returns a read/write reverse iterator that points to the last element in the slice plane of the Array3d. Iteration is done in reverse element order.

Parameters
slicethe slice coordinate of the plane
Returns
reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the first plane (in slice direction) of A1 in A2 in reverse order
std::copy(A1.plane_rbegin(0),A1.plane_rend(0),A2.plane_begin(0));
template<typename T>
const_reverse_iterator slip::Array3d< T >::plane_rbegin ( const size_type  slice) const

Returns a read-only (constant) reverse iterator that points to the last element in the slice plane k of the Array3d. Iteration is done in reverse element order.

Parameters
slicethe slice coordinate of the plane
Returns
const reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(2,3,2);
//copy the first plane (in slice direction) of A1 in A2 in reverse order
std::copy(A1.plane_rbegin(0),A1.plane_rend(0),A2.plane_begin(0));
template<typename T>
reverse_iterator2d slip::Array3d< T >::plane_rbottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
)

Returns a read/write reverse_iterator that points to the upper left element of the plane in the Array3d. Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example :
//Print the 2nd plane of M in the KI_PLANE direction in reverse order
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_reverse_iterator2d slip::Array3d< T >::plane_rbottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
) const

Returns a read/write const reverse iterator that points to the upper left element of the plane in the Array3d. Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin const_iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
//Print the 2nd plane of M in the KI_PLANE direction in reverse order
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
reverse_iterator2d slip::Array3d< T >::plane_rbottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
)

Returns a read/write reverse iterator that points to the first element of a box within a plane in the Array3d. It points to the upper left element of the plane Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin reverse_iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box in a reverse order
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_reverse_iterator2d slip::Array3d< T >::plane_rbottom_right ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
) const

Returns a read/write const reverse iterator that points to the first element of a box within a plane in the Array3d. It points to the bottom right element of the plane Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin const_reverse_iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box in a reverse order
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T>
reverse_iterator slip::Array3d< T >::plane_rend ( const size_type  slice)

Returns a read/write reverse iterator that points to one before the first element in the slice plane of the Array3d. Iteration is done in reverse element order.

Parameters
slicethe slice coordinate of the plane
Returns
reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the first plane (in slice direction) of A1 in A2 in reverse order
std::copy(A1.plane_rbegin(0),A1.plane_rend(0),A2.plane_begin(0));
template<typename T>
const_reverse_iterator slip::Array3d< T >::plane_rend ( const size_type  slice) const

Returns a read-only (constant) reverse iterator that points to one before the first element in the slice plane of the Array3d. Iteration is done in reverse element order.

Parameters
slicethe slice coordinate of the plane
Returns
const reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(2,3,2);
//copy the first plane (in slice direction) of A1 in A2 in reverse order
std::copy(A1.plane_rbegin(0),A1.plane_rend(0),A2.plane_begin(0));
template<typename T>
reverse_iterator2d slip::Array3d< T >::plane_rupper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
)

Returns a read/write reverse_iterator that points to the bottom right element of the plane in the Array3d. Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example:
//Print the 2nd plane of M in the KI_PLANE direction in reverse order
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_reverse_iterator2d slip::Array3d< T >::plane_rupper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
) const

Returns a read/write const reverse iterator that points to the bottom right element of the plane in the Array3d. Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin const_iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example :
slip::Array3d<double> const M(3,4,5);
//Print the 2nd plane of M in the KI_PLANE direction in reverse order
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
reverse_iterator2d slip::Array3d< T >::plane_rupper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
)

Returns a read/write reverse iterator that points to the last element of a box within a plane in the Array3d. It points to the bottom right element of the box Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin reverse_iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box in a reverse order
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_reverse_iterator2d slip::Array3d< T >::plane_rupper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
) const

Returns a read/write const reverse iterator that points to the last element of a box within a plane in the Array3d. It points to the bottom right element of the plane Iteration is done in backward element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin const_reverse_iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box in a reverse order
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T>
iterator2d slip::Array3d< T >::plane_upper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
)

Returns a read/write iterator that points to the first element of the plane in the Array3d. It points to the upper left element of the plane Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example:
//Print the 2nd plane of M in the KI_PLANE direction
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_iterator2d slip::Array3d< T >::plane_upper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate 
) const

Returns a read/write const iterator that points to the first element of the plane in the Array3d. It points to the upper left element of the plane Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
Returns
begin const_iterator2d value
Precondition
P must be 0,1 or 2
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example:
slip::Array3d<double> const M(3,4,5);
//Print the 2nd plane of M in the KI_PLANE direction
slip::KI_PLANE,2),std::ostream_iterator<double>(std::cout," "));
template<typename T>
iterator2d slip::Array3d< T >::plane_upper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
)

Returns a read/write iterator that points to the first element of a box within a plane in the Array3d. It points to the upper left element of the box Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T>
const_iterator2d slip::Array3d< T >::plane_upper_left ( PLANE_ORIENTATION  P,
const size_type  plane_coordinate,
const Box2d< int > &  b 
) const

Returns a read/write const iterator that points to the first element of a box within a plane in the Array3d. It points to the upper left element of the plane Iteration is done in ordinary element order.

Parameters
Pnumber of the plane axe (PLANE_ORIENTATION).
plane_coordinateThe constant coordinate
bThe box within the plane
Returns
begin const_iterator2d value
Precondition
P must be 0,1 or 2
b must be within the plane
Remarks
This iterator is compatible with BidirectionnalAccessIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Box2d<int> b(1,1,3,3);
//Print the 2nd plane of M in the KI_PLANE direction within a box
slip::KI_PLANE,2,b),std::ostream_iterator<double>(std::cout," "));
template<typename T >
Array3d< T >::reverse_iterator3d slip::Array3d< T >::rback_bottom_right ( )
inline

Returns a read/write reverse iterator3d. It points to past the front upper left element of the Array3d. Iteration is done in the reverse order.

Returns
reverse iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
//Print M in a reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 4916 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator3d slip::Array3d< T >::rback_bottom_right ( ) const
inline

Returns a read only reverse iterator3d. It points to past the front upper left element of the Array3d. Iteration is done in the reverse order.

Returns
const reverse iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
//Print M in a reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 4924 of file Array3d.hpp.

template<typename T >
Array3d< T >::reverse_iterator3d slip::Array3d< T >::rback_bottom_right ( const Box3d< int > &  box)
inline

Returns a read/write reverse iterator3d. It points to one before the front upper left element of the Box3d box associated to the Array3d.

Parameters
boxA Box3d defining the range of indices to iterate within the Array3d.
Precondition
The box indices must be inside the range of the Array3d ones.
Returns
reverse iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 4987 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator3d slip::Array3d< T >::rback_bottom_right ( const Box3d< int > &  box) const
inline

Returns a read-only reverse iterator3d. It points to one before the front element of the bottom right element of the Box3d box associated to the Array3d.

Parameters
boxA Box3d defining the range of indices to iterate within the Array3d.
Precondition
The box indices must be inside the range of the Array3d ones.
Returns
const reverse iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 4995 of file Array3d.hpp.

template<typename T >
Array3d< T >::reverse_iterator3d_range slip::Array3d< T >::rback_bottom_right ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write reverse_iterator3d_range that points to one before the front upper left element of the ranges row_range and col_range associated to the Array3d. Iteration is done in the reverse order.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range, row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
reverse_iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range in reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 5083 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator3d_range slip::Array3d< T >::rback_bottom_right ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only reverse_iterator3d_range that points to one before the front upper left element of the ranges row_range and col_range associated to the Array3d.Iteration is done in the reverse order.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range, row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
const_reverse_iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range in reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 5092 of file Array3d.hpp.

template<typename T >
Array3d< T >::reverse_iterator slip::Array3d< T >::rbegin ( )
inline

Returns a read/write reverse iterator that points to the last element in the Array3d. Iteration is done in reverse element order.

Returns
reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of A1 and A2 in S
std::transform(A1.rbegin(),A1.rend(),
A2.rbegin(),S.rbegin(),
std::plus<double>());

Definition at line 3672 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator slip::Array3d< T >::rbegin ( ) const
inline

Returns a read-only (constant) reverse iterator that points to the last element in the Array3d. Iteration is done in reverse element order.

Returns
const reverse begin iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of A1 and A2 in S
std::transform(A1.rbegin(),A1.rend(),
A2.rbegin(),S.rbegin(),
std::plus<double>());

Definition at line 3679 of file Array3d.hpp.

template<typename T >
Array3d< T >::reverse_iterator slip::Array3d< T >::rend ( )
inline

Returns a read/write reverse iterator that points to one before the first element in the Array3d. Iteration is done in reverse element order.

Returns
reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of A1 and A2 in S
std::transform(A1.rbegin(),A1.rend(),
A2.rbegin(),S.rbegin(),
std::plus<double>());

Definition at line 3686 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator slip::Array3d< T >::rend ( ) const
inline

Returns a read-only (constant) reverse iterator that points to one before the first element in the Array3d. Iteration is done in reverse element order.

Returns
const reverse end iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of A1 and A2 in S
std::transform(A1.rbegin(),A1.rend(),
A2.rbegin(),S.rbegin(),
std::plus<double>());

Definition at line 3694 of file Array3d.hpp.

template<typename T>
void slip::Array3d< T >::resize ( std::size_t  d1,
std::size_t  d2,
std::size_t  d3,
const T &  val = T() 
)
inline

Resizes a Array3d.

Parameters
d1new first dimension
d2new second dimension
d3new third dimension
valnew value for all the elements

Definition at line 3606 of file Array3d.hpp.

template<typename T >
Array3d< T >::reverse_iterator3d slip::Array3d< T >::rfront_upper_left ( )
inline

Returns a read/write reverse iterator3d. It points to the back bottom right element of the Array3d. Iteration is done within the Array3d in the reverse order.

Returns
reverse_iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
//Print M in a reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 4932 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator3d slip::Array3d< T >::rfront_upper_left ( ) const
inline

Returns a read only reverse iterator3d that points. It points to the back bottom right element of the Array3d. Iteration is done within the Array3d in the reverse order.

Returns
const_reverse_iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
//Print M in a reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 4941 of file Array3d.hpp.

template<typename T >
Array3d< T >::reverse_iterator3d slip::Array3d< T >::rfront_upper_left ( const Box3d< int > &  box)
inline

Returns a read/write reverse iterator3d. It points to the back bottom right element of the Box3d associated to the Array3d. Iteration is done in the reverse order.

Parameters
boxa Box3d defining the range of indices to iterate within the Array3d.
Precondition
The box indices must be inside the range of the Array3d ones.
Returns
reverse iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 5003 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator3d slip::Array3d< T >::rfront_upper_left ( const Box3d< int > &  box) const
inline

Returns a read only reverse iterator3d. It points to the back bottom right element of the Box3d box associated to the Array3d. Iteration is done in the reverse order.

Parameters
boxA Box3d defining the range of indices to iterate within the Array3d.
Precondition
The box indices must be inside the range of the Array3d ones.
Returns
const reverse iterator3d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 5012 of file Array3d.hpp.

template<typename T >
Array3d< T >::reverse_iterator3d_range slip::Array3d< T >::rfront_upper_left ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write reverse_iterator3d_range that points to the past the back bottom right element of the ranges row_range and col_range associated to the Array3d. Iteration is done in the reverse order.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range, row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
reverse_iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range in reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 5063 of file Array3d.hpp.

template<typename T >
Array3d< T >::const_reverse_iterator3d_range slip::Array3d< T >::rfront_upper_left ( const Range< int > &  slice_range,
const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only reverse_iterator3d_range that points to the past the back bottom right element of the ranges row_range and col_range associated to the Array3d. Iteration is done in the reverse order.

Parameters
slice_rangeThe range of the slices.
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
slice_range, row_range and col_range must be valid.
The ranges indices must be inside the ranges of the Array3d ones.
Returns
const_reverse_iterator3d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example
slip::Array3d<double> const M(3,4,5);
slip::Range<int> sr(0,2,2);
slip::Range<int> rr(0,3,2);
slip::Range<int> cr(0,4,2);
//Print M within a range in reverse order
std::ostream_iterator<double>(std::cout," "));

Definition at line 5073 of file Array3d.hpp.

template<typename T>
row_iterator slip::Array3d< T >::row_begin ( const size_type  slice,
const size_type  row 
)

Returns a read/write iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
begin row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_row_iterator slip::Array3d< T >::row_begin ( const size_type  slice,
const size_type  row 
) const

Returns a read_only iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
begin const_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
row_range_iterator slip::Array3d< T >::row_begin ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points to the first element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
begin row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Range<int> range(0,A1.dim3()-1,2);
//copy the the elements of the row 0 of the slice 0 of A1 iterated according to the
//range in the row 1 of the slice 1 of A2
std::copy(A1.row_begin(0,0,range),A1.row_end(0,0,range),A2.row_begin(1,1));
template<typename T>
const_row_range_iterator slip::Array3d< T >::row_begin ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the first element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
begin const_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Array3d<double> const A1(8,8,8);
slip::Range<int> range(0,A1.dim3()-1,2);
//copy the the elements of the row 0 of the slice 0 of A1 iterated according to the
//range in the row 1 of the slice 1 of A2
std::copy(A1.row_begin(0,0,range),A1.row_end(0,0,range),A2.row_begin(1,1));
template<typename T>
row_iterator slip::Array3d< T >::row_end ( const size_type  slice,
const size_type  row 
)

Returns a read/write iterator that points to the past-the-end element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
end row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_row_iterator slip::Array3d< T >::row_end ( const size_type  slice,
const size_type  row 
) const

Returns a read_only iterator that points to the past-the-end element of the row row of the slice slice in the Array3d. Iteration is done in ordinary element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
end const_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
row_range_iterator slip::Array3d< T >::row_end ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points one past the end element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
end row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Range<int> range(0,A1.dim3()-1,2);
//copy the the elements of the row 0 of the slice 0 of A1 iterated according to the
//range in the row 1 of the slice 1 of A2
std::copy(A1.row_begin(0,0,range),A1.row_end(0,0,range),A2.row_begin(1,1));
template<typename T>
const_row_range_iterator slip::Array3d< T >::row_end ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read_only iterator that points one past the last element of the Range range of the row row in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
sliceThe index of the slice.
rowRow to iterate.
rangeRange of the row to iterate
Returns
begin const_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
Example:
slip::Array3d<double> const A1(8,8,8);
slip::Range<int> range(0,A1.dim3()-1,2);
//copy the the elements of the row 0 of the slice 0 of A1 iterated according to the
//range in the row 1 of the slice 1 of A2
std::copy(A1.row_begin(0,0,range),A1.row_end(0,0,range),A2.row_begin(1,1));
template<typename T>
reverse_row_iterator slip::Array3d< T >::row_rbegin ( const size_type  slice,
const size_type  row 
)

Returns a read/write reverse iterator that points to the last element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
begin reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_reverse_row_iterator slip::Array3d< T >::row_rbegin ( const size_type  slice,
const size_type  row 
) const

Returns a read_only reverse iterator that points to the last element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
begin const_reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
reverse_row_range_iterator slip::Array3d< T >::row_rbegin ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points to the last element of the Range range of the row of a slice row and slice in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
reverse_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T>
const_reverse_row_range_iterator slip::Array3d< T >::row_rbegin ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points to the last element of the Range range of the row of a slice row in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
rowThe index of the row to iterate.
rangeRange of the row to iterate
Returns
begin const_reverse_row_range_iterator value
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T>
reverse_row_iterator slip::Array3d< T >::row_rend ( const size_type  slice,
const size_type  row 
)

Returns a read/write reverse iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
end reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
const_reverse_row_iterator slip::Array3d< T >::row_rend ( const size_type  slice,
const size_type  row 
) const

Returns a read_only reverse iterator that points to the first element of the row row of the slice slice in the Array3d. Iteration is done in reverse element order.

Parameters
sliceThe index of the slice.
rowThe index of the row.
Returns
end const_reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
template<typename T>
reverse_row_range_iterator slip::Array3d< T >::row_rend ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
)

Returns a read-write iterator that points one before the first element of the Range range of the row of a slice row in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
rowThe index of the row to iterate.
rangeRange of the row to iterate.
Returns
reverse_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T>
const_reverse_row_range_iterator slip::Array3d< T >::row_rend ( const size_type  slice,
const size_type  row,
const slip::Range< int > &  range 
) const

Returns a read-only iterator that points one before the first element of the Range range of the row of a slice row in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
sliceThe index of the slice.
rowThe index of the row to iterate.
rangeRange of the row to iterate
Returns
const_reverse_row_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the Array3d.
The range must be inside the whole range of the Array3d.
template<typename T >
Array3d< T >::size_type slip::Array3d< T >::rows ( ) const
inline

Returns the number of rows (second dimension size) in the Array3d.

Definition at line 5206 of file Array3d.hpp.

template<typename T >
Array3d< T >::size_type slip::Array3d< T >::size ( ) const
inline

Returns the number of elements in the Array3d.

Definition at line 5227 of file Array3d.hpp.

template<typename T>
slice_iterator slip::Array3d< T >::slice_begin ( const size_type  row,
const size_type  col 
)

Returns a read/write iterator that points to the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the first slice of A1 and A2 in the first slice of S
std::transform(A1.begin_slice(0),A1.end_slice(0),
A2.begin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
const_slice_iterator slip::Array3d< T >::slice_begin ( const size_type  row,
const size_type  col 
) const

Returns a read-only (constant) iterator that points to the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
const_slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of the first slice of A1 and A2 in the first slice of S
std::transform(A1.begin_slice(0),A1.end_slice(0),
A2.begin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
slice_range_iterator slip::Array3d< T >::slice_begin ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points to the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
begin slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the the elements of the line (0,0) of A1 iterated according to the
//range in the line (1,1) of A2
std::copy(A1.slice_begin(0,0,range),A1.slice_end(0,0,range),A2.slice_begin(1,1));
template<typename T>
const_slice_range_iterator slip::Array3d< T >::slice_begin ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read only (constant) iterator that points to the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
begin const_slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
Example:
slip::Array3d<double> const A1(M); //M is an already existing %Array3d
slip::Range<int> range(0,A1.dim1()-1,2);
//display the elements of the line (0,0) of A1 iterated according to the range
std::copy(A1.slice_begin(0,0,range),A1.slice_end(0,0,range),
std::ostream_iterator<double>(std::cout," "));
template<typename T>
slice_iterator slip::Array3d< T >::slice_end ( const size_type  row,
const size_type  col 
)

Returns a read/write iterator that points to the one past the end element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the first slice of A1 and A2 in the first slice of S
std::transform(A1.begin_slice(0),A1.end_slice(0),
A2.begin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
const_slice_iterator slip::Array3d< T >::slice_end ( const size_type  row,
const size_type  col 
) const

Returns a read-only (constant) iterator that points to the one past the end element of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order (increasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
const_slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of the first slice of A1 and A2 in the first slice of S
std::transform(A1.begin_slice(0),A1.end_slice(0),
A2.begin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
slice_range_iterator slip::Array3d< T >::slice_end ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points one past the end element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
end slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the the elements of the line (0,0) of A1 iterated according to the
//range in the line (1,1) of A2
std::copy(A1.slice_begin(0,0,range),A1.slice_end(0,0,range),A2.slice_begin(1,1));
template<typename T>
const_slice_range_iterator slip::Array3d< T >::slice_end ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read_only iterator that points one past the last element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in ordinary element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
end const_slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
Example:
slip::Array3d<double> const A1(M); //M is an already existing %Array3d
slip::Range<int> range(0,A1.dim1()-1,2);
//display the elements of the line (0,0) of A1 iterated according to the range
std::copy(A1.slice_begin(0,0,range),A1.slice_end(0,0,range),
std::ostream_iterator<double>(std::cout," "));
template<typename T>
reverse_slice_iterator slip::Array3d< T >::slice_rbegin ( const size_type  row,
const size_type  col 
)

Returns a read/write iterator that points to the last element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
reverse_slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the first slice of A1 and A2
in the first slice of S in reverse order
std::transform(A1.rbegin_slice(0),A1.rend_slice(0),
A2.rbegin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
const_reverse_slice_iterator slip::Array3d< T >::slice_rbegin ( const size_type  row,
const size_type  col 
) const

Returns a read-only (constant) iterator that points to the last element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
const_reverse_slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of the first slice of A1 and A2
in the first slice of S in reverse order
std::transform(A1.rbegin_slice(0),A1.rend_slice(0),
A2.rbegin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
reverse_slice_range_iterator slip::Array3d< T >::slice_rbegin ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points to the last element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in the reverse element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
begin reverse_slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
template<typename T>
const_reverse_slice_range_iterator slip::Array3d< T >::slice_rbegin ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read only (constant) iterator that points to the last element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
begin const_reverse_slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
template<typename T>
reverse_slice_iterator slip::Array3d< T >::slice_rend ( const size_type  row,
const size_type  col 
)

Returns a read/write iterator that points to the one before the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
reverse_slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
//copy the sum of the first slice of A1 and A2
in the first slice of S in reverse order
std::transform(A1.rbegin_slice(0),A1.rend_slice(0),
A2.rbegin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
const_reverse_slice_iterator slip::Array3d< T >::slice_rend ( const size_type  row,
const size_type  col 
) const

Returns a read (constant) iterator that points to the one before the first element of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order (decreasing slice number).

Parameters
rowrow coordinate of the line
colcol coordinate of the line
Returns
const_reverse_slice_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Example:
slip::Array3d<double> const A1(10,9,5);
slip::Array3d<double> const A2(10,9,5);
//copy the sum of the first slice of A1 and A2
in the first slice of S in reverse order
std::transform(A1.rbegin_slice(0),A1.rend_slice(0),
A2.rbegin_slice(0),S.begin_slice(0),
std::plus<double>());
template<typename T>
reverse_slice_range_iterator slip::Array3d< T >::slice_rend ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
)

Returns a read/write iterator that points to the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
end reverse_slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
template<typename T>
const_reverse_slice_range_iterator slip::Array3d< T >::slice_rend ( const size_type  row,
const size_type  col,
const slip::Range< int > &  range 
) const

Returns a read_only iterator that points one past the lastto the first element of the Range range of the of the line (row,col) threw the slices in the Array3d. Iteration is done in reverse element order according to the Range.

Parameters
rowrow coordinate of the line
colcol coordinate of the line
rangeRange of the line to iterate.
Returns
end const_reverse_slice_range_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
the range must be compatible with the slice dimensions
The range must be inside the whole range of the Array3d.
template<typename T >
Array3d< T >::size_type slip::Array3d< T >::slice_size ( ) const
inline

Returns the number of elements in a slice of the Array3d.

Definition at line 5240 of file Array3d.hpp.

template<typename T >
Array3d< T >::size_type slip::Array3d< T >::slices ( ) const
inline

Returns the number of slices (first dimension size) in the Array3d.

Definition at line 5196 of file Array3d.hpp.

template<typename T >
void slip::Array3d< T >::swap ( Array3d< T > &  M)
inline

Swaps data with another Array3d.

Parameters
MA Array3d of the same element type
Precondition
dim1() == M.dim1()
dim2() == M.dim2()
dim3() == M.dim3()

Definition at line 5249 of file Array3d.hpp.

Friends And Related Function Documentation

template<typename T>
friend class boost::serialization::access
friend

Definition at line 3453 of file Array3d.hpp.

template<typename T>
bool operator!= ( const Array3d< T > &  x,
const Array3d< T > &  y 
)
friend

Array3d inequality comparison

Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true if !(x == y)

Definition at line 5274 of file Array3d.hpp.

template<typename T>
bool operator< ( const Array3d< T > &  x,
const Array3d< T > &  y 
)
friend

Less than comparison operator (Array3d ordering relation)

Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff x is lexicographically less than y

Definition at line 5284 of file Array3d.hpp.

template<typename T>
std::ostream& operator<< ( std::ostream &  out,
const self a 
)
friend

Write the Array3d to the ouput stream.

Parameters
outoutput std::ostream
aArray3d to write to the output stream

Definition at line 5109 of file Array3d.hpp.

template<typename T>
bool operator<= ( const Array3d< T > &  x,
const Array3d< T > &  y 
)
friend

Less than equal comparison operator.

Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff !(y > x)

Definition at line 5302 of file Array3d.hpp.

template<typename T>
bool operator== ( const Array3d< T > &  x,
const Array3d< T > &  y 
)
friend

Array3d equality comparison

Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff the size and the elements of the Arrays are equal

Definition at line 5265 of file Array3d.hpp.

template<typename T>
bool operator> ( const Array3d< T > &  x,
const Array3d< T > &  y 
)
friend

More than comparison operator.

Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff y > x

Definition at line 5294 of file Array3d.hpp.

template<typename T>
bool operator>= ( const Array3d< T > &  x,
const Array3d< T > &  y 
)
friend

More than equal comparison operator.

Parameters
xA Array3d
yA Array3d of the same type of x
Returns
true iff !(x < y)

Definition at line 5310 of file Array3d.hpp.

Member Data Documentation

template<typename T>
const std::size_t slip::Array3d< T >::DIM = 3
static

Definition at line 243 of file Array3d.hpp.


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