|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
This class handles vector_floats as shared handles. More...
#include <block_float.hpp>

Classes | |
| class | const_iterator_t |
| A class template for the const iterators. More... | |
| class | iterator_base |
| The container must have iterator types. More... | |
| class | iterator_t |
| A class template for the two non-const iterators. More... | |
Public Types | |
| typedef float | value_type |
| A container must have a value_type. More... | |
| typedef value_type & | reference |
| A container must have a reference type. More... | |
| typedef value_type const & | const_reference |
| A container must have a constant reference type. More... | |
| typedef value_type * | pointer |
| A container must have a pointer type. More... | |
| typedef value_type const * | const_pointer |
| A container must have a constant pointer type. More... | |
| typedef const_iterator_t< false > | const_iterator |
| The const_iterator type. More... | |
| typedef iterator_t< false > | iterator |
| The iterator type. More... | |
| typedef const_iterator_t< true > | const_reverse_iterator |
| The const_reverse_iterator type. More... | |
| typedef iterator_t< true > | reverse_iterator |
| The reverse_iterator type. More... | |
| typedef const_iterator::difference_type | difference_type |
| A container must have a difference_type. More... | |
| typedef size_t | size_type |
| A container must have a size_type. More... | |
Public Member Functions | |
| block_float () | |
| The default constructor is only really useful for assigning to. More... | |
| block_float (size_t const n) | |
| The default constructor creates a new block_float with n elements. More... | |
| block_float (gsl_block_float *v) | |
| Could construct from a gsl_block_float. More... | |
| block_float (std::initializer_list< float > initializer_list) | |
| Could construct from a std::initializer_list in C++11. More... | |
| block_float (block_float const &v) | |
| The copy constructor. More... | |
| block_float & | operator= (block_float const &v) |
| The assignment operator. More... | |
| block_float | clone () const |
| The clone function. More... | |
| ~block_float () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| void | reset () |
| Stop sharing ownership of the shared pointer. More... | |
| block_float (block_float &&v) | |
| Move constructor. More... | |
| block_float & | operator= (block_float &&v) |
| Move operator. More... | |
| bool | operator== (block_float const &v) const |
| Two block_float objects are identically equal if their elements are identical. More... | |
| bool | operator!= (block_float const &v) const |
| Two block_float objects are different equal if their elements are not identical. More... | |
| bool | operator< (block_float const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (block_float const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (block_float const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (block_float const &v) const |
| A container needs to define an ordering for sorting. More... | |
| iterator | begin () |
| Get iterator pointing to first block_float element. More... | |
| const_iterator | begin () const |
| Get iterator pointing to first block_float element. More... | |
| iterator | end () |
| Get iterator pointing beyond last block_float element. More... | |
| const_iterator | end () const |
| Get iterator pointing beyond last block_float element. More... | |
| size_type | size () const |
| The size (number of elements) of the block_float. More... | |
| float * | data () |
| Give access to the data block_float. More... | |
| float const * | data () const |
| Give access to the data block_float. More... | |
| size_type | max_size () const |
| The max size (number of elements) of the block_float. More... | |
| bool | empty () const |
| Find if the block_float is empty. More... | |
| void | swap (block_float &v) |
| Swap two block_float objects. More... | |
| reverse_iterator | rbegin () |
| Get iterator pointing to first block_float element. More... | |
| const_reverse_iterator | rbegin () const |
| Get iterator pointing to first block_float element. More... | |
| reverse_iterator | rend () |
| Get iterator pointing beyond last block_float element. More... | |
| const_reverse_iterator | rend () const |
| Get iterator pointing beyond last block_float element. More... | |
| float & | operator[] (size_t const n) |
Get element at position n by reference ([] operator). More... | |
| float const & | operator[] (size_t const n) const |
Get element at position n by reference ([] operator). More... | |
| gsl_block_float * | get () const |
| Get the gsl_block_float. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_block_float. More... | |
| size_t | use_count () const |
| Find how many block_float objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
Private Attributes | |
| gsl_block_float * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
This class handles vector_floats as shared handles.
It models a random access container so that STL functions work with block_float.
Definition at line 41 of file block_float.hpp.
| typedef const_iterator_t<false> gsl::block_float::const_iterator |
The const_iterator type.
Definition at line 982 of file block_float.hpp.
| typedef value_type const* gsl::block_float::const_pointer |
A container must have a constant pointer type.
Definition at line 314 of file block_float.hpp.
| typedef value_type const& gsl::block_float::const_reference |
A container must have a constant reference type.
Definition at line 304 of file block_float.hpp.
| typedef const_iterator_t<true> gsl::block_float::const_reverse_iterator |
The const_reverse_iterator type.
Definition at line 990 of file block_float.hpp.
A container must have a difference_type.
Definition at line 999 of file block_float.hpp.
| typedef iterator_t<false> gsl::block_float::iterator |
The iterator type.
Definition at line 986 of file block_float.hpp.
| typedef value_type* gsl::block_float::pointer |
A container must have a pointer type.
Definition at line 309 of file block_float.hpp.
| typedef value_type& gsl::block_float::reference |
A container must have a reference type.
Definition at line 299 of file block_float.hpp.
| typedef iterator_t<true> gsl::block_float::reverse_iterator |
The reverse_iterator type.
Definition at line 994 of file block_float.hpp.
| typedef size_t gsl::block_float::size_type |
A container must have a size_type.
Definition at line 1004 of file block_float.hpp.
| typedef float gsl::block_float::value_type |
A container must have a value_type.
Definition at line 294 of file block_float.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 46 of file block_float.hpp.
References ccgsl_pointer, and count.
Referenced by operator=(), and reset().
|
inlineexplicit |
The default constructor creates a new block_float with n elements.
| n | The number of elements in the block_float |
Definition at line 56 of file block_float.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_block_float.
This is not usually a good idea. In this case you should not use gsl_block_float_free() to deallocate the memory.
| v | The block_float |
Definition at line 78 of file block_float.hpp.
References ccgsl_pointer, and count.
|
inline |
Could construct from a std::initializer_list in C++11.
| initializer_list | The initializer_list. |
Definition at line 89 of file block_float.hpp.
References begin(), ccgsl_pointer, count, and gsl::rstat::n().
|
inline |
The copy constructor.
This shares the block_float. Use clone() if you want a full copy.
| v | The block_float to copy. |
Definition at line 110 of file block_float.hpp.
References count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 149 of file block_float.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The block_float to move. |
Definition at line 167 of file block_float.hpp.
References count.
|
inline |
Get iterator pointing to first block_float element.
Definition at line 1010 of file block_float.hpp.
Referenced by block_float().
|
inline |
Get iterator pointing to first block_float element.
Definition at line 1017 of file block_float.hpp.
|
inline |
The clone function.
Use this if you want a copy of the block_float that does not share the underlying data.
Definition at line 138 of file block_float.hpp.
References ccgsl_pointer.
|
inline |
Give access to the data block_float.
The data() and size() functions mimic the functions of std::array<T> and std::vector<T>.
Definition at line 1048 of file block_float.hpp.
References ccgsl_pointer.
|
inline |
Give access to the data block_float.
The data() and size() functions mimic the functions of std::array<T> and std::vector<T>.
Definition at line 1056 of file block_float.hpp.
References ccgsl_pointer.
|
inline |
Find if the block_float is empty.
true if has size zero; otherwise false Definition at line 1071 of file block_float.hpp.
References ccgsl_pointer.
|
inline |
Get iterator pointing beyond last block_float element.
Definition at line 1025 of file block_float.hpp.
References ccgsl_pointer, and size().
|
inline |
Get iterator pointing beyond last block_float element.
Definition at line 1033 of file block_float.hpp.
References ccgsl_pointer, and size().
|
inline |
Get the gsl_block_float.
Definition at line 1177 of file block_float.hpp.
References ccgsl_pointer.
|
inline |
The max size (number of elements) of the block_float.
Identical to size but required for a container.
Definition at line 1065 of file block_float.hpp.
References ccgsl_pointer.
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_block_float Definition at line 1197 of file block_float.hpp.
References ccgsl_pointer.
|
inline |
Two block_float objects are different equal if their elements are not identical.
| v | The block_float to be compared with this |
false or true according as this and v have identical elements or not Definition at line 208 of file block_float.hpp.
References operator==().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a block_float is nonnegative.
| v | The block_float to be compared with this |
false or true according as this is less than v lexicographically Definition at line 220 of file block_float.hpp.
References ccgsl_pointer, gsl::movstat::min(), and size().
Referenced by operator<=().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a block_float is nonnegative.
| v | The block_float to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 274 of file block_float.hpp.
References operator<(), and operator==().
|
inline |
Move operator.
| v | The block_float to move. |
Definition at line 176 of file block_float.hpp.
References block_float().
|
inline |
The assignment operator.
This makes a shared copy.
| v | The block_float to copy |
Definition at line 118 of file block_float.hpp.
References ccgsl_pointer, and count.
|
inline |
Two block_float objects are identically equal if their elements are identical.
| v | The block_float to be compared with this |
true or false according as this and v have identical elements or not Definition at line 189 of file block_float.hpp.
References ccgsl_pointer.
Referenced by operator!=(), operator<=(), and operator>=().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a block_float is nonnegative.
| v | The block_float to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 247 of file block_float.hpp.
References ccgsl_pointer, gsl::movstat::min(), and size().
Referenced by operator>=().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a block_float is nonnegative.
| v | The block_float to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 286 of file block_float.hpp.
References operator==(), and operator>().
|
inline |
Get element at position n by reference ([] operator).
| n | The position of the element |
Definition at line 1121 of file block_float.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, gsl::rstat::n(), and size().
|
inline |
Get element at position n by reference ([] operator).
| n | The position of the element |
Definition at line 1144 of file block_float.hpp.
References ccgsl_pointer, gsl::exception::GSL_EFAULT, gsl::exception::GSL_EINVAL, gsl::rstat::n(), and size().
|
inline |
Get iterator pointing to first block_float element.
Definition at line 1088 of file block_float.hpp.
References ccgsl_pointer, and size().
|
inline |
Get iterator pointing to first block_float element.
Definition at line 1096 of file block_float.hpp.
References ccgsl_pointer, and size().
|
inline |
Get iterator pointing beyond last block_float element.
Definition at line 1105 of file block_float.hpp.
|
inline |
Get iterator pointing beyond last block_float element.
Definition at line 1112 of file block_float.hpp.
|
inline |
Stop sharing ownership of the shared pointer.
Definition at line 161 of file block_float.hpp.
References block_float().
|
inline |
The size (number of elements) of the block_float.
Definition at line 1042 of file block_float.hpp.
References ccgsl_pointer.
Referenced by end(), operator<(), operator>(), operator[](), and rbegin().
|
inline |
Swap two block_float objects.
This works even if the block_float objects have different sizes because it swaps pointers.
| v | The block_float to swap with this. |
Definition at line 1078 of file block_float.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_block_float.
true or falses according as this is the only block_float object sharing the gsl_block_float Definition at line 1183 of file block_float.hpp.
References count.
|
inline |
Find how many block_float objects share this pointer.
Definition at line 1188 of file block_float.hpp.
References count.
|
private |
The shared pointer.
Definition at line 1166 of file block_float.hpp.
Referenced by block_float(), clone(), data(), empty(), end(), get(), max_size(), operator bool(), gsl::block_float::iterator_t< reverse >::operator-(), gsl::block_float::const_iterator_t< reverse >::operator-(), operator<(), gsl::block_float::iterator_t< reverse >::operator<(), gsl::block_float::const_iterator_t< reverse >::operator<(), operator=(), operator==(), operator>(), operator[](), rbegin(), size(), swap(), and ~block_float().
|
private |
The shared reference count.
Definition at line 1170 of file block_float.hpp.
Referenced by block_float(), operator=(), swap(), unique(), use_count(), and ~block_float().