OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::Range Class Reference

Class Range is an abstraction for interval of integer numbers. More...

#include <range.h>

Public Member Functions

 Range (int indx)
 Constructor. Creates Range containing only given single number. More...
 
 Range (int li, int hi)
 Constructor. Creates range <li, hi> More...
 
 Range ()
 Empty range constructor. More...
 
int giveStart ()
 Returns the start index (inclusive). More...
 
int giveEnd ()
 Returns the end index (inclusive). More...
 
bool test (int i)
 Tests if number is in range. More...
 

Protected Attributes

int startIndx
 Interval start value. More...
 
int endIndx
 Interval end value. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Range &r)
 

Detailed Description

Class Range is an abstraction for interval of integer numbers.

It is described using its start and end values of interval it represents. The interval is defined to represent all values between start and end values, including start and end values. Function for testing if number is in interval is provided. Used by OutputManager to efficiently maintain intervals.

Definition at line 50 of file range.h.

Constructor & Destructor Documentation

oofem::Range::Range ( int  indx)
inline

Constructor. Creates Range containing only given single number.

Definition at line 60 of file range.h.

oofem::Range::Range ( int  li,
int  hi 
)
inline

Constructor. Creates range <li, hi>

Definition at line 64 of file range.h.

oofem::Range::Range ( )
inline

Empty range constructor.

Definition at line 69 of file range.h.

Member Function Documentation

int oofem::Range::giveEnd ( )
inline

Returns the end index (inclusive).

Definition at line 77 of file range.h.

int oofem::Range::giveStart ( )
inline

Returns the start index (inclusive).

Definition at line 75 of file range.h.

bool oofem::Range::test ( int  i)
inline

Tests if number is in range.

Definition at line 80 of file range.h.

Friends And Related Function Documentation

std :: ostream& operator<< ( std::ostream &  out,
const Range r 
)
friend

Definition at line 82 of file range.h.

Member Data Documentation

int oofem::Range::endIndx
protected

Interval end value.

Definition at line 56 of file range.h.

int oofem::Range::startIndx
protected

Interval start value.

Definition at line 54 of file range.h.


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:40 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011