#include <IotrVector.hh>
Inheritance diagram for IotrVector:
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. |
|
Categorize the element of this vector, possibly in relation to the elements of one or more other vectors.
Implemented in SimpleVector. |
|
y = beta * y + alpha * this * x. if beta == 0 then y need not be initialized Implemented in SimpleVector. |
|
Return the Inf norm of the elements.
Implemented in SimpleVector. |
|
Display the elements of the vector for debugging purposes.
Implemented in SimpleVector. |
|
Display the elements of the vector, for debugging purposes, in a syntax understood by matlab.
Implemented in SimpleVector. |
|
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. |
|
The minimum value in the vector with addnElt adjoined. In matlab notation min([addnElt; this]) Implemented in SimpleVector. |
|
The minimum value in the vector. Will return infinity (or DBL_MAX) if the vector is empty Implemented in SimpleVector. |
|
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. |
|
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. |
|
Write the components of this OOQP_Vector to a stream, subject to a format.
Implemented in SimpleVector. |