ABA_FSVARSTAT Class Reference

status of fixed and set variables. More...

#include <fsvarstat.h>

Inheritance diagram for ABA_FSVARSTAT:

ABA_ABACUSROOT List of all members.

Public Types

enum  STATUS {
  Free, SetToLowerBound, Set, SetToUpperBound,
  FixedToLowerBound, Fixed, FixedToUpperBound
}
 The enumeration defining the different statuses of variables from the point of view of fixing and setting:. More...

Public Member Functions

 ABA_FSVARSTAT (ABA_GLOBAL *glob)
 This constructor initializes the status as Free.
 ABA_FSVARSTAT (ABA_GLOBAL *glob, STATUS status)
 This constructor initializes the status explicitely.
 ABA_FSVARSTAT (ABA_GLOBAL *glob, STATUS status, double value)
 This constructor initializes the status explicitely to Fixed or Set.
 ABA_FSVARSTAT (ABA_FSVARSTAT *fsVarStat)
STATUS status () const
void status (STATUS stat)
 This version of the function status() assigns a new status.
void status (STATUS stat, double val)
 This version of the function status() can assign a new status also for the statuses Fixed and Set.
void status (const ABA_FSVARSTAT *stat)
 A version of status() for assigning the status of an other object of the class ABA_FSVARSTAT.
double value () const
void value (double val)
 This version of value() assigns a new value of fixing or setting.
bool fixed () const
bool set () const
bool fixedOrSet () const
bool contradiction (ABA_FSVARSTAT *fsVarStat) const
 We say there is a contradiction between two status if they are fixed/set to different bounds or values. However, two statuses are not contradiction if one of them is ``fixed'' and the other one is ``set'', if this fixing/setting refers to the same bound or value.
bool contradiction (STATUS status, double value=0) const

Private Attributes

ABA_GLOBALglob_
STATUS status_
double value_

Friends

ostream & operator<< (ostream &out, const ABA_FSVARSTAT &rhs)
 The output operator writes the status and, if the status is Fixed or Set, also its value on an output stream.

Detailed Description

status of fixed and set variables.

Definition at line 49 of file fsvarstat.h.


Member Enumeration Documentation

enum ABA_FSVARSTAT::STATUS

The enumeration defining the different statuses of variables from the point of view of fixing and setting:.

Parameters:
Free The variable is neither fixed nor set.
SetToLowerBound The variable is set to its lower bound.
Set The variable is set to a value which can be accessed with the member function |value()|.
SetToUpperbound The variable is set to its upper bound.
FixedToLowerBound The variable is fixed to its lower bound.
Fixed The variable is fixed to a value which can be accessed with the member function |value()|.
FixedToUpperBound The variable is fixed to its upper bound.
Enumerator:
Free 
SetToLowerBound 
Set 
SetToUpperBound 
FixedToLowerBound 
Fixed 
FixedToUpperBound 

Definition at line 65 of file fsvarstat.h.


Constructor & Destructor Documentation

ABA_FSVARSTAT::ABA_FSVARSTAT ( ABA_GLOBAL glob  )  [inline]

This constructor initializes the status as Free.

Parameters:
glob A pointer to a global object.

Definition at line 227 of file fsvarstat.h.

ABA_FSVARSTAT::ABA_FSVARSTAT ( ABA_GLOBAL glob,
STATUS  status 
)

This constructor initializes the status explicitely.

Parameters:
glob A pointer to a global object.
status The initial status that must neither be Fixed nor Set. For these two statuses the next constructor has to be used.

ABA_FSVARSTAT::ABA_FSVARSTAT ( ABA_GLOBAL glob,
STATUS  status,
double  value 
)

This constructor initializes the status explicitely to Fixed or Set.

Parameters:
glob A pointer to a global object.
status The initial status that must be Fixed or Set.
value The value associated with the status Fixed or Set.

ABA_FSVARSTAT::ABA_FSVARSTAT ( ABA_FSVARSTAT fsVarStat  ) 

This constructor makes a copy.

Parameters:
fsVarStat The status is initialized with a copy of *fsVarStat.


Member Function Documentation

ABA_FSVARSTAT::STATUS ABA_FSVARSTAT::status (  )  const [inline]

Returns:
The status of fixing or setting.

Definition at line 233 of file fsvarstat.h.

void ABA_FSVARSTAT::status ( STATUS  stat  )  [inline]

This version of the function status() assigns a new status.

For specifying also a value in case of the statuses Fixed or Set the next version of this function can be use.

Parameters:
stat The new status.

Definition at line 238 of file fsvarstat.h.

void ABA_FSVARSTAT::status ( STATUS  stat,
double  val 
) [inline]

This version of the function status() can assign a new status also for the statuses Fixed and Set.

Parameters:
stat The new status.
val A value associated with the new status.

Definition at line 243 of file fsvarstat.h.

void ABA_FSVARSTAT::status ( const ABA_FSVARSTAT stat  )  [inline]

A version of status() for assigning the status of an other object of the class ABA_FSVARSTAT.

Parameters:
stat A pointer to the object that status and value is copied.

Definition at line 249 of file fsvarstat.h.

double ABA_FSVARSTAT::value (  )  const [inline]

Returns:
The value of fixing or setting if the variable has status Fixed or Set.

Definition at line 255 of file fsvarstat.h.

void ABA_FSVARSTAT::value ( double  val  )  [inline]

This version of value() assigns a new value of fixing or setting.

Parameters:
val The new value.

Definition at line 260 of file fsvarstat.h.

bool ABA_FSVARSTAT::fixed (  )  const

Returns:
true If the status is FixedToLowerBound, Fixed, or FixedToUpperBound,

false otherwise.

bool ABA_FSVARSTAT::set (  )  const

Returns:
true If the status is SetToLowerBound, Set, or SetToUpperBound,

false otherwise.

bool ABA_FSVARSTAT::fixedOrSet (  )  const [inline]

Returns:
false If the status is Free,

true otherwise.

Definition at line 265 of file fsvarstat.h.

bool ABA_FSVARSTAT::contradiction ( ABA_FSVARSTAT fsVarStat  )  const

We say there is a contradiction between two status if they are fixed/set to different bounds or values. However, two statuses are not contradiction if one of them is ``fixed'' and the other one is ``set'', if this fixing/setting refers to the same bound or value.

Returns:
true If there is a contradiction between the status of this object and fsVarStat,

false otherwise.

Parameters:
fsVarStat A pointer to the status with which contradiction is is tested.

bool ABA_FSVARSTAT::contradiction ( STATUS  status,
double  value = 0 
) const

Another version of the function contradiction().

Returns:
true If there is a contradiction between the status of this object and (status, value),

false otherwise.

Parameters:
status The status with which contradiction is checked.
value The value with which contradiction is checked. The default value of value is 0.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const ABA_FSVARSTAT rhs 
) [friend]

The output operator writes the status and, if the status is Fixed or Set, also its value on an output stream.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The variable status being output.


Member Data Documentation

ABA_GLOBAL* ABA_FSVARSTAT::glob_ [private]

A pointer to the corresponding global object.

Definition at line 213 of file fsvarstat.h.

STATUS ABA_FSVARSTAT::status_ [private]

The status of the variable.

Definition at line 217 of file fsvarstat.h.

double ABA_FSVARSTAT::value_ [private]

The value the variable is fixed/set to.

This member is only used for the statuses Fixed and Set.

Definition at line 223 of file fsvarstat.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:57 2007 for ABACUS by  doxygen 1.5.1