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

This is a two-dimensional static 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 double bracket element access. More...

#include <Block2d.hpp>

Public Types

typedef T value_type
 
typedef block2d< T, NR, NC > self
 
typedef const block2d< T, NR, NC > const_self
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef ptrdiff_t difference_type
 
typedef std::size_t size_type
 
typedef pointer iterator
 
typedef const_pointer const_iterator
 
typedef std::reverse_iterator
< iterator
reverse_iterator
 
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 
typedef pointer row_iterator
 
typedef const_pointer const_row_iterator
 
typedef slip::kstride_iterator
< pointer, NC > 
col_iterator
 
typedef slip::kstride_iterator
< const_pointer, NC > 
const_col_iterator
 
typedef slip::iterator2d_box
< self
iterator2d
 
typedef
slip::const_iterator2d_box
< const_self
const_iterator2d
 
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 slip::iterator2d_range
< self
iterator2d_range
 
typedef
slip::const_iterator2d_range
< const_self
const_iterator2d_range
 
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
< iterator2d
reverse_iterator2d
 
typedef std::reverse_iterator
< const_iterator2d
const_reverse_iterator2d
 
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 std::reverse_iterator
< iterator2d_range
reverse_iterator2d_range
 
typedef std::reverse_iterator
< const_iterator2d_range
const_reverse_iterator2d_range
 
typedef iterator2d default_iterator
 
typedef const_iterator2d const_default_iterator
 

Public Member Functions

std::string name () const
 Returns the name of the class. More...
 
void swap (block2d< T, NR, NC > &x)
 Swaps data with another block. More...
 
iterators
iterator begin ()
 Returns a read/write iterator that points to the first element in the block2d. Iteration is done in ordinary element order. More...
 
const_iterator begin () const
 Returns a read-only (constant) iterator that points to the first element in the block2d. Iteration is done in ordinary element order. More...
 
iterator end ()
 Returns a read/write iterator that points one past the last element in the block2d. 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 block2d. 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 block2d. 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 block2d. 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 block2d. 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 block2d. Iteration is done in reverse element order. More...
 
row_iterator row_begin (const size_type row)
 Returns a read/write iterator that points to the first element of the row row in the block2d. Iteration is done in ordinary element order. More...
 
const_row_iterator row_begin (const size_type row) const
 Returns a read-only iterator that points to the first element of the row row in the block2d. Iteration is done in ordinary element order. More...
 
col_iterator col_begin (const size_type col)
 Returns a read/write iterator that points to the first element of the column column in the block2d. Iteration is done modulo the number of columns. More...
 
const_col_iterator col_begin (const size_type col) const
 Returns a read-only iterator that points to the first element of the column column in the block2d. Iteration is done modulo the number of columns. More...
 
row_iterator row_end (const size_type row)
 Returns a read/write iterator that points one past the end element of the row row in the block2d. Iteration is done in ordinary element order. More...
 
const_row_iterator row_end (const size_type row) const
 Returns a read-only iterator that points one past the end element of the row row in the block2d. Iteration is done in ordinary element order. More...
 
col_iterator col_end (const size_type col)
 Returns a read/write iterator that points one past the end element of the column column in the block2d. Iteration is done modulo the number of columns. More...
 
const_col_iterator col_end (const size_type col) const
 Returns a read-only iterator that points one past the end element of the column column in the block2d. Iteration is done modulo the number of columns. More...
 
row_range_iterator row_begin (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
row_range_iterator row_end (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
const_row_range_iterator row_begin (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
const_row_range_iterator row_end (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
col_range_iterator col_begin (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
col_range_iterator col_end (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
const_col_range_iterator col_begin (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
const_col_range_iterator col_end (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 block2d. Iteration is done in ordinary element order according to the Range. More...
 
reverse_row_iterator row_rbegin (const size_type row)
 Returns a read/write reverse iterator that points to the last element of the row row in the block2d. Iteration is done in the reverse element order. More...
 
const_reverse_row_iterator row_rbegin (const size_type row) const
 Returns a read-only reverse iterator that points to the last element of the row row in the block2d. Iteration is done in the reverse element order. More...
 
reverse_col_iterator col_rbegin (const size_type col)
 Returns a read/write reverse iterator that points to the last element of the column column in the block2d. Iteration is done modulo the number of columns and in the reverse element order. More...
 
const_reverse_col_iterator col_rbegin (const size_type col) const
 Returns a read-only reverse iterator that points to the last element of the column column in the block2d. Iteration is done modulo the number of columns and in the reverse element order. More...
 
reverse_row_iterator row_rend (const size_type row)
 Returns a read/write reverse iterator that points one past the first element of the row row in the block2d. Iteration is done in the reverse element order. More...
 
const_reverse_row_iterator row_rend (const size_type row) const
 Returns a read-only reverse iterator that points one past the first element of the row row in the block2d. Iteration is done in the reverse element order. More...
 
reverse_col_iterator col_rend (const size_type col)
 Returns a read/write reverse iterator that points one past the first element of the column column in the block2d. Iteration is done modulo the number of columns and in the reverse element order. More...
 
const_reverse_col_iterator col_rend (const size_type col) const
 Returns a read-only reverse iterator that points one past the first element of the column column in the block2d. Iteration is done modulo the number of columns and in the reverse element order. More...
 
reverse_row_range_iterator row_rbegin (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 row in the block2d. Iteration is done in the reverse element order according to the Range. More...
 
reverse_row_range_iterator row_rend (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 row in the block2d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_row_range_iterator row_rbegin (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 row in the block2d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_row_range_iterator row_rend (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 row in the block2d. Iteration is done in the reverse element order according to the Range. More...
 
reverse_col_range_iterator col_rbegin (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 col in the block2d. Iteration is done in the reverse element order according to the Range. More...
 
reverse_col_range_iterator col_rend (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 col in the block2d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_col_range_iterator col_rbegin (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 col in the block2d. Iteration is done in the reverse element order according to the Range. More...
 
const_reverse_col_range_iterator col_rend (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 block2d. Iteration is done in the reverse element order according to the Range. More...
 
iterator2d upper_left ()
 Returns a read/write iterator2d that points to the first element of the block2d. It points to the upper left element of the block2d. More...
 
const_iterator2d upper_left () const
 Returns a read-only iterator2d that points to the first element of the block2d. It points to the upper left element of the block2d. More...
 
iterator2d bottom_right ()
 Returns a read/write iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the block2d. More...
 
const_iterator2d bottom_right () const
 Returns a read-only iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the block2d. More...
 
iterator2d upper_left (const Box2d< int > &box)
 Returns a read/write iterator2d that points to the first element of the block2d. It points to the upper left element of the Box2d associated to the block2d. More...
 
const_iterator2d upper_left (const Box2d< int > &box) const
 Returns a read only iterator2d that points to the first element of the block2d. It points to the upper left element of the Box2d associated to the block2d. More...
 
iterator2d bottom_right (const Box2d< int > &box)
 Returns a read/write iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the Box2d associated to the block2d. More...
 
const_iterator2d bottom_right (const Box2d< int > &box) const
 Returns a read only iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the Box2d associated to the block2d. More...
 
iterator2d_range upper_left (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write iterator2d_range that points to the upper left element of the ranges row_range and col_range associated to the block2d. More...
 
iterator2d_range bottom_right (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the block2d. More...
 
const_iterator2d_range upper_left (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only iterator2d_range that points to the to the upper left element of the ranges row_range and col_range associated to the block2d. More...
 
const_iterator2d_range bottom_right (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the block2d. More...
 
iterator2d_range upper_left (const Range< int > &range)
 Returns a read/write iterator2d_range that points to the upper left element of the Range range associated to the block2d. The same range is applied for rows and cols. More...
 
iterator2d_range bottom_right (const Range< int > &range)
 Returns a read/write iterator2d_range that points to the past the end bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols. More...
 
const_iterator2d_range upper_left (const Range< int > &range) const
 Returns a read-only iterator2d_range that points to the to the upper left element of the Range range associated to the block2d. More...
 
const_iterator2d_range bottom_right (const Range< int > &range) const
 Returns a read-only const_iterator2d_range that points to the past the end bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols. More...
 
reverse_iterator2d rupper_left ()
 Returns a read/write reverse iterator2d. It points to the bottom right element of the block2d. Iteration is done within the block2d in the reverse order. More...
 
reverse_iterator2d rbottom_right ()
 Returns a read/write reverse iterator2d. It points to past the upper left element of the block2d. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d rupper_left () const
 Returns a read only reverse iterator2d that points. It points to the bottom right element of the block2d. Iteration is done within the block2d in the reverse order. More...
 
const_reverse_iterator2d rbottom_right () const
 Returns a read only reverse iterator2d. It points to past the upper left element of the block2d. Iteration is done in the reverse order. More...
 
reverse_iterator2d rupper_left (const Box2d< int > &box)
 Returns a read/write reverse iterator2d. It points to the bottom right element of the Box2d associated to the block2d. Iteration is done in the reverse order. More...
 
reverse_iterator2d rbottom_right (const Box2d< int > &box)
 Returns a read/write reverse iterator2d. It points to one before the upper left element of the Box2d box associated to the block2d. More...
 
const_reverse_iterator2d rupper_left (const Box2d< int > &box) const
 Returns a read only reverse iterator2d. It points to the bottom right element of the Box2d box associated to the block2d. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d rbottom_right (const Box2d< int > &box) const
 Returns a read-only reverse iterator2d. It points to one before the element of the bottom right element of the Box2d box associated to the block2d. More...
 
reverse_iterator2d_range rupper_left (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write reverse_iterator2d_range that points to the past the bottom right element of the ranges row_range and col_range associated to the block2d. Iteration is done in the reverse order. More...
 
reverse_iterator2d_range rbottom_right (const Range< int > &row_range, const Range< int > &col_range)
 Returns a read/write reverse_iterator2d_range that points to one before the upper left element of the ranges row_range and col_range associated to the block2d. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rupper_left (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only reverse_iterator2d_range that points to the past the bottom right element of the ranges row_range and col_range associated to the block2d. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rbottom_right (const Range< int > &row_range, const Range< int > &col_range) const
 Returns a read-only reverse_iterator2d_range that points to one before the upper left element of the ranges row_range and col_range associated to the block2d.Iteration is done in the reverse order. More...
 
reverse_iterator2d_range rupper_left (const Range< int > &range)
 Returns a read/write reverse_iterator2d_range that points to the bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
reverse_iterator2d_range rbottom_right (const Range< int > &range)
 Returns a read/write reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rupper_left (const Range< int > &range) const
 Returns a read-only reverse_iterator2d_range that points to the to the bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
const_reverse_iterator2d_range rbottom_right (const Range< int > &range) const
 Returns a read_only reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order. More...
 
Assignment methods
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...
 
selfoperator= (const T &value)
 Assign all the elments of the block2d by value. More...
 
Element access operators
pointer operator[] (const size_type i)
 Subscript access to the row datas contained in the block2d. More...
 
const_pointer operator[] (const size_type i) const
 Subscript access to the row datas contained in the block2d. More...
 
reference operator() (const size_type i, const size_type j)
 Subscript access to the data contained in the block2d. More...
 
const_reference operator() (const size_type i, const size_type j) const
 Subscript access to the data contained in the block2d. More...
 
reference operator() (const Point2d< size_type > &point2d)
 Subscript access to the data contained in the block2d. More...
 
const_reference operator() (const Point2d< size_type > &point2d) const
 Subscript access to the data contained in the block2d. More...
 

Static Public Member Functions

static size_type dim1 ()
 Returns the number of rows (first dimension size) in the block2d. More...
 
static size_type rows ()
 Returns the number of rows (first dimension size) in the block2d. More...
 
static size_type dim2 ()
 Returns the number of columns (second dimension size) in the block2d. More...
 
static size_type columns ()
 Returns the number of columns (second dimension size) in the block2d. More...
 
static size_type cols ()
 Returns the number of columns (second dimension size) in the block2d. More...
 
static size_type size ()
 Returns the number of elements in the block2d. More...
 
static size_type max_size ()
 Returns the maximal size (number of elements) in the block2d. More...
 
static bool empty ()
 Returns true if the block is empty. (Thus size == 0) More...
 

Public Attributes

data [SIZE]
 Data array storage of the block2d. More...
 

Static Public Attributes

static const std::size_t SIZE = NR * NC
 Size of the block2d. More...
 
static const std::size_t DIM = 2
 

Friends

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

Detailed Description

template<typename T, std::size_t NR, std::size_t NC>
struct slip::block2d< T, NR, NC >

This is a two-dimensional static 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 double bracket element access.

Author
Benoit Tremblais <tremblais_AT_sic.univ-poitiers.fr>
Version
0.0.2
Date
2014/03/15
Since
1.0.0
Parameters
TType of object in the block2d
NRnumber of row of the block2d
NCnumber of column of the block2d
Axis conventions:
iterator2d_conventions.jpg
axis and notation conventions

Definition at line 124 of file Block2d.hpp.

Member Typedef Documentation

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::kstride_iterator<pointer,NC> slip::block2d< T, NR, NC >::col_iterator

Definition at line 198 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::stride_iterator<col_iterator> slip::block2d< T, NR, NC >::col_range_iterator

Definition at line 208 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::kstride_iterator<const_pointer,NC> slip::block2d< T, NR, NC >::const_col_iterator

Definition at line 199 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::stride_iterator<const_col_iterator> slip::block2d< T, NR, NC >::const_col_range_iterator

Definition at line 209 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef const_iterator2d slip::block2d< T, NR, NC >::const_default_iterator

Definition at line 230 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef const_pointer slip::block2d< T, NR, NC >::const_iterator

Definition at line 190 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::const_iterator2d_box<const_self> slip::block2d< T, NR, NC >::const_iterator2d

Definition at line 204 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::const_iterator2d_range<const_self> slip::block2d< T, NR, NC >::const_iterator2d_range

Definition at line 211 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef const value_type* slip::block2d< T, NR, NC >::const_pointer

Definition at line 182 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef const value_type& slip::block2d< T, NR, NC >::const_reference

Definition at line 184 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<const_col_iterator> slip::block2d< T, NR, NC >::const_reverse_col_iterator

Definition at line 217 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<const_col_range_iterator> slip::block2d< T, NR, NC >::const_reverse_col_range_iterator

Definition at line 223 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<const_iterator> slip::block2d< T, NR, NC >::const_reverse_iterator

Definition at line 193 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<const_iterator2d> slip::block2d< T, NR, NC >::const_reverse_iterator2d

Definition at line 219 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<const_iterator2d_range> slip::block2d< T, NR, NC >::const_reverse_iterator2d_range

Definition at line 225 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<const_iterator> slip::block2d< T, NR, NC >::const_reverse_row_iterator

Definition at line 215 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<const_row_range_iterator> slip::block2d< T, NR, NC >::const_reverse_row_range_iterator

Definition at line 221 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef const_pointer slip::block2d< T, NR, NC >::const_row_iterator

Definition at line 197 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::stride_iterator<const_pointer> slip::block2d< T, NR, NC >::const_row_range_iterator

Definition at line 207 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef const block2d<T,NR,NC> slip::block2d< T, NR, NC >::const_self

Definition at line 179 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef iterator2d slip::block2d< T, NR, NC >::default_iterator

Definition at line 229 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef ptrdiff_t slip::block2d< T, NR, NC >::difference_type

Definition at line 186 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef pointer slip::block2d< T, NR, NC >::iterator

Definition at line 189 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::iterator2d_box<self> slip::block2d< T, NR, NC >::iterator2d

Definition at line 203 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::iterator2d_range<self> slip::block2d< T, NR, NC >::iterator2d_range

Definition at line 210 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef value_type* slip::block2d< T, NR, NC >::pointer

Definition at line 181 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef value_type& slip::block2d< T, NR, NC >::reference

Definition at line 183 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<col_iterator> slip::block2d< T, NR, NC >::reverse_col_iterator

Definition at line 216 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<col_range_iterator> slip::block2d< T, NR, NC >::reverse_col_range_iterator

Definition at line 222 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<iterator> slip::block2d< T, NR, NC >::reverse_iterator

Definition at line 192 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<iterator2d> slip::block2d< T, NR, NC >::reverse_iterator2d

Definition at line 218 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<iterator2d_range> slip::block2d< T, NR, NC >::reverse_iterator2d_range

Definition at line 224 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<iterator> slip::block2d< T, NR, NC >::reverse_row_iterator

Definition at line 214 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::reverse_iterator<row_range_iterator> slip::block2d< T, NR, NC >::reverse_row_range_iterator

Definition at line 220 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef pointer slip::block2d< T, NR, NC >::row_iterator

Definition at line 196 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef slip::stride_iterator<pointer> slip::block2d< T, NR, NC >::row_range_iterator

Definition at line 206 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef block2d<T,NR,NC> slip::block2d< T, NR, NC >::self

Definition at line 178 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef std::size_t slip::block2d< T, NR, NC >::size_type

Definition at line 187 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
typedef T slip::block2d< T, NR, NC >::value_type

Definition at line 177 of file Block2d.hpp.

Member Function Documentation

template<typename T, std::size_t NR, std::size_t NC>
iterator slip::block2d< T, NR, NC >::begin ( )
inline

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

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

Definition at line 262 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator slip::block2d< T, NR, NC >::begin ( ) const
inline

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

Returns
const 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 286 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d slip::block2d< T, NR, NC >::bottom_right ( )
inline

Returns a read/write iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the block2d.

Returns
begin iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 1275 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d slip::block2d< T, NR, NC >::bottom_right ( ) const
inline

Returns a read-only iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the block2d.

Returns
begin const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 1299 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d slip::block2d< T, NR, NC >::bottom_right ( const Box2d< int > &  box)
inline

Returns a read/write iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the Box2d associated to the block2d.

Parameters
boxa Box2d defining the range of indices to iterate within the block2d.
Returns
end iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the block2d ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 1388 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d slip::block2d< T, NR, NC >::bottom_right ( const Box2d< int > &  box) const
inline

Returns a read only iterator2d that points to the past the end element of the block2d. It points to past the end element of the bottom right element of the Box2d associated to the block2d.

Parameters
boxa Box2d defining the range of indices to iterate within the block2d.
Returns
end const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the block2d ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 1419 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d_range slip::block2d< T, NR, NC >::bottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the block2d.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 1487 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d_range slip::block2d< T, NR, NC >::bottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only iterator2d_range that points to the past the end bottom right element of the ranges row_range and col_range associated to the block2d.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 1556 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d_range slip::block2d< T, NR, NC >::bottom_right ( const Range< int > &  range)
inline

Returns a read/write iterator2d_range that points to the past the end bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 1623 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d_range slip::block2d< T, NR, NC >::bottom_right ( const Range< int > &  range) const
inline

Returns a read-only const_iterator2d_range that points to the past the end bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 1687 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
col_iterator slip::block2d< T, NR, NC >::col_begin ( const size_type  col)
inline

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

Parameters
colThe index of the column to iterate.
Returns
begin col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));

Definition at line 493 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_col_iterator slip::block2d< T, NR, NC >::col_begin ( const size_type  col) const
inline

Returns a read-only iterator that points to the first element of the column column in the block2d. Iteration is done modulo the number of columns.

Parameters
colThe index of the column to iterate.
Returns
begin const_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d.
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));

Definition at line 518 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
col_range_iterator slip::block2d< T, NR, NC >::col_begin ( const size_type  col,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));

Definition at line 787 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_col_range_iterator slip::block2d< T, NR, NC >::col_begin ( const size_type  col,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));

Definition at line 860 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
col_iterator slip::block2d< T, NR, NC >::col_end ( const size_type  col)
inline

Returns a read/write iterator that points one past the end element of the column column in the block2d. Iteration is done modulo the number of columns.

Parameters
colThe index of the column to iterate.
Returns
begin col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d.
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));

Definition at line 591 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_col_iterator slip::block2d< T, NR, NC >::col_end ( const size_type  col) const
inline

Returns a read-only iterator that points one past the end element of the column column in the block2d. Iteration is done modulo the number of columns.

Parameters
colThe index of the column
Returns
begin const_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d.
Example:
//copy the elements of the column 0 of A1 in the column 1 of A2
std::copy(A1.col_begin(0),A1.col_end(0),A2.col_begin(1));

Definition at line 616 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
col_range_iterator slip::block2d< T, NR, NC >::col_end ( const size_type  col,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));

Definition at line 824 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_col_range_iterator slip::block2d< T, NR, NC >::col_end ( const size_type  col,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim1()-1,2);
//copy the elements of the column 0 of A1 iterated according to the
//range in the column 1 of A2
std::copy(A1.col_begin(0,range),A1.col_end(0,range),A2.col_begin(1));

Definition at line 898 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_col_iterator slip::block2d< T, NR, NC >::col_rbegin ( const size_type  col)
inline

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

Parameters
colThe index of the column to iterate.
Returns
begin col_reverse_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d.

Definition at line 954 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_col_iterator slip::block2d< T, NR, NC >::col_rbegin ( const size_type  col) const
inline

Returns a read-only reverse iterator that points to the last element of the column column in the block2d. Iteration is done modulo the number of columns and in the reverse element order.

Parameters
colThe index of the column to iterate.
Returns
begin const_reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d.

Definition at line 971 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_col_range_iterator slip::block2d< T, NR, NC >::col_rbegin ( const size_type  col,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1142 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_col_range_iterator slip::block2d< T, NR, NC >::col_rbegin ( const size_type  col,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1185 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_col_iterator slip::block2d< T, NR, NC >::col_rend ( const size_type  col)
inline

Returns a read/write reverse iterator that points one past the first element of the column column in the block2d. Iteration is done modulo the number of columns and in the reverse element order.

Parameters
colThe index of the column to iterate.
Returns
end reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d.

Definition at line 1020 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_col_iterator slip::block2d< T, NR, NC >::col_rend ( const size_type  col) const
inline

Returns a read-only reverse iterator that points one past the first element of the column column in the block2d. Iteration is done modulo the number of columns and in the reverse element order.

Parameters
colThe index of the column to iterate.
Returns
end const_reverse_col_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
col must be compatible with the range of the block2d.

Definition at line 1037 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_col_range_iterator slip::block2d< T, NR, NC >::col_rend ( const size_type  col,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1163 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_col_range_iterator slip::block2d< T, NR, NC >::col_rend ( const size_type  col,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1206 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static size_type slip::block2d< T, NR, NC >::cols ( )
inlinestatic

Returns the number of columns (second dimension size) in the block2d.

Definition at line 2303 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static size_type slip::block2d< T, NR, NC >::columns ( )
inlinestatic

Returns the number of columns (second dimension size) in the block2d.

Definition at line 2297 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static size_type slip::block2d< T, NR, NC >::dim1 ( )
inlinestatic

Returns the number of rows (first dimension size) in the block2d.

Definition at line 2282 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static size_type slip::block2d< T, NR, NC >::dim2 ( )
inlinestatic

Returns the number of columns (second dimension size) in the block2d.

Definition at line 2292 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static bool slip::block2d< T, NR, NC >::empty ( )
inlinestatic

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

Definition at line 2318 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator slip::block2d< T, NR, NC >::end ( )
inline

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

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

Definition at line 308 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator slip::block2d< T, NR, NC >::end ( ) const
inline

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

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

Definition at line 330 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
void slip::block2d< T, NR, NC >::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 2045 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
void slip::block2d< T, NR, NC >::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 2055 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
template<typename InputIterator >
void slip::block2d< T, NR, NC >::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 2069 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static size_type slip::block2d< T, NR, NC >::max_size ( )
inlinestatic

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

Definition at line 2313 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
std::string slip::block2d< T, NR, NC >::name ( ) const
inline

Returns the name of the class.

Definition at line 2276 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reference slip::block2d< T, NR, NC >::operator() ( const size_type  i,
const size_type  j 
)
inline

Subscript access to the data contained in the block2d.

Parameters
iThe index of the row for which the data should be accessed.
jThe index of the columns for which the data should be accessed.
Returns
Read/write reference to data.
Precondition
i < NR
j < NC

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 2201 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reference slip::block2d< T, NR, NC >::operator() ( const size_type  i,
const size_type  j 
) const
inline

Subscript access to the data contained in the block2d.

Parameters
iThe index of the row for which the data should be accessed.
jThe index of the columns for which the data should be accessed.
Returns
Read_only (constant) reference to data.
Precondition
i < NR
j < NC

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 2221 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reference slip::block2d< T, NR, NC >::operator() ( const Point2d< size_type > &  point2d)
inline

Subscript access to the data contained in the block2d.

Parameters
point2dA Point2d which indicate the subscripts of the data to access.
Returns
Read/write reference to data.
Precondition
point2d must be defined in the range of the block2d.

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 2240 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reference slip::block2d< T, NR, NC >::operator() ( const Point2d< size_type > &  point2d) const
inline

Subscript access to the data contained in the block2d.

Parameters
point2dA Point2d which indicate the subscripts of the data to access.
Returns
Read_only (constant) reference to data.
Precondition
point2d must be defined in the range of the block2d.

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 2259 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
self& slip::block2d< T, NR, NC >::operator= ( const T &  value)
inline

Assign all the elments of the block2d by value.

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

Definition at line 2082 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
pointer slip::block2d< T, NR, NC >::operator[] ( const size_type  i)
inline

Subscript access to the row datas contained in the block2d.

Parameters
iThe index of the row for which data should be accessed.
Returns
Read/write pointer to the row data.
Precondition
i < NR

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 2166 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_pointer slip::block2d< T, NR, NC >::operator[] ( const size_type  i) const
inline

Subscript access to the row datas contained in the block2d.

Parameters
iThe index of the row for which data should be accessed.
Returns
Read-only (constant) pointer to the row data.
Precondition
i < NR

This operator allows for easy, 2d array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined.

Definition at line 2182 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator slip::block2d< T, NR, NC >::rbegin ( )
inline

Returns a read/write reverse iterator that points to the last element in the block2d. 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 the elements of A1 and A2
//in S (iterated in the reverse order element)
std::transform(A1.begin(),A1.end(),
A2.begin(),S.rbegin(),
std::plus<double>());

Definition at line 353 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator slip::block2d< T, NR, NC >::rbegin ( ) const
inline

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

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

Definition at line 375 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d slip::block2d< T, NR, NC >::rbottom_right ( )
inline

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

Returns
reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1717 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d slip::block2d< T, NR, NC >::rbottom_right ( ) const
inline

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

Returns
const reverse iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1747 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d slip::block2d< T, NR, NC >::rbottom_right ( const Box2d< int > &  box)
inline

Returns a read/write reverse iterator2d. It points to one before the upper left element of the Box2d box associated to the block2d.

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

Definition at line 1787 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d slip::block2d< T, NR, NC >::rbottom_right ( const Box2d< int > &  box) const
inline

Returns a read-only reverse iterator2d. It points to one before the element of the bottom right element of the Box2d box associated to the block2d.

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

Definition at line 1827 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d_range slip::block2d< T, NR, NC >::rbottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

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

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1874 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d_range slip::block2d< T, NR, NC >::rbottom_right ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

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

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1921 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d_range slip::block2d< T, NR, NC >::rbottom_right ( const Range< int > &  range)
inline

Returns a read/write reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1967 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d_range slip::block2d< T, NR, NC >::rbottom_right ( const Range< int > &  range) const
inline

Returns a read_only reverse_iterator2d_range that points to one before the upper left element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 2012 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator slip::block2d< T, NR, NC >::rend ( )
inline

Returns a read/write reverse iterator that points to one before the first element in the block2d. 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 the elements of A1 and A2
//in S (iterated in the reverse order element)
std::transform(A1.begin(),A1.end(),
A2.begin(),S.rbegin(),
std::plus<double>());

Definition at line 397 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator slip::block2d< T, NR, NC >::rend ( ) const
inline

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

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

Definition at line 420 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
row_iterator slip::block2d< T, NR, NC >::row_begin ( const size_type  row)
inline

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

Parameters
rowThe index of the row to iterate.
Returns
begin row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));

Definition at line 443 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_row_iterator slip::block2d< T, NR, NC >::row_begin ( const size_type  row) const
inline

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

Parameters
rowThe index of the row to iterate.
Returns
begin const_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));

Definition at line 468 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
row_range_iterator slip::block2d< T, NR, NC >::row_begin ( const size_type  row,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));

Definition at line 647 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_row_range_iterator slip::block2d< T, NR, NC >::row_begin ( const size_type  row,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));

Definition at line 716 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
row_iterator slip::block2d< T, NR, NC >::row_end ( const size_type  row)
inline

Returns a read/write iterator that points one past the end element of the row row in the block2d. Iteration is done in ordinary element order.

Parameters
rowThe index of the row to iterate.
Returns
begin row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));

Definition at line 542 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_row_iterator slip::block2d< T, NR, NC >::row_end ( const size_type  row) const
inline

Returns a read-only iterator that points one past the end element of the row row in the block2d. Iteration is done in ordinary element order.

Parameters
rowThe index of the row to iterate.
Returns
begin const_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.
Example:
//copy the elements of the row 0 of A1 in the row 1 of A2
std::copy(A1.row_begin(0),A1.row_end(0),A2.row_begin(1));

Definition at line 567 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
row_range_iterator slip::block2d< T, NR, NC >::row_end ( const size_type  row,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));

Definition at line 683 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_row_range_iterator slip::block2d< T, NR, NC >::row_end ( const size_type  row,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of the row 0 of A1 iterated according to the
//range in the row 1 of A2
std::copy(A1.row_begin(0,range),A1.row_end(0,range),A2.row_begin(1));

Definition at line 753 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_row_iterator slip::block2d< T, NR, NC >::row_rbegin ( const size_type  row)
inline

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

Parameters
rowThe index of the row to iterate.
Returns
begin reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.

Definition at line 920 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_row_iterator slip::block2d< T, NR, NC >::row_rbegin ( const size_type  row) const
inline

Returns a read-only reverse iterator that points to the last element of the row row in the block2d. Iteration is done in the reverse element order.

Parameters
rowThe index of the row to iterate.
Returns
begin const_reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.

Definition at line 937 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_row_range_iterator slip::block2d< T, NR, NC >::row_rbegin ( const size_type  row,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1056 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_row_range_iterator slip::block2d< T, NR, NC >::row_rbegin ( const size_type  row,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1098 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_row_iterator slip::block2d< T, NR, NC >::row_rend ( const size_type  row)
inline

Returns a read/write reverse iterator that points one past the first element of the row row in the block2d. Iteration is done in the reverse element order.

Parameters
rowThe index of the row to iterate.
Returns
end reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.

Definition at line 987 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_row_iterator slip::block2d< T, NR, NC >::row_rend ( const size_type  row) const
inline

Returns a read-only reverse iterator that points one past the first element of the row row in the block2d. Iteration is done in the reverse element order.

Parameters
rowThe index of the row to iterate.
Returns
end const_reverse_row_iterator value
Remarks
This iterator is compatible with RandomAccessIterator algorithms.
Precondition
row must be compatible with the range of the block2d.

Definition at line 1003 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_row_range_iterator slip::block2d< T, NR, NC >::row_rend ( const size_type  row,
const slip::Range< int > &  range 
)
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1078 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_row_range_iterator slip::block2d< T, NR, NC >::row_rend ( const size_type  row,
const slip::Range< int > &  range 
) const
inline

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

Parameters
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 block2d.
The range must be inside the whole range of the block2d.

Definition at line 1119 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static size_type slip::block2d< T, NR, NC >::rows ( )
inlinestatic

Returns the number of rows (first dimension size) in the block2d.

Definition at line 2287 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d slip::block2d< T, NR, NC >::rupper_left ( )
inline

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

Returns
reverse_iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1702 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d slip::block2d< T, NR, NC >::rupper_left ( ) const
inline

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

Returns
const_reverse_iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1731 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d slip::block2d< T, NR, NC >::rupper_left ( const Box2d< int > &  box)
inline

Returns a read/write reverse iterator2d. It points to the bottom right element of the Box2d associated to the block2d. Iteration is done in the reverse order.

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

Definition at line 1767 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d slip::block2d< T, NR, NC >::rupper_left ( const Box2d< int > &  box) const
inline

Returns a read only reverse iterator2d. It points to the bottom right element of the Box2d box associated to the block2d. Iteration is done in the reverse order.

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

Definition at line 1806 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d_range slip::block2d< T, NR, NC >::rupper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

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

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1849 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d_range slip::block2d< T, NR, NC >::rupper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

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

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1898 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
reverse_iterator2d_range slip::block2d< T, NR, NC >::rupper_left ( const Range< int > &  range)
inline

Returns a read/write reverse_iterator2d_range that points to the bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range and must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1944 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_reverse_iterator2d_range slip::block2d< T, NR, NC >::rupper_left ( const Range< int > &  range) const
inline

Returns a read-only reverse_iterator2d_range that points to the to the bottom right element of the Range range associated to the block2d. The same range is applied for rows and cols. Iteration is done in the reverse order.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
const_reverse_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.

Definition at line 1990 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
static size_type slip::block2d< T, NR, NC >::size ( )
inlinestatic

Returns the number of elements in the block2d.

Definition at line 2308 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
void slip::block2d< T, NR, NC >::swap ( block2d< T, NR, NC > &  x)
inline

Swaps data with another block.

Parameters
xA block of the same element type

Definition at line 2324 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d slip::block2d< T, NR, NC >::upper_left ( )
inline

Returns a read/write iterator2d that points to the first element of the block2d. It points to the upper left element of the block2d.

Returns
begin iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 1231 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d slip::block2d< T, NR, NC >::upper_left ( ) const
inline

Returns a read-only iterator2d that points to the first element of the block2d. It points to the upper left element of the block2d.

Returns
begin const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
//copy the elements of A1 in A2

Definition at line 1253 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d slip::block2d< T, NR, NC >::upper_left ( const Box2d< int > &  box)
inline

Returns a read/write iterator2d that points to the first element of the block2d. It points to the upper left element of the Box2d associated to the block2d.

Parameters
boxA Box2d defining the range of indices to iterate within the block2d.
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Returns
end iterator2d value
Precondition
The box indices must be inside the range of the block2d ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 1330 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d slip::block2d< T, NR, NC >::upper_left ( const Box2d< int > &  box) const
inline

Returns a read only iterator2d that points to the first element of the block2d. It points to the upper left element of the Box2d associated to the block2d.

Parameters
boxa Box2d defining the range of indices to iterate within the block2d.
Returns
end const iterator2d value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Precondition
The box indices must be inside the range of the block2d ones.
Example:
slip::Box2d<int> box(1,1,3,2);
//copy the elements of A1 inside the box which upper_left element
//is located in (1,1) and the bottom right element is in (3,2)

Definition at line 1359 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d_range slip::block2d< T, NR, NC >::upper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
)
inline

Returns a read/write iterator2d_range that points to the upper left element of the ranges row_range and col_range associated to the block2d.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 1454 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d_range slip::block2d< T, NR, NC >::upper_left ( const Range< int > &  row_range,
const Range< int > &  col_range 
) const
inline

Returns a read-only iterator2d_range that points to the to the upper left element of the ranges row_range and col_range associated to the block2d.

Parameters
row_rangeThe range of the rows.
col_rangeThe range of the columns.
Precondition
row_range and col_range must be valid.
The ranges indices must be inside the ranges of the block2d ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> row_range(0,A1.dim2()-1,2);
slip::Range<int> col_range(0,A1.dim1()-1,2);
//copy the elements of A1 within the ranges row_range and col_range
//in A2
std::copy(A1.upper_left(row_range,col_range),
A1.bottom_right(row_range,col_range),A2.upper_left());

Definition at line 1522 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
iterator2d_range slip::block2d< T, NR, NC >::upper_left ( const Range< int > &  range)
inline

Returns a read/write iterator2d_range that points to the upper left element of the Range range associated to the block2d. The same range is applied for rows and cols.

Parameters
rangeThe range of the rows and the cols.
Precondition
range and must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 1592 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const_iterator2d_range slip::block2d< T, NR, NC >::upper_left ( const Range< int > &  range) const
inline

Returns a read-only iterator2d_range that points to the to the upper left element of the Range range associated to the block2d.

Parameters
rangeThe range of the rows and the cols.
Precondition
range must be valid.
The range indices must be inside the ranges of the block2d ones.
Returns
const_iterator2d_range value
Remarks
This iterator is compatible with BidirectionalIterator algorithms.
Example:
slip::Range<int> range(0,A1.dim2()-1,2);
//copy the elements of A1 within the range range
//in A2
std::copy(A1.upper_left(range),A1.bottom_right(range),A2.upper_left());

Definition at line 1655 of file Block2d.hpp.

Friends And Related Function Documentation

template<typename T, std::size_t NR, std::size_t NC>
friend class boost::serialization::access
friend

Definition at line 2332 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
bool operator!= ( const block2d< T, NR, NC > &  x,
const block2d< T, NR, NC > &  y 
)
friend

Block2d inequality comparison.

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

Definition at line 2384 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
bool operator< ( const block2d< T, NR, NC > &  x,
const block2d< T, NR, NC > &  y 
)
friend

Less than comparison operator (block2d ordering relation)

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

Definition at line 2396 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
std::ostream& operator<< ( std::ostream &  out,
const block2d< T, NR, NC > &  b 
)
friend

Write the block2d to an ouput stream.

Parameters
outoutput std::ostream
bblock2d to write to an output stream

Definition at line 2356 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
bool operator<= ( const block2d< T, NR, NC > &  x,
const block2d< T, NR, NC > &  y 
)
friend

Less than equal comparison operator.

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

Definition at line 2413 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
bool operator== ( const block2d< T, NR, NC > &  x,
const block2d< T, NR, NC > &  y 
)
friend

Block2d equality comparison.

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

Definition at line 2375 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
bool operator> ( const block2d< T, NR, NC > &  x,
const block2d< T, NR, NC > &  y 
)
friend

More than comparison operator.

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

Definition at line 2405 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
bool operator>= ( const block2d< T, NR, NC > &  x,
const block2d< T, NR, NC > &  y 
)
friend

More than equal comparison operator.

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

Definition at line 2421 of file Block2d.hpp.

Member Data Documentation

template<typename T, std::size_t NR, std::size_t NC>
T slip::block2d< T, NR, NC >::data[SIZE]

Data array storage of the block2d.

Definition at line 2330 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const std::size_t slip::block2d< T, NR, NC >::DIM = 2
static

Definition at line 235 of file Block2d.hpp.

template<typename T, std::size_t NR, std::size_t NC>
const std::size_t slip::block2d< T, NR, NC >::SIZE = NR * NC
static

Size of the block2d.

Definition at line 233 of file Block2d.hpp.


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