Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::RealRange Class Reference

represents a real range: i.e. one of ]low,high[ ; [low,high[; [low,high]; ]low,high] More...

#include <RealMapping.h>

Collaboration diagram for PLearn::RealRange:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RealRange ()
 RealRange (char leftbracket_, real low_, real high_, char rightbracket_)
real span ()
void checkbrackets () const
void print (ostream &out) const
void write (ostream &out) const
void read (istream &in)
string getString () const
bool contains (real val) const
 Compare RealRange and real: the relation is either: Range `contains` real Range < real, if higher bound < real Range > real, if lower bound > real.

bool operator< (real x) const
bool operator> (real x) const
bool operator< (const RealRange &x) const
bool operator> (const RealRange &x) const
bool operator== (const RealRange &rr) const

Public Attributes

real low
real high
char leftbracket
char rightbracket

Detailed Description

represents a real range: i.e. one of ]low,high[ ; [low,high[; [low,high]; ]low,high]

Definition at line 53 of file RealMapping.h.


Constructor & Destructor Documentation

PLearn::RealRange::RealRange  )  [inline]
 

Definition at line 62 of file RealMapping.h.

References high, leftbracket, low, and rightbracket.

Referenced by PLearn::RealMapping::removeMapping().

PLearn::RealRange::RealRange char  leftbracket_,
real  low_,
real  high_,
char  rightbracket_
[inline]
 

Definition at line 67 of file RealMapping.h.

References checkbrackets(), high, leftbracket, low, and rightbracket.


Member Function Documentation

void PLearn::RealRange::checkbrackets  )  const [inline]
 

Definition at line 73 of file RealMapping.h.

References leftbracket, PLERROR, and rightbracket.

Referenced by read(), and RealRange().

bool PLearn::RealRange::contains real  val  )  const
 

Compare RealRange and real: the relation is either: Range `contains` real Range < real, if higher bound < real Range > real, if lower bound > real.

Definition at line 88 of file RealMapping.cc.

References high, leftbracket, low, rightbracket, and val.

string PLearn::RealRange::getString  )  const
 

Definition at line 76 of file RealMapping.cc.

References high, leftbracket, low, and rightbracket.

bool PLearn::RealRange::operator< const RealRange x  )  const
 

Compare 2 RealRanges: This can be used to sort a list of RealRanges, or to build a map indexed by RealRanges. Note that ordering of ranges is only properly defined for ranges that do not overlap.

Definition at line 97 of file RealMapping.cc.

References high, rightbracket, and x.

bool PLearn::RealRange::operator< real  x  )  const
 

Definition at line 91 of file RealMapping.cc.

References high, rightbracket, and x.

bool PLearn::RealRange::operator== const RealRange rr  )  const
 

Definition at line 103 of file RealMapping.cc.

References high, leftbracket, low, and rightbracket.

bool PLearn::RealRange::operator> const RealRange x  )  const
 

Definition at line 100 of file RealMapping.cc.

References leftbracket, low, and x.

bool PLearn::RealRange::operator> real  x  )  const
 

Definition at line 94 of file RealMapping.cc.

References leftbracket, low, and x.

void PLearn::RealRange::print ostream &  out  )  const [inline]
 

Definition at line 79 of file RealMapping.h.

References high, leftbracket, low, and rightbracket.

Referenced by PLearn::operator<<().

void PLearn::RealRange::read istream &  in  )  [inline]
 

Definition at line 85 of file RealMapping.h.

References checkbrackets(), high, leftbracket, low, and rightbracket.

Referenced by PLearn::read(), and PLearn::RealMapping::read().

real PLearn::RealRange::span  )  [inline]
 

Definition at line 71 of file RealMapping.h.

References PLearn::abs(), high, and low.

void PLearn::RealRange::write ostream &  out  )  const [inline]
 

Definition at line 82 of file RealMapping.h.

References high, leftbracket, low, and rightbracket.


Member Data Documentation

real PLearn::RealRange::high
 

Definition at line 57 of file RealMapping.h.

Referenced by contains(), getString(), operator<(), operator==(), print(), read(), RealRange(), span(), and write().

char PLearn::RealRange::leftbracket
 

Definition at line 58 of file RealMapping.h.

Referenced by checkbrackets(), contains(), getString(), operator==(), operator>(), print(), read(), RealRange(), and write().

real PLearn::RealRange::low
 

Definition at line 56 of file RealMapping.h.

Referenced by contains(), getString(), operator==(), operator>(), print(), read(), RealRange(), span(), and write().

char PLearn::RealRange::rightbracket
 

Definition at line 59 of file RealMapping.h.

Referenced by checkbrackets(), contains(), getString(), operator<(), operator==(), print(), read(), RealRange(), and write().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:22:42 2004 for PLearn by doxygen 1.3.7