KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
IndexSet Class Reference

A generic set of indices, either listed explicitly or in a range. If imax < imin, this indicates that the indices should be used instead. More...

#include <IndexSet.h>

Public Member Functions

 IndexSet (int imax=0)
 
 IndexSet (int imin, int imax)
 
 IndexSet (const std::vector< int > &indices)
 
 operator std::vector< int > () const
 
int operator[] (int i) const
 
bool IsRange () const
 
size_t Size () const
 
int Find (int index) const
 
int MaxValue () const
 
template<class T >
void GetElements (const T &x, T &xind) const
 
template<class T >
void SetElements (const T &xind, T &x) const
 

Public Attributes

int imin
 
int imax
 
std::vector< int > indices
 

Detailed Description

A generic set of indices, either listed explicitly or in a range. If imax < imin, this indicates that the indices should be used instead.


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