Main Page | Namespace List | Class Hierarchy | Alphabetical List | 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:

[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 56 of file APPSPACK_Cache_Point.hpp.

## Public Member Functions
| Point ()
| Empty constructor.
| Point (const Vector &x_in)
| Constructor.
| Point (const Vector &x_in, const Value &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 Value & | getF ()
| 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
Vector * | xPtr
| pointer to data if this data is actually owned by the cached point
const Vector & | x
| Reference to the data, either internally or externally owned.
Value | f
| The function value.

## 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(), and APPSPACK::Vector.

APPSPACK::Cache::Point::Point | ( | const Vector & | x_in,
|  | const Value & | 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(), and APPSPACK::Vector.

APPSPACK::Cache::Point::Point | ( | const Point & | source | ) |

| Copy constructor. Note: Deep copy. Definition at line 66 of file APPSPACK_Cache_Point.cpp. References checkSize(), and APPSPACK::Vector.

APPSPACK::Cache::Point::~Point | ( |  | ) |

| Destructor. Definition at line 74 of file APPSPACK_Cache_Point.cpp. References xPtr.

## 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::Value & APPSPACK::Cache::Point::getF | ( |  | ) |

| Extract data. Definition at line 84 of file APPSPACK_Cache_Point.cpp. References f. 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 Here denotes the i-th entry of scaling and represents the tolerance. Otherwise, returns false. Definition at line 89 of file APPSPACK_Cache_Point.cpp. References checkSize(), scaling, tolerance, 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, tolerance, 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 Here denotes the i-th entry of scaling and represents the tolerance. Otherwise, returns false. Definition at line 146 of file APPSPACK_Cache_Point.cpp. References checkSize(), scaling, tolerance, 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, and APPSPACK::Vector.

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, 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 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 operator!=(), operator<(), operator>(), and setStaticTolerance().

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

| pointer to data if this data is actually owned by the cached point Definition at line 158 of file APPSPACK_Cache_Point.hpp. Referenced by ~Point().

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

| Reference to the data, either internally or externally owned. Definition at line 161 of file APPSPACK_Cache_Point.hpp. Referenced by checkSize(), operator!=(), operator<(), and operator>().

Value APPSPACK::Cache::Point::f`[private]`

| The function value. Definition at line 164 of file APPSPACK_Cache_Point.hpp. Referenced by copyData(), and getF().

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

- APPSPACK_Cache_Point.hpp
- APPSPACK_Cache_Point.cpp

© Sandia Corporation | Site Contact | Privacy and Security

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