Stencil variant operating on a raw const unsigned char array. More...
#include <specialisations.hpp>
Public Types | |
typedef const unsigned char * | const_iterator |
Uses the array's constant iterator type. | |
typedef const unsigned char & | const_reference |
Uses the array's element const reference type. | |
typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
Uses the array's constant reverse iterator type. | |
typedef std::ptrdiff_t | difference_type |
typedef const unsigned char * | iterator |
Uses the array's iterator type. | |
typedef const unsigned char & | reference |
Uses the array's element reference type. | |
typedef std::reverse_iterator < iterator > | reverse_iterator |
Uses the array's reverse iterator type. | |
typedef std::size_t | size_type |
Uses the array's type used to denote the length of the array. | |
typedef unsigned char | value_type |
Uses the array's element type. | |
Public Member Functions | |
reference | at (size_type i) throw (StandardException) |
const_reference | at (size_type i) const throw (StandardException) |
reference | back () ecl_assert_throw_decl(StandardException) |
const_reference | back () const ecl_assert_throw_decl(StandardException) |
iterator | begin () ecl_assert_throw_decl(StandardException) |
const_iterator | begin () const ecl_assert_throw_decl(StandardException) |
iterator | end () ecl_assert_throw_decl(StandardException) |
const_iterator | end () const ecl_assert_throw_decl(StandardException) |
reference | front () ecl_assert_throw_decl(StandardException) |
const_reference | front () const ecl_assert_throw_decl(StandardException) |
Stencil< const unsigned char * > & | operator= (const Stencil< const unsigned char * > &s) ecl_assert_throw_decl(StandardException) |
This either resettles this stencil or copies across to it (depending on the rhs stencil). | |
reference | operator[] (size_type i) ecl_assert_throw_decl(StandardException) |
const_reference | operator[] (size_type i) const ecl_assert_throw_decl(StandardException) |
reverse_iterator | rbegin () ecl_assert_throw_decl(StandardException) |
const_reverse_iterator | rbegin () const ecl_assert_throw_decl(StandardException) |
reverse_iterator | rend () ecl_assert_throw_decl(StandardException) |
const_reverse_iterator | rend () const ecl_assert_throw_decl(StandardException) |
void | resettle (const unsigned int &start_index, const unsigned int &n) ecl_assert_throw_decl(StandardException) |
Resettle the stencil on a different range over the same underlying array. | |
size_type | size () const |
Stencil (const_iterator underlying_array, const unsigned int &length, const_iterator begin_iter, const_iterator end_iter) ecl_assert_throw_decl(StandardException) | |
Initialises with a pointer to the underlying array with boundary constraints. | |
Stencil (const_iterator underlying_array, const unsigned int &length, const unsigned int &start_index=0, const unsigned int &n=0) ecl_assert_throw_decl(StandardException) | |
Initialises with a reference to the underlying array and boundary constraints. | |
Stencil< const unsigned char * > | stencil (const unsigned int &start_index, const unsigned int &n) const ecl_assert_throw_decl(StandardException) |
Generate a sub-stencil. | |
virtual | ~Stencil () |
Private Attributes | |
const_iterator | array |
const_iterator | b_iter |
const_iterator | e_iter |
unsigned int | length |
Friends | |
template<typename OutputStream > | |
OutputStream & | operator<< (OutputStream &ostream, const Stencil< const unsigned char * > &stencil) |
Insertion operator for stencils. |
Stencil variant operating on a raw const unsigned char array.
This of course assumes the user is responsible for range checking on the unsigned char array.
TODO : generalise this for const T*.
Definition at line 453 of file specialisations.hpp.
typedef const unsigned char* ecl::Stencil< const unsigned char * >::const_iterator |
Uses the array's constant iterator type.
Definition at line 461 of file specialisations.hpp.
typedef const unsigned char& ecl::Stencil< const unsigned char * >::const_reference |
Uses the array's element const reference type.
Definition at line 463 of file specialisations.hpp.
typedef std::reverse_iterator<const_iterator> ecl::Stencil< const unsigned char * >::const_reverse_iterator |
Uses the array's constant reverse iterator type.
Definition at line 467 of file specialisations.hpp.
typedef std::ptrdiff_t ecl::Stencil< const unsigned char * >::difference_type |
Definition at line 465 of file specialisations.hpp.
typedef const unsigned char* ecl::Stencil< const unsigned char * >::iterator |
Uses the array's iterator type.
Definition at line 460 of file specialisations.hpp.
typedef const unsigned char& ecl::Stencil< const unsigned char * >::reference |
Uses the array's element reference type.
Definition at line 462 of file specialisations.hpp.
typedef std::reverse_iterator<iterator> ecl::Stencil< const unsigned char * >::reverse_iterator |
Uses the array's reverse iterator type.
Definition at line 466 of file specialisations.hpp.
typedef std::size_t ecl::Stencil< const unsigned char * >::size_type |
Uses the array's type used to denote the length of the array.
Definition at line 464 of file specialisations.hpp.
typedef unsigned char ecl::Stencil< const unsigned char * >::value_type |
Uses the array's element type.
Definition at line 459 of file specialisations.hpp.
ecl::Stencil< const unsigned char * >::Stencil | ( | const_iterator | underlying_array, |
const unsigned int & | length, | ||
const_iterator | begin_iter, | ||
const_iterator | end_iter | ||
) | [inline] |
Initialises with a pointer to the underlying array with boundary constraints.
Sets up the underlying storage container along with boundary constraints in the style of stl containers.
underlying_array | : reference to the underlying array. |
length | : of the underlying array |
begin_iter | : start of the stencil window. |
end_iter | : end of the stencil window. |
: | StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 486 of file specialisations.hpp.
ecl::Stencil< const unsigned char * >::Stencil | ( | const_iterator | underlying_array, |
const unsigned int & | length, | ||
const unsigned int & | start_index = 0 , |
||
const unsigned int & | n = 0 |
||
) | [inline] |
Initialises with a reference to the underlying array and boundary constraints.
Sets up the underlying storage container along with boundary constraints in the style of eigen block intialisations.
underlying_array | : reference to the underlying array. |
length | : of the underlying array |
start_index | : start of the stencil window. |
n | : number of elements to include in the window. |
: | StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 509 of file specialisations.hpp.
virtual ecl::Stencil< const unsigned char * >::~Stencil | ( | ) | [inline, virtual] |
Definition at line 519 of file specialisations.hpp.
reference ecl::Stencil< const unsigned char * >::at | ( | size_type | i | ) | throw (StandardException) [inline] |
Accesses elements in the stencil, returning references to the requested element. This accessor always does range checks. Compare this with the [] accessor which only checks if NDEBUG is not defined.
i | : the index of the requested element. |
: | StandardException : throws if range is requested element is out of range. |
Definition at line 756 of file specialisations.hpp.
const_reference ecl::Stencil< const unsigned char * >::at | ( | size_type | i | ) | const throw (StandardException) [inline] |
Accesses elements in the stencil, returning references to the requested element. This accessor always does range checks. Compare this with the [] accessor which only checks if NDEBUG is not defined. This also ensures the references are constant, which in turn ensures the contents cannot of the array cannot be modified.
i | : the index of the requested element. |
: | StandardException : throws if range is requested element is out of range. |
Definition at line 780 of file specialisations.hpp.
reference ecl::Stencil< const unsigned char * >::back | ( | ) | [inline] |
Generates an reference to the last element in the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 695 of file specialisations.hpp.
const_reference ecl::Stencil< const unsigned char * >::back | ( | ) | const [inline] |
Generates a constant reference to the last element in the array (cannot change the value).
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 705 of file specialisations.hpp.
iterator ecl::Stencil< const unsigned char * >::begin | ( | ) | [inline] |
Generates a pointer (iterator) pointing to the start of the stencil.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 591 of file specialisations.hpp.
const_iterator ecl::Stencil< const unsigned char * >::begin | ( | ) | const [inline] |
Generates a const pointer (iterator) pointing to the start of the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 601 of file specialisations.hpp.
iterator ecl::Stencil< const unsigned char * >::end | ( | ) | [inline] |
Generates an pointer (iterator) pointing to the end of the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 611 of file specialisations.hpp.
const_iterator ecl::Stencil< const unsigned char * >::end | ( | ) | const [inline] |
Generates a const pointer (iterator) pointing to the end of the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 621 of file specialisations.hpp.
reference ecl::Stencil< const unsigned char * >::front | ( | ) | [inline] |
Generates an reference to the first element in the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 675 of file specialisations.hpp.
const_reference ecl::Stencil< const unsigned char * >::front | ( | ) | const [inline] |
Generates a constant reference to the first element in the array (cannot change the value).
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 685 of file specialisations.hpp.
Stencil<const unsigned char*>& ecl::Stencil< const unsigned char * >::operator= | ( | const Stencil< const unsigned char * > & | s | ) | [inline] |
This either resettles this stencil or copies across to it (depending on the rhs stencil).
The assignment operator has one of two effects - it will either reassign this stencil if both stencils work on the same underlying array, OR it copies across if acting on two different arrays.
s |
: | StandardException : if copying from another stencil/array, throws if size exceeded [debug mode only]. |
Definition at line 574 of file specialisations.hpp.
reference ecl::Stencil< const unsigned char * >::operator[] | ( | size_type | i | ) | [inline] |
Accesses elements in the stencil, returning references to the requested element. This accessor only does range checks in debug mode (NDEBUG is not defined). Compare this with the at() accessor which always checks if the range is exceeded.
: | StandardException : throws if range is requested element is out of range [debug mode only]. |
Definition at line 723 of file specialisations.hpp.
const_reference ecl::Stencil< const unsigned char * >::operator[] | ( | size_type | i | ) | const [inline] |
Accesses elements in the stencil, returning references to the requested element. This accessor only does range checks in debug mode (NDEBUG is not defined). Compare this with the at() accessor which always checks if the range is exceeded. This also ensures the references are constant, which in turn ensures the contents cannot of the array cannot be modified.
: | StandardException : throws if range is requested element is out of range [debug mode only]. |
Definition at line 740 of file specialisations.hpp.
reverse_iterator ecl::Stencil< const unsigned char * >::rbegin | ( | ) | [inline] |
Generates a reverse iterator pointing to the end of the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 631 of file specialisations.hpp.
const_reverse_iterator ecl::Stencil< const unsigned char * >::rbegin | ( | ) | const [inline] |
Generates a constant reverse iterator pointing to the end of the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 641 of file specialisations.hpp.
reverse_iterator ecl::Stencil< const unsigned char * >::rend | ( | ) | [inline] |
Generates a reverse iterator pointing to the beginning of the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 651 of file specialisations.hpp.
const_reverse_iterator ecl::Stencil< const unsigned char * >::rend | ( | ) | const [inline] |
Generates a constant reverse iterator pointing to the beginning of the array.
: | StandardException : throws if the underlying array changed size and the stencil is now out of range [debug mode only]. |
Definition at line 661 of file specialisations.hpp.
void ecl::Stencil< const unsigned char * >::resettle | ( | const unsigned int & | start_index, |
const unsigned int & | n | ||
) | [inline] |
Resettle the stencil on a different range over the same underlying array.
Resets the range of the stencil operating on the currently referenced array. Using a starting index + size is in line with the way eigen blocks and segments work.
start_index | : start of the stencil window. |
n | : number of elements to include in the window. |
: | StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 553 of file specialisations.hpp.
size_type ecl::Stencil< const unsigned char * >::size | ( | ) | const [inline] |
The size of the stencil.
Definition at line 801 of file specialisations.hpp.
Stencil<const unsigned char*> ecl::Stencil< const unsigned char * >::stencil | ( | const unsigned int & | start_index, |
const unsigned int & | n | ||
) | const [inline] |
Generate a sub-stencil.
Opens another window on this stencil. Using a starting index + size is in line with the way eigen blocks and segments work.
start_index | : start of the stencil window. |
n | : number of elements to include in the window. |
: | StandardException : throws if the indices provided are out of range [debug mode only]. |
Definition at line 534 of file specialisations.hpp.
OutputStream& operator<< | ( | OutputStream & | ostream, |
const Stencil< const unsigned char * > & | stencil | ||
) | [friend] |
Insertion operator for stencils.
Insertion operator for sending the stencil to an output stream. This is raw, and has no formatting.
Concept Check: makes sure the template parameter provided for the stream is a stream type with the required functionality.
ostream | : the output stream. |
stencil | : the stencil to be inserted. |
OutputStream | : the stream being used. |
ArrayType | : the type of the underlying array. |
const_iterator ecl::Stencil< const unsigned char * >::array [private] |
Definition at line 826 of file specialisations.hpp.
const_iterator ecl::Stencil< const unsigned char * >::b_iter [private] |
Definition at line 828 of file specialisations.hpp.
const_iterator ecl::Stencil< const unsigned char * >::e_iter [private] |
Definition at line 828 of file specialisations.hpp.
unsigned int ecl::Stencil< const unsigned char * >::length [private] |
Definition at line 827 of file specialisations.hpp.