ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::vector_ulong::iterator_base< container, content, reverse_t > Class Template Reference

The container must have iterator types. More...

Inheritance diagram for gsl::vector_ulong::iterator_base< container, content, reverse_t >:
Inheritance graph
Collaboration diagram for gsl::vector_ulong::iterator_base< container, content, reverse_t >:
Collaboration graph

Public Types

typedef std::random_access_iterator_tag iterator_category
 An iterator must have an iterator category. More...
 
typedef unsigned long value_type
 An iterator must have a value type. More...
 
typedef value_typepointer
 An iterator must have a pointer typea. More...
 
typedef value_typereference
 An iterator must have a reference type. More...
 
typedef ptrdiff_t difference_type
 An iterator must have a difference_type. More...
 

Public Member Functions

reference operator* () const
 Dereference the pointer. More...
 
pointer operator-> () const
 Dereference the pointer. More...
 
reference operator[] (difference_type const n) const
 Get element at i + n by reference ([] operator). More...
 
difference_type operator- (iterator_base< container, content, reverse_t > const &i) const
 The - operator: find distance between two iterators. More...
 
bool operator== (iterator_base< container, content, reverse_t > const &i) const
 The == operator. More...
 
bool operator!= (iterator_base< container, content, reverse_t > const &i) const
 The != operator. More...
 
bool operator< (iterator_base< container, content, reverse_t > const &i) const
 The < operator is used to compare iterators. More...
 

Protected Member Functions

void increment ()
 Increment the iterator. More...
 
void decrement ()
 Decrement the iterator. More...
 
void shift (difference_type const n)
 Shift iterator n places. More...
 
 iterator_base ()
 The iterator is default constructible. More...
 
 iterator_base (container *v, difference_type position)
 This constructor allows vector_ulong to create non-default iterators. More...
 

Protected Attributes

container * v
 Store a pointer to a vector_ulong we can iterate over: 0 if no vector_ulong. More...
 
difference_type position
 Mark position of iterator within vector_ulong. More...
 

Friends

class vector_ulong
 

Detailed Description

template<typename container, typename content, bool reverse_t>
class gsl::vector_ulong::iterator_base< container, content, reverse_t >

The container must have iterator types.

We create a suitable class here.

Definition at line 404 of file vector_ulong.hpp.

Member Typedef Documentation

◆ difference_type

template<typename container , typename content , bool reverse_t>
typedef ptrdiff_t gsl::vector_ulong::iterator_base< container, content, reverse_t >::difference_type

An iterator must have a difference_type.

Definition at line 427 of file vector_ulong.hpp.

◆ iterator_category

template<typename container , typename content , bool reverse_t>
typedef std::random_access_iterator_tag gsl::vector_ulong::iterator_base< container, content, reverse_t >::iterator_category

An iterator must have an iterator category.

Definition at line 410 of file vector_ulong.hpp.

◆ pointer

template<typename container , typename content , bool reverse_t>
typedef value_type* gsl::vector_ulong::iterator_base< container, content, reverse_t >::pointer

An iterator must have a pointer typea.

Definition at line 418 of file vector_ulong.hpp.

◆ reference

template<typename container , typename content , bool reverse_t>
typedef value_type& gsl::vector_ulong::iterator_base< container, content, reverse_t >::reference

An iterator must have a reference type.

Definition at line 422 of file vector_ulong.hpp.

◆ value_type

template<typename container , typename content , bool reverse_t>
typedef unsigned long gsl::vector_ulong::iterator_base< container, content, reverse_t >::value_type

An iterator must have a value type.

Definition at line 414 of file vector_ulong.hpp.

Constructor & Destructor Documentation

◆ iterator_base() [1/2]

template<typename container , typename content , bool reverse_t>
gsl::vector_ulong::iterator_base< container, content, reverse_t >::iterator_base ( )
inlineprotected

The iterator is default constructible.

Definition at line 628 of file vector_ulong.hpp.

◆ iterator_base() [2/2]

template<typename container , typename content , bool reverse_t>
gsl::vector_ulong::iterator_base< container, content, reverse_t >::iterator_base ( container *  v,
difference_type  position 
)
inlineprotected

This constructor allows vector_ulong to create non-default iterators.

Parameters
vThe vector_ulong that creates this
positionThe initial postion of the iterator

Definition at line 634 of file vector_ulong.hpp.

Member Function Documentation

◆ decrement()

template<typename container , typename content , bool reverse_t>
void gsl::vector_ulong::iterator_base< container, content, reverse_t >::decrement ( )
inlineprotected

Decrement the iterator.

Returns
0 for success, anything else for failure

Definition at line 597 of file vector_ulong.hpp.

References gsl::exception::GSL_EFAILED, and gsl::multifit::nlinear::position().

◆ increment()

template<typename container , typename content , bool reverse_t>
void gsl::vector_ulong::iterator_base< container, content, reverse_t >::increment ( )
inlineprotected

Increment the iterator.

Returns
0 for success, anything else for failure

Definition at line 580 of file vector_ulong.hpp.

References gsl::exception::GSL_EFAILED, and gsl::multifit::nlinear::position().

◆ operator!=()

template<typename container , typename content , bool reverse_t>
bool gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator!= ( iterator_base< container, content, reverse_t > const &  i) const
inline

The != operator.

Parameters
iThe iterator being compared
Returns
true or false according as i != *this

Definition at line 551 of file vector_ulong.hpp.

◆ operator*()

template<typename container , typename content , bool reverse_t>
reference gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator* ( ) const
inline

Dereference the pointer.

Returns
a reference to content

Definition at line 434 of file vector_ulong.hpp.

References gsl::vector::ccgsl_pointer, gsl::exception::GSL_EFAILED, and gsl::multifit::nlinear::position().

◆ operator-()

template<typename container , typename content , bool reverse_t>
difference_type gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator- ( iterator_base< container, content, reverse_t > const &  i) const
inline

The - operator: find distance between two iterators.

Parameters
iA second iterator
Returns
(signed) distance between this and i

Definition at line 519 of file vector_ulong.hpp.

References gsl::exception::GSL_EFAILED, gsl::multifit::nlinear::position(), gsl::vector_ulong::iterator_base< container, content, reverse_t >::position, and gsl::vector_ulong::iterator_base< container, content, reverse_t >::v.

◆ operator->()

template<typename container , typename content , bool reverse_t>
pointer gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator-> ( ) const
inline

Dereference the pointer.

Returns
a pointer to content

Definition at line 462 of file vector_ulong.hpp.

References gsl::vector::ccgsl_pointer, gsl::exception::GSL_EFAILED, and gsl::multifit::nlinear::position().

◆ operator<()

template<typename container , typename content , bool reverse_t>
bool gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator< ( iterator_base< container, content, reverse_t > const &  i) const
inline

The < operator is used to compare iterators.

This only makes sense if the iterators iterate over the same vector_ulong and the function calls a GSL error handler and returns false if they do not.

Parameters
iThe iterator being compared
Returns
true or false according as i < j

Definition at line 561 of file vector_ulong.hpp.

References gsl::exception::GSL_EFAILED, gsl::multifit::nlinear::position(), gsl::vector_ulong::iterator_base< container, content, reverse_t >::position, and gsl::vector_ulong::iterator_base< container, content, reverse_t >::v.

◆ operator==()

template<typename container , typename content , bool reverse_t>
bool gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator== ( iterator_base< container, content, reverse_t > const &  i) const
inline

The == operator.

Parameters
iThe iterator being compared
Returns
true or false according as i != *this

Definition at line 543 of file vector_ulong.hpp.

References gsl::multifit::nlinear::position(), gsl::vector_ulong::iterator_base< container, content, reverse_t >::position, and gsl::vector_ulong::iterator_base< container, content, reverse_t >::v.

◆ operator[]()

template<typename container , typename content , bool reverse_t>
reference gsl::vector_ulong::iterator_base< container, content, reverse_t >::operator[] ( difference_type const  n) const
inline

Get element at i + n by reference ([] operator).

Parameters
nThe offset from i
Returns
a reference to content

Definition at line 489 of file vector_ulong.hpp.

References gsl::exception::GSL_EFAILED, gsl::rstat::n(), and gsl::multifit::nlinear::position().

◆ shift()

template<typename container , typename content , bool reverse_t>
void gsl::vector_ulong::iterator_base< container, content, reverse_t >::shift ( difference_type const  n)
inlineprotected

Shift iterator n places.

Parameters
nA difference_type value to be added to position of iterator

Definition at line 614 of file vector_ulong.hpp.

References gsl::exception::GSL_EFAILED, gsl::rstat::n(), and gsl::multifit::nlinear::position().

Friends And Related Function Documentation

◆ vector_ulong

template<typename container , typename content , bool reverse_t>
friend class vector_ulong
friend

Definition at line 405 of file vector_ulong.hpp.

Member Data Documentation

◆ position

◆ v


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