Bound Class Reference

This class is used to define boundary conditions. More...

#include <Bound.h>

List of all members.

Public Member Functions

 Bound ()
 Default constructor.
 Bound (std::string sName, double dLowerBound, double dUpperBound)
 This constructor requires 3 parameters :
  • the name of the bound (indicate the objet bound)
  • the lower bound value
  • the upper bound value ModelId=43872EC80067.

virtual ~Bound ()
 Destructor.
void setName (std::string sName)
 Change the name of the Bound.
std::string getName () const
 Return the name of the Bound.
virtual void setLowerBound (double dLowerBound)
 Set the Lower Bound value.
virtual double getLowerBound () const
 Return the Lower Bound value.
virtual void setUpperBound (double dUpperBound)
 Set the upper Bound value.
virtual double getUpperBound () const
 Return the upper Bound value.
void setBound (Bound *mBound)
 Update the Bound with the mBound Bound object values.
void setBound (std::string sName, double dLowerBound, double dUpperBound)
 Update the Bound members values according the three parameters (name,min,max).
bool isInBound (double dValue)
 Method to check if a value is in the bounds.
bool isStricklyInBound (double dValue)
 Method to check if a value is in the bounds.
Boundoperator= (Bound *pBound)
 Operator=.
 Bound (const Bound &mBound)
 Copy constructor.
void printInfos ()

Private Attributes

std::string _sName
double _dLowerBound
double _dUpperBound


Detailed Description

This class is used to define boundary conditions.

Definition at line 17 of file Bound.h.


Constructor & Destructor Documentation

Bound::Bound  ) 
 

Default constructor.

Definition at line 17 of file Bound.cpp.

00018 {
00019 
00020 }

Bound::Bound std::string  sName,
double  dLowerBound,
double  dUpperBound
 

This constructor requires 3 parameters :

  • the name of the bound (indicate the objet bound)
  • the lower bound value
  • the upper bound value ModelId=43872EC80067.

Definition at line 34 of file Bound.cpp.

00034                                                                   : _sName(sName),_dLowerBound(dLowerBound),_dUpperBound(dUpperBound)
00035 {
00036 
00037 }

Bound::~Bound  )  [virtual]
 

Destructor.

Definition at line 24 of file Bound.cpp.

00025 {
00026 
00027 }

Bound::Bound const Bound mBound  ) 
 

Copy constructor.

Definition at line 98 of file Bound.cpp.

References getLowerBound(), getName(), getUpperBound(), and setBound().

00099 {
00100         setBound(mBound.getName(),mBound.getLowerBound(),mBound.getUpperBound());
00101 }

Here is the call graph for this function:


Member Function Documentation

double Bound::getLowerBound  )  const [virtual]
 

Return the Lower Bound value.

Definition at line 61 of file Bound.cpp.

References _dLowerBound.

Referenced by Bound(), isInBound(), isStricklyInBound(), printInfos(), setBound(), and Variable::setValue().

00062 {
00063         return _dLowerBound;
00064 }

std::string Bound::getName  )  const [inline]
 

Return the name of the Bound.

Definition at line 48 of file Bound.cpp.

References _sName.

Referenced by Bound(), printInfos(), and setBound().

00049 {
00050         return _sName;
00051 }

double Bound::getUpperBound  )  const [virtual]
 

Return the upper Bound value.

Definition at line 73 of file Bound.cpp.

References _dUpperBound.

Referenced by Bound(), isInBound(), isStricklyInBound(), printInfos(), setBound(), and Variable::setValue().

00074 {
00075         return _dUpperBound;
00076 }

bool Bound::isInBound double  dValue  ) 
 

Method to check if a value is in the bounds.

The limits are included : [lowerBound,upperBound] ModelId=439D88340256

Definition at line 115 of file Bound.cpp.

References getLowerBound(), and getUpperBound().

00116 {
00117         return ((getLowerBound() <= dValue) && (dValue  <= getUpperBound()));
00118 }

Here is the call graph for this function:

bool Bound::isStricklyInBound double  dValue  ) 
 

Method to check if a value is in the bounds.

The limits are not included : ]lowerBound,upperBound[ ModelId=439D88340276

Definition at line 123 of file Bound.cpp.

References getLowerBound(), and getUpperBound().

00124 {
00125         return ((getLowerBound() < dValue) && (dValue  < getUpperBound()));
00126 }

Here is the call graph for this function:

Bound & Bound::operator= Bound pBound  ) 
 

Operator=.

Definition at line 105 of file Bound.cpp.

References setBound().

00106 {
00107         
00108         setBound(pBound);
00109     return *this;
00110 } 

Here is the call graph for this function:

void Bound::printInfos  ) 
 

Definition at line 128 of file Bound.cpp.

References getLowerBound(), getName(), and getUpperBound().

Referenced by Variable::printInfos().

00129 {
00130         std::cout << "\n##### BOUND " << getName() << " --> [" << getLowerBound() << "," << getUpperBound() << "]" <<  std::endl;
00131 }

Here is the call graph for this function:

void Bound::setBound std::string  sName,
double  dLowerBound,
double  dUpperBound
 

Update the Bound members values according the three parameters (name,min,max).

Definition at line 89 of file Bound.cpp.

References setLowerBound(), setName(), and setUpperBound().

00090 {
00091         setName(sName);
00092         setLowerBound(dLowerBound);
00093         setUpperBound(dUpperBound);
00094 }

Here is the call graph for this function:

void Bound::setBound Bound mBound  ) 
 

Update the Bound with the mBound Bound object values.

Definition at line 80 of file Bound.cpp.

References getLowerBound(), getName(), getUpperBound(), setLowerBound(), setName(), and setUpperBound().

Referenced by Bound(), Variable::changeBound(), and operator=().

00081 {
00082         setName(mBound->getName());
00083         setLowerBound(mBound->getLowerBound());
00084         setUpperBound(mBound->getUpperBound());
00085 }

Here is the call graph for this function:

void Bound::setLowerBound double  dLowerBound  )  [virtual]
 

Set the Lower Bound value.

Definition at line 55 of file Bound.cpp.

References _dLowerBound.

Referenced by setBound().

00056 {
00057         _dLowerBound = dLowerBound;
00058 }

void Bound::setName std::string  sName  )  [inline]
 

Change the name of the Bound.

Definition at line 41 of file Bound.cpp.

References _sName.

Referenced by setBound().

00042 {
00043         _sName = sName;
00044 }

void Bound::setUpperBound double  dUpperBound  )  [virtual]
 

Set the upper Bound value.

Definition at line 67 of file Bound.cpp.

References _dUpperBound.

Referenced by setBound().

00068 {
00069         _dUpperBound = dUpperBound;
00070 }


Member Data Documentation

double Bound::_dLowerBound [private]
 

Definition at line 66 of file Bound.h.

Referenced by getLowerBound(), and setLowerBound().

double Bound::_dUpperBound [private]
 

Definition at line 68 of file Bound.h.

Referenced by getUpperBound(), and setUpperBound().

std::string Bound::_sName [private]
 

Definition at line 64 of file Bound.h.

Referenced by getName(), and setName().


The documentation for this class was generated from the following files:
Generated on Fri Jul 10 10:32:13 2009 for Utils Library by  doxygen 1.4.5