ivl 679
ivl::range< T > Class Template Reference

A range of Numbers. More...

#include <range.hpp>

Inheritance diagram for ivl::range< T >:
ivl::array< T, data::range<> > ivl::index_array

List of all members.

Public Types

typedef ptrdiff_t diff_type
 difference type of iterators
typedef size_t size_type
 parameter of resize, in each class of the hierarchy

Public Member Functions

void reshape (size_t len)
 Reshape is same as resize for 1-d arrays.
Constructors

< the distance between elements

 range ()
 Default Constructor.
 range (T s, T e)
 Construct a range (default step)
 range (T s, step_type st, T e)
 Construct a range.
init member function
void init ()
 Init is behaves exactly like the constructor. See constructor reference.
void init (size_t count)
 Init is behaves exactly like the constructor. See constructor reference.
void init (int count)
 Init is behaves exactly like the constructor. See constructor reference.
void init (long int count)
 Init is behaves exactly like the constructor. See constructor reference.
void init (size_t count, const T &s)
 Init is behaves exactly like the constructor. See constructor reference.
void init (size_t count, const T *ptr)
 Init is behaves exactly like the constructor. See constructor reference.
void init (const internal::tuple_rvalue< J > &r)
 Init is behaves exactly like the constructor. See constructor reference.
void init (const array &a)
 Init is behaves exactly like the constructor. See constructor reference.
void init (const array< J, S > &a, size_t n)
 Init is behaves exactly like the constructor. See constructor reference.
void init (const array< J, S > &a)
 Init is behaves exactly like the constructor. See constructor reference.
void init (size_t count, const array< J, S > &a)
 Init is behaves exactly like the constructor. See constructor reference.
Size functions
size_t length () const
 Get the length of the element sequence.
size_type size () const
 Get the size of the array. generic-class function.
size_t numel () const
 Get the length of the element sequence.
Element access

Access a unique element by specifying the position

std::vector< T >::const_reference operator[] (size_t offset) const
 Returns the const element found at position offset.
std::vector< T >::reference operator[] (size_t offset)
 Returns the element found at position offset.

Detailed Description

template<class T>
class ivl::range< T >

A range of Numbers.

eg: 1:2:9 = [1 3 5 7 9]


Constructor & Destructor Documentation

template<class T>
ivl::range< T >::range ( s,
e 
) [inline]

Construct a range (default step)

Parameters:
sStart - The starting element of the range.
eEnd - The ending element of the range.
template<class T>
ivl::range< T >::range ( s,
step_type  st,
e 
) [inline]

Construct a range.

Parameters:
sStart - The starting element of the range.
stStep - The distance between two consecutive elements.
eEnd - The ending element of the range

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations