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

# APPSPACK::Constraints::Bounds Class Reference

`#include <APPSPACK_Constraints_Bounds.hpp>`

Inheritance diagram for APPSPACK::Constraints::Bounds:

[legend]
Collaboration diagram for APPSPACK::Constraints::Bounds:

[legend]
List of all members.

## Detailed Description

Constraint class that implements simple bounds.

Definition at line 51 of file APPSPACK_Constraints_Bounds.hpp.

## Public Member Functions
| Bounds (Parameter::List &params)
virtual | ~Bounds ()
virtual const Vector & | getScaling () const
| Return the scaling vector.
virtual const Vector & | getLower () const
| Return vector of lower bounds.
virtual const Vector & | getUpper () const
| Return vector of upper bounds.
virtual const vector< bool > & | getIsLower () const
| Return boolean vector where each vector is true if the corresponding lower bound is defined.
virtual const vector< bool > & | getIsUpper () const
| Return boolean vector where each vector is true if the corresponding upper bound is defined.
virtual void | print () const
| Prints the bounds and scaling.
## Static Public Member Functions
Vector | setup (Parameter::List &params)
| Used by constructor to fill the parameter list with appropriate defaults and return the scaling.
vector< bool > | convertToBool (const Vector &v)
| Convert a double vector to boolean.
void | error (const string &fname, const string &msg)
| Print an error message and throw an exception.
Check Vector Lengths
Check the length of the vector, and throw an exception if there's an error Checks that the vector described by the given name is of length n. Throws an error if this is not the case.
void | checkVector (const string &name, const Vector &v, int n)
void | checkVector (const string &name, const vector< bool > &v, int n)
## Private Member Functions
void | errorCheck () const
| Error checks on input.
## Private Attributes
const Vector | scaling
| Scaling.
const Vector | lower
| Lower bounds.
const Vector | upper
| Upper bounds.
const vector< bool > | isLower
| Boolean vector indicating whether or not each lower bound exists.
const vector< bool > | isUpper
| Boolean vector indicating whether or not each upper bound exists.

## Constructor & Destructor Documentation

APPSPACK::Constraints::Bounds::Bounds | ( | Parameter::List & | params | ) |

| Constructor. See Bounds Parameters for details of what params should contain. Definition at line 207 of file APPSPACK_Constraints_Bounds.cpp. References errorCheck().

virtual APPSPACK::Constraints::Bounds::~Bounds | ( |  | ) | `[inline, virtual]`

| Destructor Definition at line 61 of file APPSPACK_Constraints_Bounds.hpp.

## Member Function Documentation

const APPSPACK::Vector & APPSPACK::Constraints::Bounds::getScaling | ( |  | ) | const`[virtual]`

| Return the scaling vector. The scaling vector is typically defined as where represents the i-th entry of the scaling vector, represents the i-th upper bound, and represents the i-th lower bound. Implements APPSPACK::Constraints::Interface. Definition at line 249 of file APPSPACK_Constraints_Bounds.cpp. References scaling, and APPSPACK::Vector.

const APPSPACK::Vector & APPSPACK::Constraints::Bounds::getLower | ( |  | ) | const`[virtual]`

| Return vector of lower bounds. Implements APPSPACK::Constraints::Interface. Definition at line 254 of file APPSPACK_Constraints_Bounds.cpp. References lower, and APPSPACK::Vector.

const APPSPACK::Vector & APPSPACK::Constraints::Bounds::getUpper | ( |  | ) | const`[virtual]`

| Return vector of upper bounds. Implements APPSPACK::Constraints::Interface. Definition at line 259 of file APPSPACK_Constraints_Bounds.cpp. References upper, and APPSPACK::Vector.

const vector< bool > & APPSPACK::Constraints::Bounds::getIsLower | ( |  | ) | const`[virtual]`

| Return boolean vector where each vector is true if the corresponding lower bound is defined. Implements APPSPACK::Constraints::Interface. Definition at line 264 of file APPSPACK_Constraints_Bounds.cpp. References isLower.

const vector< bool > & APPSPACK::Constraints::Bounds::getIsUpper | ( |  | ) | const`[virtual]`

| Return boolean vector where each vector is true if the corresponding upper bound is defined. Implements APPSPACK::Constraints::Interface. Definition at line 269 of file APPSPACK_Constraints_Bounds.cpp. References isUpper.

void APPSPACK::Constraints::Bounds::print | ( |  | ) | const`[virtual]`

| Prints the bounds and scaling. Reimplemented from APPSPACK::Constraints::Interface. Definition at line 274 of file APPSPACK_Constraints_Bounds.cpp. References APPSPACK::Print::formatDouble(), isLower, isUpper, lower, scaling, and upper.

APPSPACK::Vector APPSPACK::Constraints::Bounds::setup | ( | Parameter::List & | params | ) | `[static]`

| Used by constructor to fill the parameter list with appropriate defaults and return the scaling. Definition at line 48 of file APPSPACK_Constraints_Bounds.cpp. References error(), APPSPACK::Parameter::List::getParameter(), APPSPACK::Parameter::List::getVectorParameter(), APPSPACK::Parameter::List::isParameterVector(), and APPSPACK::Vector.

vector< bool > APPSPACK::Constraints::Bounds::convertToBool | ( | const Vector & | v | ) | `[static]`

| Convert a double vector to boolean. The Parameter::List supports a generic double vector. We convert that to boolean. Any nonzero is true, and any zero is false. Definition at line 176 of file APPSPACK_Constraints_Bounds.cpp. References APPSPACK::Vector.

void APPSPACK::Constraints::Bounds::error | ( | const string & | fname,
|  | const string & | msg
| ) | `[static]`

| Print an error message and throw an exception. Definition at line 41 of file APPSPACK_Constraints_Bounds.cpp. Referenced by setup().

void APPSPACK::Constraints::Bounds::errorCheck | ( |  | ) | const`[private]`

| Error checks on input. Definition at line 217 of file APPSPACK_Constraints_Bounds.cpp. References isLower, isUpper, lower, scaling, and upper. Referenced by Bounds().

## Member Data Documentation

const Vector APPSPACK::Constraints::Bounds::scaling`[private]`

| Scaling. Definition at line 116 of file APPSPACK_Constraints_Bounds.hpp. Referenced by errorCheck(), getScaling(), and print().

const Vector APPSPACK::Constraints::Bounds::lower`[private]`

| Lower bounds. Definition at line 119 of file APPSPACK_Constraints_Bounds.hpp. Referenced by errorCheck(), getLower(), and print().

const Vector APPSPACK::Constraints::Bounds::upper`[private]`

| Upper bounds. Definition at line 122 of file APPSPACK_Constraints_Bounds.hpp. Referenced by errorCheck(), getUpper(), and print().

const vector<bool> APPSPACK::Constraints::Bounds::isLower`[private]`

| Boolean vector indicating whether or not each lower bound exists. Definition at line 125 of file APPSPACK_Constraints_Bounds.hpp. Referenced by errorCheck(), getIsLower(), and print().

const vector<bool> APPSPACK::Constraints::Bounds::isUpper`[private]`

| Boolean vector indicating whether or not each upper bound exists. Definition at line 128 of file APPSPACK_Constraints_Bounds.hpp. Referenced by errorCheck(), getIsUpper(), and print().

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

- APPSPACK_Constraints_Bounds.hpp
- APPSPACK_Constraints_Bounds.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