Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

IotrVector Class Reference
[VectorAnalysis]

A class which supports vector operations and storage. More...

#include <IotrVector.hh>

Inheritance diagram for IotrVector:

IotrRefCount SimpleVector List of all members.

Public Methods

virtual void copyInto (SimpleVector &v) const=0
 Copy the element of this into the SimpleVector v; for debugging and testing purposes only.

virtual IotrVector * copy () const=0
 make a copy of this vector, including the data

virtual IotrVector * newSibling () const=0
 create a new vector from the same space as this one

int length () const
 The total length of this vector.

virtual void writefToStream (std::ostream &out, const char format[]) const=0
 Write the components of this OOQP_Vector to a stream, subject to a format.

virtual void setToConstant (double c)=0
 Set all elements to the constant value c.

virtual void setToZero ()=0
 Set all elements of this IotrVector to zero.

virtual void addConstant (double c)=0
 Add a constant value to all elements of this vector.

virtual void scale (double alpha)=0
 this = alpha * this

virtual void axpy (double alpha, const IotrVector &x)=0
 this += alpha * x

virtual void diagonalMult (double alpha, const IotrVector &x, double beta, IotrVector &y) const=0
 y = beta * y + alpha * this * x.

virtual void diagonalDiv (double alpha, const IotrVector &x, double beta, IotrVector &y) const=0
 y = beta * y + alpha * x / this if beta == 0 then y need not be initialized

virtual void diagonalDiv (double alpha, double beta, IotrVector &y) const=0
 y = beta * y + alpha / this if beta == 0 then y need not be initialized

virtual double twonorm () const=0
 Return the Euclidean norm of the elements.

virtual double infnorm (double addnlElt=0.0) const=0
 Return the Inf norm of the elements.

virtual double stepbound (const IotrVector &s, double bound) const=0
 Return the greatest number alpha in [0, maxstep] for which this[i] + alpha * s[i] >= 0 for all i, provided all elements of this are initially >= 0.

virtual double stepbound (const IotrVector &s, const IotrVector &xlow, ElementGather &ixlow, const IotrVector &xupp, ElementGather &ixupp, double bound) const=0
 Return the greatest number alpha in [0, maxstep] for which ixlow * ( this + alpha * s ) - xlow >= 0 and xupp - ixupp * ( this + alpha * s ) >= 0 Provided that these two inequalities hold for alpha = 0.

virtual void makeInterior (const IotrVector &xlow, ElementGather &ixlow, const IotrVector &xupp, ElementGather &ixupp, double rtol, double atol)=0
 Make all elements of this interior to the bounds, leaving those already "sufficiently" interior untouched.

virtual void negate ()=0
 this := -this

virtual IotrVector & operator *= (const IotrVector &v)=0
 multiply the components of this by the components of v

virtual double dot (const IotrVector &x) const=0
 the dot product of this with x

virtual double scaledDot (const IotrVector &D, const IotrVector &x) const=0
 the product this' * D * x

virtual void invertNonzero ()=0
 this[i] = 1/this[i] unless this[i] == 0

virtual void inspect (const char *name=0, const char *filename=0) const=0
 Display the elements of the vector for debugging purposes.

virtual void inspectAsMatlab (const char *name=0, const char *filename=0) const=0
 Display the elements of the vector, for debugging purposes, in a syntax understood by matlab.

virtual double min () const=0
 The minimum value in the vector.

virtual double min (const double addnElt) const=0
 The minimum value in the vector with addnElt adjoined.

virtual int allPositive () const=0
 true if all elements of this vector are positive

virtual void squareRoot ()=0
 replace all elements by their square root

virtual void categorize (ElementGather *cat[], int ncat, IotrVector *rhs[], int nrhs, const IotrVectorCategorize &func) const=0
 Categorize the element of this vector, possibly in relation to the elements of one or more other vectors.

virtual void copyFrom (const SimpleVector &v)=0
 Copy the elements of v.


Protected Methods

 IotrVector (int length)
 Constructor: IotrVector cannot be instantiated, subclasses need to call this constructor to set the length of the vector.


Detailed Description

A class which supports vector operations and storage.


Member Function Documentation

virtual void IotrVector::categorize ElementGather   cat[],
int    ncat,
IotrVector *    rhs[],
int    nrhs,
const IotrVectorCategorize   func
const [pure virtual]
 

Categorize the element of this vector, possibly in relation to the elements of one or more other vectors.

Parameters:
cat  [output] new instances of ElementGather representing the categories.
ncat  the number of categories expected
rhs  additional vectors that may be used be the categorization rule
nrhs  the number of vectors in rhs
func  a C++ "function object" giving the categorization rule.
See also:
IotrVectorCategorize

Implemented in SimpleVector.

virtual void IotrVector::diagonalMult double    alpha,
const IotrVector &    x,
double    beta,
IotrVector &    y
const [pure virtual]
 

y = beta * y + alpha * this * x.

if beta == 0 then y need not be initialized

Implemented in SimpleVector.

virtual double IotrVector::infnorm double    addnlElt = 0.0 const [pure virtual]
 

Return the Inf norm of the elements.

Parameters:
addnlElt  an optional parameter giving an additional element\ & to adjoin to the vector before taking the infnorm

Implemented in SimpleVector.

virtual void IotrVector::inspect const char *    name = 0,
const char *    filename = 0
const [pure virtual]
 

Display the elements of the vector for debugging purposes.

Parameters:
name  the string that will be used as the name of the vector in the display. If nil, the name will be "v"
filename  the name of the file to which the display will be written. If nil, the output will be sent to stdout

Implemented in SimpleVector.

virtual void IotrVector::inspectAsMatlab const char *    name = 0,
const char *    filename = 0
const [pure virtual]
 

Display the elements of the vector, for debugging purposes, in a syntax understood by matlab.

Parameters:
name  the string that will be used as the name of the vector in the display. If nil, the name will be "v"
filename  the name of the file to which the display will be written. If nil, the output will be sent to stdout

Implemented in SimpleVector.

virtual void IotrVector::makeInterior const IotrVector &    xlow,
ElementGather   ixlow,
const IotrVector &    xupp,
ElementGather   ixupp,
double    rtol,
double    atol
[pure virtual]
 

Make all elements of this interior to the bounds, leaving those already "sufficiently" interior untouched.

An element of this with only a lower bound is sufficiently interior if this[i] > b + atol. Otherwise it is set to b + atol. Treatment of elements with only upper bounds is similar.

If an element has both upper and lower bounds, it is considered to be sufficiently interior if b + tol <= this[i] <= u - tol where tol = min[ atol, rtol * (u - b) ] If it is not sufficiently interior, we make the smallest change that will make the element sufficiently interior.

Implemented in SimpleVector.

virtual double IotrVector::min const double    addnElt const [pure virtual]
 

The minimum value in the vector with addnElt adjoined.

In matlab notation min([addnElt; this])

Implemented in SimpleVector.

virtual double IotrVector::min   [pure virtual]
 

The minimum value in the vector.

Will return infinity (or DBL_MAX) if the vector is empty

Implemented in SimpleVector.

virtual double IotrVector::stepbound const IotrVector &    s,
const IotrVector &    xlow,
ElementGather   ixlow,
const IotrVector &    xupp,
ElementGather   ixupp,
double    bound
const [pure virtual]
 

Return the greatest number alpha in [0, maxstep] for which ixlow * ( this + alpha * s ) - xlow >= 0 and xupp - ixupp * ( this + alpha * s ) >= 0 Provided that these two inequalities hold for alpha = 0.

Otherwise, the behavior is undefined.

Implemented in SimpleVector.

virtual double IotrVector::stepbound const IotrVector &    s,
double    bound
const [pure virtual]
 

Return the greatest number alpha in [0, maxstep] for which this[i] + alpha * s[i] >= 0 for all i, provided all elements of this are initially >= 0.

If any element of this is negative, the behavior is undefined.

Implemented in SimpleVector.

virtual void IotrVector::writefToStream std::ostream &    out,
const char    format[]
const [pure virtual]
 

Write the components of this OOQP_Vector to a stream, subject to a format.

Parameters:
out  a C++-style output stream
format  a string used to format the output. The substring %{index} will be substituted by the index of the current element and the string %{value} will be substituted with the element's value.

Implemented in SimpleVector.


The documentation for this class was generated from the following file:
Generated on Wed Aug 27 10:03:42 2003 for iotr by doxygen1.2.18