STK++ 0.9.13
STK_Range.h File Reference

In this file we define the class Range, a range of Index denoting a sub-vector region. More...

#include <map>
Include dependency graph for STK_Range.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  STK::RangeBase< Derived >
 Base class for TRange class. More...
 
class  STK::TRange< Size_ >
 Index sub-vector region with fixed size. More...
 
class  STK::TRange< UnknownSize >
 Index sub-vector region: Specialization when the size is unknown. More...
 
struct  STK::Arithmetic< TRange< Size_ > >
 Partial Specialization for TRange. More...
 
struct  STK::IdTypeImpl< TRange< Size_ > >
 Partial Specialization of the IdTypeImpl for the Type TRange. More...
 

Namespaces

namespace  STK
 The namespace STK is the main domain space of the Statistical ToolKit project.
 

Macros

#define _R(first, last)   Range(first, last, 0)
 Utility macro that can be used in a similar way that first:last.
 

Typedefs

typedef TRange< UnknownSizeSTK::Range
 

Functions

template<int Size_>
ostreamSTK::operator<< (ostream &os, TRange< Size_ > const &I)
 Write a TRange in the form first:last (MATLAB-like form) in an output stream.
 
istreamSTK::operator>> (istream &is, Range &I)
 
template<int SizeI_, int SizeJ_>
Range STK::sup (TRange< SizeI_ > const &I, TRange< SizeJ_ > const &J)
 compute sup(I,J).
 
template<int SizeI_, int SizeJ_>
Range STK::inf (TRange< SizeI_ > const &I, TRange< SizeJ_ > const &J)
 compute inf(I,J).
 
template<int SizeI_>
Range STK::incFirst (TRange< SizeI_ > const &I)
 if I=a:b, return a+1:b
 
template<int SizeI_>
Range STK::incLast (TRange< SizeI_ > const &I)
 if I=a:b, return a:b+1
 
template<int SizeI_>
Range STK::decFirst (TRange< SizeI_ > const &I)
 if I=a:b, return a-1:b
 
template<int SizeI_>
Range STK::decLast (TRange< SizeI_ > const &I)
 if I=a:b, return a:b-1
 
Range STK::stringToRange (String const &str)
 Convert a String to a Range.
 
template<int Size_>
TRange< Size_STK::stringToRange (String const &str, std::map< String, TRange< Size_ > > const &mapping)
 Convert a String to a Range using a map.
 
template<int Size_>
String STK::rangeToString (TRange< Size_ > const &value, std::ios_base &(*f)(std::ios_base &)=std::dec)
 Convert an Range to a String.
 
template<int Size_>
String STK::rangeToString (TRange< Size_ > const &value, std::map< TRange< Size_ >, String > const &mapping)
 Convert a Range to a String.
 
template<>
String STK::typeToString< Range > (Range const &t, std::ios_base &(*f)(std::ios_base &))
 Specialization for Range.
 

Variables

const int firstIdx_ = 0
 base index of the containers created in STK++.
 

Detailed Description

In this file we define the class Range, a range of Index denoting a sub-vector region.

Definition in file STK_Range.h.

Macro Definition Documentation

◆ _R

#define _R (   first,
  last 
)    Range(first, last, 0)

Utility macro that can be used in a similar way that first:last.

Definition at line 53 of file STK_Range.h.