OOFEM 3.0
Loading...
Searching...
No Matches
oofem::Range Class Reference

#include <range.h>

Public Member Functions

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

Protected Attributes

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

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

◆ Range() [1/3]

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

Constructor. Creates Range containing only given single number.

Definition at line 60 of file range.h.

References endIndx, and startIndx.

Referenced by operator<<.

◆ Range() [2/3]

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

Constructor. Creates range <li, hi>.

Definition at line 64 of file range.h.

References endIndx, and startIndx.

◆ Range() [3/3]

oofem::Range::Range ( )
inline

Empty range constructor.

Definition at line 69 of file range.h.

References endIndx, and startIndx.

Member Function Documentation

◆ giveEnd()

int oofem::Range::giveEnd ( )
inline

Returns the end index (inclusive).

Definition at line 77 of file range.h.

References endIndx.

◆ giveStart()

int oofem::Range::giveStart ( )
inline

Returns the start index (inclusive).

Definition at line 75 of file range.h.

References startIndx.

◆ test()

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

Tests if number is in range.

Definition at line 80 of file range.h.

References endIndx, and startIndx.

◆ operator<<

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

Definition at line 82 of file range.h.

References endIndx, Range(), and startIndx.

Member Data Documentation

◆ endIndx

int oofem::Range::endIndx
protected

Interval end value.

Definition at line 56 of file range.h.

Referenced by giveEnd(), operator<<, Range(), Range(), Range(), and test().

◆ startIndx

int oofem::Range::startIndx
protected

Interval start value.

Definition at line 54 of file range.h.

Referenced by giveStart(), operator<<, Range(), Range(), Range(), and test().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011