blitz Version 0.9
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | Friends
Range Class Reference

#include <range.h>

List of all members.

Public Types

enum  { fromStart = INT_MIN, toEnd = INT_MIN }
typedef int T_numtype

Public Member Functions

 Range ()
 Range (int slicePosition)
 Range (int first, int last, int stride=1)
int first (int lowRange=0) const
int last (int highRange=0) const
unsigned length (int=0) const
int stride () const
bool isAscendingContiguous () const
void setRange (int first, int last, int stride=1)
bool isUnitStride () const
Range operator- (int shift) const
Range operator+ (int shift) const
int operator[] (unsigned i) const
int operator() (unsigned i) const
bool _bz_hasFastAccess () const
T_numtype _bz_fastAccess (unsigned i) const
unsigned _bz_suggestLength () const
_bz_VecExpr< Range_bz_asVecExpr () const

Static Public Member Functions

static Range all ()

Public Attributes

static const int _bz_dynamicLengthCount = 0
static const int _bz_staticLength = 0

Static Public Attributes

static const int _bz_staticLengthCount = 0

Private Attributes

int first_
int last_
int stride_

Friends

ostream & operator<< (ostream &os, const Range &range)

Member Typedef Documentation

typedef int Range::T_numtype

Member Enumeration Documentation

anonymous enum
Enumerator:
fromStart 
toEnd 

Constructor & Destructor Documentation

Range::Range ( ) [inline]

References first_, fromStart, last_, stride_, and toEnd.

Referenced by all(), operator+(), and operator-().

Range::Range ( int  slicePosition) [inline, explicit]

References first_, last_, and stride_.

Range::Range ( int  first,
int  last,
int  stride = 1 
) [inline]

References fromStart, stride(), and toEnd.


Member Function Documentation

_bz_VecExpr<Range> Range::_bz_asVecExpr ( ) const [inline]
T_numtype Range::_bz_fastAccess ( unsigned  i) const [inline]

References first_, and i.

bool Range::_bz_hasFastAccess ( ) const [inline]

References stride_.

unsigned Range::_bz_suggestLength ( ) const [inline]

References length().

Referenced by Vector< T_numtype >::Vector().

static Range Range::all ( ) [inline, static]

References fromStart, Range(), and toEnd.

int Range::first ( int  lowRange = 0) const [inline]
bool Range::isAscendingContiguous ( ) const [inline]

References first_, last_, and stride_.

Referenced by Array< P_numtype, N_rank >::Array().

bool Range::isUnitStride ( ) const [inline]

References stride_.

int Range::last ( int  highRange = 0) const [inline]

References last_, and toEnd.

Referenced by setRange(), and Vector< T_numtype >::Vector().

unsigned Range::length ( int  = 0) const [inline]
int Range::operator() ( unsigned  i) const [inline]

References first_, and stride_.

Range Range::operator+ ( int  shift) const [inline]

References first_, fromStart, last_, Range(), stride_, and toEnd.

Range Range::operator- ( int  shift) const [inline]

References first_, fromStart, last_, Range(), stride_, and toEnd.

int Range::operator[] ( unsigned  i) const [inline]

References first_, and stride_.

void Range::setRange ( int  first,
int  last,
int  stride = 1 
) [inline]

References first(), first_, last(), last_, stride(), and stride_.

int Range::stride ( ) const [inline]

References stride_.

Referenced by Range(), setRange(), and Vector< T_numtype >::Vector().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const Range range 
) [friend]

Member Data Documentation

const int Range::_bz_staticLength = 0
const int Range::_bz_staticLengthCount = 0 [static]
int Range::first_ [private]
int Range::last_ [private]
int Range::stride_ [private]

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