Sandia Home Sandia Home
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

APPSPACK::Value Class Reference

#include <APPSPACK_Value.hpp>

List of all members.


Detailed Description

Stores and Manipulates a (function) value in the range $(-\infty,+\infty]$.

Stores a function value, v, which may be infinite (or unknown).

Two function values $a$ and $b$ are compared as follows:

\[ \begin{array}{ll} a < b & \mbox{ if $a$ and $b$ are finite and $a < b$, or $a$ is finite and $b = +\infty$}.\\ a > b & \mbox{ if $a$ and $b$ are finite and $a > b$, or $a = +\infty$ and $b$ is finite}.\\ a = b & \mbox{ if $a$ and $b$ are finite and $a = b$, or $a = +\infty$ and $b = +\infty$}. \end{array} \]

Definition at line 58 of file APPSPACK_Value.hpp.

Public Member Functions

ostream & leftshift (ostream &stream) const
 Print object to the given stream.
Constructors
 Value ()
 Value (bool isValue_in, double value_in)
 Value (double value_in)
 Value (const Value &source)
Destructor
 ~Value ()
Accessors
bool getIsValue () const
double getValue () const
Manipulators
void operator= (const Value &source)
void operator= (double source)
void setValueTo (bool isValue_in, double value_in)
void setValueTo (double value_in)
void setValueToUnknown ()
Comparisons
bool operator< (const Value &w) const
bool operator> (const Value &w) const
bool operator== (const Value &w) const
bool isSufficientDecrease (const Value &w, double rho) const

Private Attributes

bool isValue
 If true, there is a finite function value. Otherwise the function value is $+\infty$.
double value
 The function value (only has meaning if isValue is true).


Constructor & Destructor Documentation

APPSPACK::Value::Value  ) 
 

Sets v = $+\infty$. Definition at line 40 of file APPSPACK_Value.cpp.

APPSPACK::Value::Value bool  isValue_in,
double  value_in
 

Parameters:
isValue_in - True if a finite value exists. False otherwise.
value_in - The function value (only has meaning if isKnown is true)
Definition at line 46 of file APPSPACK_Value.cpp.

APPSPACK::Value::Value double  value_in  ) 
 

Parameters:
value_in - The finite function value
(Also sets isValue to true.) Definition at line 52 of file APPSPACK_Value.cpp.

APPSPACK::Value::Value const Value source  ) 
 

Copy constructor Definition at line 58 of file APPSPACK_Value.cpp.

APPSPACK::Value::~Value  ) 
 

Destructor Definition at line 64 of file APPSPACK_Value.cpp.


Member Function Documentation

void APPSPACK::Value::operator= const Value source  ) 
 

Copy operator Definition at line 79 of file APPSPACK_Value.cpp.

References isValue, and value.

void APPSPACK::Value::operator= double  source  ) 
 

Copy from double Definition at line 85 of file APPSPACK_Value.cpp.

References isValue, and value.

void APPSPACK::Value::setValueTo bool  isValue_in,
double  value_in
 

See Value(bool isValue_in, double value_in) Definition at line 91 of file APPSPACK_Value.cpp.

References isValue, and value.

Referenced by APPSPACK::Conveyor::exchange(), APPSPACK::Cache::Manager::processInputLine(), APPSPACK::processTextInputFileLine(), and APPSPACK::Parameter::Entry::unpack().

void APPSPACK::Value::setValueTo double  value_in  ) 
 

See Value(double value_in) Definition at line 97 of file APPSPACK_Value.cpp.

References isValue, and value.

void APPSPACK::Value::setValueToUnknown  ) 
 

Reset to $+\infty$. Definition at line 103 of file APPSPACK_Value.cpp.

References isValue, and value.

bool APPSPACK::Value::operator< const Value w  )  const
 

Return true if v < w; false otherwise. Definition at line 109 of file APPSPACK_Value.cpp.

References isValue, and value.

bool APPSPACK::Value::operator> const Value w  )  const
 

Return true if v > w; false otherwise. Definition at line 123 of file APPSPACK_Value.cpp.

References isValue, and value.

bool APPSPACK::Value::operator== const Value w  )  const
 

Return true if v = w; false otherwise. Definition at line 137 of file APPSPACK_Value.cpp.

References isValue, and value.

bool APPSPACK::Value::isSufficientDecrease const Value w,
double  rho
const
 

Return true if v < (w - rho); false otherwise. Definition at line 153 of file APPSPACK_Value.cpp.

Referenced by APPSPACK::Point::isSufficientDecrease().

ostream & APPSPACK::Value::leftshift ostream &  stream  )  const
 

Print object to the given stream.

Definition at line 168 of file APPSPACK_Value.cpp.

References isValue, and value.

Referenced by operator<<().


Member Data Documentation

bool APPSPACK::Value::isValue [private]
 

If true, there is a finite function value. Otherwise the function value is $+\infty$.

Definition at line 142 of file APPSPACK_Value.hpp.

Referenced by leftshift(), operator<(), operator=(), operator==(), operator>(), setValueTo(), and setValueToUnknown().

double APPSPACK::Value::value [private]
 

The function value (only has meaning if isValue is true).

Definition at line 145 of file APPSPACK_Value.hpp.

Referenced by leftshift(), operator<(), operator=(), operator==(), operator>(), setValueTo(), and setValueToUnknown().


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

 

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Wed Dec 14 18:41:05 2005 for APPSPACK 4.0.2 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2002