• Main Page
  • Related Pages
  • Classes
  • Files
  • Examples
  • File List
  • File Members

Interval.h

Go to the documentation of this file.
00001 //===========================================================================
00040 //===========================================================================
00041 
00042 
00043 #ifndef __INTERVAL_H
00044 #define __INTERVAL_H
00045 
00046 
00050 class Interval
00051 {
00052 private:
00054     double   lower;
00055 
00057     double   upper;
00058 
00059 public:
00061     Interval()
00062     {
00063         lower = upper = 0;
00064     }
00065 
00067     Interval(double lo)
00068     {
00069         lower = upper = lo;
00070     }
00071 
00073     Interval(double lo, double hi)
00074     {
00075         lower = lo; upper = hi;
00076     }
00077 
00079     double   lowerBound() const
00080     {
00081         return lower;
00082     }
00083 
00085     double   upperBound() const
00086     {
00087         return upper;
00088     }
00089 
00091     double   width() const
00092     {
00093         return upper - lower;
00094     }
00095 };
00096 
00097 
00098 #endif
00099 
  • Shark Main Page
  • Array
  • Rng
  • LinAlg
  • FileUtil
  • EALib
  • MOO-EALib
  • ReClaM
  • Fuzzy
  • Mixture
  • Tutorials
  • FAQ