Sandia Home Sandia Home
Main Page | Publications | Downloads | Configuration | Running the Code | Solver Parameters | FAQ | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

APPSPACK::Cache::Point Class Reference

#include <APPSPACK_Cache_Point.hpp>

Collaboration diagram for APPSPACK::Cache::Point:

Collaboration graph
[legend]
List of all members.

Detailed Description

Store a cached point. Allow comparisons between points for storage in a splay tree. See Cache::Manager.

Author:
H. Alton Patrick, Summer 2000

Definition at line 55 of file APPSPACK_Cache_Point.hpp.

Public Member Functions

 Point ()
 Empty constructor.
 Point (const Vector &x_in)
 Constructor.
 Point (const Vector &x_in, const Vector &f_in)
 Constructor.
 Point (const Point &source)
 Copy constructor.
 ~Point ()
 Destructor.
void copyData (const Point &source)
 Copy the relevant data from another cached point.
const VectorgetF ()
 Extract data.
bool operator> (const Point &pt) const
 Compare two Points, based on a lexicographic ordering of their coordinates.
bool operator< (const Point &pt) const
 Reverse of operator>.
bool operator!= (const Point &pt) const
 Compare two Points for non-equality within the given tolerance.

Static Public Member Functions

void setStaticScaling (const Vector &scaling_in)
 Set the static Point::scaling vector.
void setStaticTolerance (double tolerance_in)
 Set the static Point::tol value.

Static Public Attributes

Vector scaling
 scaling of variables
double tolerance = 0
 comparison tolerance

Private Member Functions

void checkSize () const
 Check that the size of this point matches that of the scaling.
void checkSize (const Point &pt) const
 Check that the size of this point matches that of the given point.

Private Attributes

VectorxPtr
 pointer to data if this data is actually owned by the cached point
const Vectorx
 Reference to the data, either internally or externally owned.
Vector f
 Vector of function values.


Constructor & Destructor Documentation

APPSPACK::Cache::Point::Point  ) 
 

Empty constructor.

Definition at line 43 of file APPSPACK_Cache_Point.cpp.

APPSPACK::Cache::Point::Point const Vector x_in  ) 
 

Constructor.

Note:
Saves a reference to x_in, but DOES NOT COPY IT. In other words, this is only a shallow copy, not a deep copy. We are exploiting the way that the splay tree is implemented in order to minimize copy of vectors. We know that any Point that is created by this constructor will later be copied into a new Point (and then we will actually do a deep copy).

Definition at line 50 of file APPSPACK_Cache_Point.cpp.

References checkSize().

APPSPACK::Cache::Point::Point const Vector x_in,
const Vector f_in
 

Constructor.

Note:
Saves a reference to x_in, but DOES NOT COPY IT. In other words, this is only a shallow copy, not a deep copy. We are exploiting the way that the splay tree is implemented in order to minimize copy of vectors. We know that any Point that is created by this constructor will later be copied into a new Point (and then we will actually do a deep copy).

Definition at line 58 of file APPSPACK_Cache_Point.cpp.

References checkSize().

APPSPACK::Cache::Point::Point const Point source  ) 
 

Copy constructor.

Note:
Deep copy.

Definition at line 66 of file APPSPACK_Cache_Point.cpp.

References checkSize().

APPSPACK::Cache::Point::~Point  ) 
 

Destructor.

Definition at line 74 of file APPSPACK_Cache_Point.cpp.


Member Function Documentation

void APPSPACK::Cache::Point::copyData const Point source  ) 
 

Copy the relevant data from another cached point.

Definition at line 79 of file APPSPACK_Cache_Point.cpp.

References f.

const APPSPACK::Vector & APPSPACK::Cache::Point::getF  ) 
 

Extract data.

Definition at line 84 of file APPSPACK_Cache_Point.cpp.

Referenced by APPSPACK::Cache::Manager::isCached().

bool APPSPACK::Cache::Point::operator> const Point pt  )  const
 

Compare two Points, based on a lexicographic ordering of their coordinates.

Let x denote the vector corresponding to this object and y denote the vector corresponding to the incoming Point. Then this operator returns true if

\[ \frac{x_i - y_i}{s_i} > \tau \mbox{ for all } i =1,dots,n \]

Here $s_i$ denotes the i-th entry of scaling and $\tau$ represents the tolerance.

Otherwise, returns false.

Definition at line 89 of file APPSPACK_Cache_Point.cpp.

References checkSize(), scaling, APPSPACK::Vector::size(), and x.

bool APPSPACK::Cache::Point::operator< const Point pt  )  const
 

Reverse of operator>.

Definition at line 119 of file APPSPACK_Cache_Point.cpp.

References checkSize(), scaling, APPSPACK::Vector::size(), and x.

bool APPSPACK::Cache::Point::operator!= const Point pt  )  const
 

Compare two Points for non-equality within the given tolerance.

Let x denote the vector corresponding to this object and y denote the vector corresponding to the incoming Point. Then this operator returns true if

\[ \frac{1}{s_i}\left|{x_i} - {y_i}\right| > \tau \mbox{ for any } i = 1,\dots,n \]

Here $s_i$ denotes the i-th entry of scaling and $\tau$ represents the tolerance.

Otherwise, returns false.

Definition at line 146 of file APPSPACK_Cache_Point.cpp.

References checkSize(), scaling, APPSPACK::Vector::size(), and x.

void APPSPACK::Cache::Point::setStaticScaling const Vector scaling_in  )  [static]
 

Set the static Point::scaling vector.

Definition at line 165 of file APPSPACK_Cache_Point.cpp.

References scaling.

void APPSPACK::Cache::Point::setStaticTolerance double  tolerance_in  )  [static]
 

Set the static Point::tol value.

Definition at line 170 of file APPSPACK_Cache_Point.cpp.

References tolerance.

void APPSPACK::Cache::Point::checkSize  )  const [private]
 

Check that the size of this point matches that of the scaling.

Definition at line 177 of file APPSPACK_Cache_Point.cpp.

References scaling, APPSPACK::Vector::size(), and x.

Referenced by operator!=(), operator<(), operator>(), and Point().

void APPSPACK::Cache::Point::checkSize const Point pt  )  const [private]
 

Check that the size of this point matches that of the given point.

Definition at line 187 of file APPSPACK_Cache_Point.cpp.

References APPSPACK::Vector::size(), and x.


Member Data Documentation

APPSPACK::Vector APPSPACK::Cache::Point::scaling [static]
 

scaling of variables

Referenced by checkSize(), operator!=(), operator<(), operator>(), and setStaticScaling().

double APPSPACK::Cache::Point::tolerance = 0 [static]
 

comparison tolerance

Definition at line 41 of file APPSPACK_Cache_Point.cpp.

Referenced by setStaticTolerance().

Vector* APPSPACK::Cache::Point::xPtr [private]
 

pointer to data if this data is actually owned by the cached point

Definition at line 157 of file APPSPACK_Cache_Point.hpp.

const Vector& APPSPACK::Cache::Point::x [private]
 

Reference to the data, either internally or externally owned.

Definition at line 160 of file APPSPACK_Cache_Point.hpp.

Referenced by checkSize(), operator!=(), operator<(), and operator>().

Vector APPSPACK::Cache::Point::f [private]
 

Vector of function values.

Definition at line 163 of file APPSPACK_Cache_Point.hpp.

Referenced by copyData().


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

 

© Sandia Corporation | Site Contact | Privacy and Security

Generated on Fri Feb 16 10:33:36 2007 for APPSPACK 5.0.1 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2002