#include <IntBLAS.h>
Inheritance diagram for intblas::IntervalVector:

Public Member Functions | |
| IntervalVector (unsigned int dimension, bool is_ir=false) | |
| This constructor creates a vector with the given dimension. | |
| IntervalVector (const IntervalVector &v) | |
| IntervalVector (double *l, double *u, int len) | |
| This constructs a vector from two vectors of type double, creating intervals of l and u. | |
| IntervalVector (int *l, int *u, int len) | |
| This constructs a vector from two vectors of type double, creating intervals of l and u. | |
| ~IntervalVector () | |
| Standard destructor. | |
| unsigned int | getDimension () const |
| This method returns the dimension of this vector. | |
| Interval & | operator[] (int index) const |
| This operator returns the interval of the element at the given index. | |
| void | operator= (const IntervalVector &v) |
| This operator copies the value of v into this vector. | |
| Interval | getAt (unsigned int index) const |
| This method returns the value of the interval at the given index. | |
| void | setAt (const Interval &v, unsigned int index) |
| This method sets the element at index to the given value. | |
| void | swap (IntervalVector &b) |
| This method swaps this vector with another efficiently. | |
| bool | isEmpty () |
| This method tells whether the vector contains an empty element. | |
| IntervalVector & | lowerBounds () |
| This method returns a vector whose elements are point intervals containing the lower bounds of this vector. | |
| IntervalVector & | upperBounds () |
| This method returns a vector whose elements are point intervals containing the upper bounds of this vector. | |
| IntervalVector & | midpoint () |
| This method returns a vector whose elements are point intervals containing the midpoints of this vector. | |
| IntervalVector & | widths () |
| This method returns a vector whose elements are point intervals containing the widths of this vector. | |
| IntervalVector & | operator+ (IntervalVector &b) |
| This operator adds a vector to this vector. | |
| IntervalVector & | operator+ (const Interval &scalar) |
| This operator adds a vector and scalar value. | |
| IntervalVector & | operator- (IntervalVector &b) |
| This operator subtracts a vector from this vector. | |
| IntervalVector & | operator- (const Interval &scalar) |
| This operator subtracts a scalar value from this vector. | |
| IntervalVector & | operator * (IntervalVector &b) |
| This operator multiplies a vector to this vector. | |
| IntervalVector & | operator * (const Interval &scalar) |
| This operator multiplies a scalar to this vector. | |
| Interval | vectorSum () |
| The sum of all the elements of this vector. | |
| Interval | sumOfSquares () |
| The sum of all each element squared. | |
| unsigned int | max (double &result) |
| This method finds the maximum magnitude and location of this vector. | |
| unsigned int | min (double &result) |
| This method finds the minimum magnitude and location of this vector. | |
| Interval | dot (IntervalVector &b) |
| This method returns the dot product of this vector and and another. | |
| Interval | scaledDot (IntervalVector &b, const Interval &r, double alpha=1.0, double beta=0.0) |
| This method returns the dot product of this vector and and another. | |
| IntervalVector & | scaledAccumulation (IntervalVector &y, double alpha=1.0, double beta=1.0) |
| This function performs a scaled vector accumulation using this vector. | |
| IntervalVector & | scaledCancelation (IntervalVector &y, double alpha=1.0, double beta=1.0) |
| This function cancels the addition of y to the vector x. | |
| IntervalVector & | reciprocalScale (double alpha) |
| This method implements the reciprocal scale of this interval vector. | |
| double | norm (NORMTYPE p) |
| The norm of this vector. | |
| void | cancel (IntervalVector &y) |
| This method cancels the addition of y to this vector. | |
| IntervalVector & | permute (int p[]) |
| This function moves this vector's elements to the new addresses specified in p. | |
| bool | encloses (IntervalVector &y) |
| This method test if each element in this vector encloses the corresponding element in y. | |
| bool | interior (IntervalVector &y) |
| This method tests if each element in this vector contains the corresponding element in y. | |
| bool | disjoint (IntervalVector &y) |
| This method tests if each element in this vector is disjoint with the corresponding element in y. | |
| IntervalVector & | operator & (IntervalVector &y) |
| This operator returns the intersection of this vector and another. | |
| IntervalVector & | operator| (IntervalVector &y) |
| This operator returns the union of this vector and another. | |
| IntervalVector & | intervalHull (IntervalVector &y) |
| This method performs a convex interval hull on the elements of this vector and another. | |
| IntervalVector & | solveLU (IntervalMatrix &lu, int p[]) |
| This function solves a system of equations using an LU matrix. | |
Static Public Member Functions | |
| static void | lowerBounds (IntervalVector &v, IntervalVector &result) |
| This function returns a vector whose elements are point intervals containing the lower bounds of a vector. | |
| static void | upperBounds (IntervalVector &v, IntervalVector &result) |
| This function returns a vector whose elements are point intervals containing the upper bounds of a vector. | |
| static void | midpoint (IntervalVector &v, IntervalVector &result) |
| This function returns a vector whose elements are point intervals containing the midpoints of a vector. | |
| static void | widths (IntervalVector &v, IntervalVector &result) |
| This function returns a vector whose elements are point intervals containing the widths of a vector. | |
| static void | add (IntervalVector &a, IntervalVector &b, IntervalVector &result) |
| This method adds a vector to another. | |
| static void | add (IntervalVector &a, const Interval &scalar, IntervalVector &result) |
| This operator adds a vector and scalar value. | |
| static void | sub (IntervalVector &a, IntervalVector &b, IntervalVector &result, bool right) |
| This method subtracts a from b. | |
| static void | sub (IntervalVector &a, const Interval &scalar, IntervalVector &result, bool right) |
| This method subtracts a scalar value from the vector. | |
| static void | mult (IntervalVector &a, IntervalVector &b, IntervalVector &result) |
| This this multiplies a vector to another, and stores the result. | |
| static void | mult (IntervalVector &a, const Interval &scalar, IntervalVector &result) |
| This operator multiplies a scalar to a vector. | |
| static void | scaledAccumulation (IntervalVector &x, IntervalVector &y, IntervalVector &result, double alpha=1.0, double beta=1.0) |
| This function performs a scaled vector accumulation. | |
| static void | scaledCancelation (IntervalVector &x, IntervalVector &y, IntervalVector &result, double alpha=1.0, double beta=1.0) |
| This function cancels the addition of y to the vector x. | |
| static void | reciprocalScale (IntervalVector &x, double alpha, IntervalVector &result) |
| This method implements the reciprocal scale of an interval vector. | |
| static void | permute (IntervalVector &x, int p[], IntervalVector &result) |
| This function moves the elements of x to the new addresses specified in p. | |
| static void | intervalIntersection (IntervalVector &x, IntervalVector &y, IntervalVector &result) |
| This function returns the intersection of this vector and another. | |
| static void | intervalUnion (IntervalVector &x, IntervalVector &y, IntervalVector &result) |
| This function returns the union of x and y. | |
| static void | intervalHull (IntervalVector &v, IntervalVector &y, IntervalVector &result) |
| This function performs a convex interval hull on the elements of two vectors. | |
| static IntervalVector & | getResult (IntervalVector *a, IntervalVector *b) |
| This method returns an intermediary result vector. | |
| static IntervalVector & | getResult (unsigned int dim) |
| This method returns an intermediary result vector allocated off the heap and of the given dimension. | |
| static void | freeResult (IntervalVector *a, IntervalVector *b, IntervalVector &result) |
| This method cleans up intermediary result vectors. | |
| static void | freeResult (IntervalVector *a) |
| This method cleans up intermediary result vectors. | |
Protected Attributes | |
| Interval * | a |
| The array that stores the elements. | |
| unsigned int | dim |
| The dimension of the vector. | |
| unsigned int * | dim_ptr |
| This is a work around, ignore it. | |
| bool | ir |
Friends | |
| ostream & | operator<< (ostream &out, const IntervalVector &v) |
| This operator is a convenience operator for outputing vectors. | |
| istream & | operator>> (istream &in, IntervalVector &v) |
| This operator reads a vector from the stream. | |
| void | swap (IntervalVector &a, IntervalVector &b) |
| This method swaps two vectors efficiently. | |
| bool | isEmpty (IntervalVector &v) |
| This function tells whether the vector contains an empty element. | |
| IntervalVector & | lowerBounds (IntervalVector &v) |
| This function returns a vector whose elements are point intervals containing the lower bounds of a vector. | |
| IntervalVector & | upperBounds (IntervalVector &v) |
| This function returns a vector whose elements are point intervals containing the upper bounds of a vector. | |
| IntervalVector & | midpoint (IntervalVector &v) |
| This function returns a vector whose elements are point intervals containing the midpoints of a vector. | |
| IntervalVector & | widths (IntervalVector &v) |
| This function returns a vector whose elements are point intervals containing the widths of a vector. | |
| IntervalVector & | operator+ (const Interval &scalar, IntervalVector &a) |
| This operator adds a vector and scalar value. | |
| IntervalVector & | operator- (const Interval &scalar, IntervalVector &a) |
| This operator subtracts a scalar value from the vector. | |
| IntervalVector & | operator * (const Interval &scalar, IntervalVector &a) |
| This operator multiplies a scalar to a vector. | |
| Interval | dot (IntervalVector &a, IntervalVector &b) |
| This function returns the dot product of a vector and and another. | |
| Interval | scaledDot (IntervalVector &a, IntervalVector &b, const Interval &r, double alpha=1.0, double beta=0.0) |
| This function returns the dot product of a vector and and another. | |
| IntervalVector & | scaledAccumulation (IntervalVector &x, IntervalVector &y, double alpha=1.0, double beta=1.0) |
| This function performs a scaled vector accumulation. | |
| IntervalVector & | scaledCancelation (IntervalVector &x, IntervalVector &y, double alpha=1.0, double beta=1.0) |
| This function cancels the addition of y to the vector x. | |
| IntervalVector & | reciprocalScale (IntervalVector &x, double alpha) |
| This funtion implements the reciprocal scale of an interval vector. | |
| double | norm (IntervalVector &a, NORMTYPE p) |
| The norm of a vector. | |
| IntervalVector & | permute (IntervalVector &x, int p[]) |
| This function moves the elements of x to the new addresses specified in p. | |
| bool | encloses (IntervalVector &v, IntervalVector &y) |
| This function test if each element in v encloses the corresponding element in y. | |
| bool | interior (IntervalVector &v, IntervalVector &y) |
| This function tests if each element in v contains the corresponding element in y. | |
| bool | disjoint (IntervalVector &v, IntervalVector &y) |
| This function tests if each element in v is disjoint with the corresponding element in y. | |
| IntervalVector & | intervalIntersection (IntervalVector &x, IntervalVector &y) |
| This function returns the intersection of this vector and another. | |
| IntervalVector & | intervalUnion (IntervalVector &x, IntervalVector &y) |
| This function returns the union of x and y. | |
| IntervalVector & | intervalHull (IntervalVector &v, IntervalVector &y) |
| This function performs a convex interval hull on the elements of two vectors. | |
Interval vectors can be treated similarly to a one-dimensional array. They are referenced using the bracket operator, e.g. the interval vector v's second element can be referenced like this, v[2]. The vectors are zero indexed which means the first element is at v[0].
|
||||||||||||
|
This constructor creates a vector with the given dimension. All the initial elements of the vector are set to [0.0,0.0].
|
|
||||||||||||||||
|
This constructs a vector from two vectors of type double, creating intervals of l and u. For any given element in the vector l and u, the resulting element in this vector will be and interval whose bounds are l and u. The elements of l do not necessarily have to be less than u, the constructor creates proper intervals no matter what.
|
|
||||||||||||||||
|
This constructs a vector from two vectors of type double, creating intervals of l and u. For any given element in the vector l and u, the resulting element in this vector will be and interval whose bounds are l and u. The elements of l do not necessarily have to be less than u, the constructor creates proper intervals no matter what.
|
|
|
Standard destructor.
|
|
||||||||||||||||
|
This operator adds a vector and scalar value.
|
|
||||||||||||||||
|
This method adds a vector to another.
|
|
|
This method cancels the addition of y to this vector.
|
|
|
This method tests if each element in this vector is disjoint with the corresponding element in y.
|
|
|
This method returns the dot product of this vector and and another.
|
|
|
This method test if each element in this vector encloses the corresponding element in y.
|
|
|
This method cleans up intermediary result vectors. The parameter a will be deleted given its ir attribute is true. This method is used when you know the operation required a new intermediary result vector or the result was not a vector, for example interior().
|
|
||||||||||||||||
|
This method cleans up intermediary result vectors. This method will delete a and b given that they are not the same memory as result, and their ir attribute is true.
|
|
|
This method returns the value of the interval at the given index. The indexes are zero based, i.e. The first element is [0].
|
|
|
This method returns the dimension of this vector.
|
|
|
This method returns an intermediary result vector allocated off the heap and of the given dimension.
|
|
||||||||||||
|
This method returns an intermediary result vector. The vector is returned may be a, b, or a new vector. The method will attempt to recycle a and b if it is possible. This behavior may be undisirable for operations that require a and b to remain unaltered, for example multiplication. The parameters, a and b, are only recycled if their attribute ir is true.
|
|
|
This method tests if each element in this vector contains the corresponding element in y.
|
|
||||||||||||||||
|
This function performs a convex interval hull on the elements of two vectors.
|
|
|
This method performs a convex interval hull on the elements of this vector and another.
|
|
||||||||||||||||
|
This function returns the intersection of this vector and another.
|
|
||||||||||||||||
|
This function returns the union of x and y.
|
|
|
This method tells whether the vector contains an empty element.
|
|
||||||||||||
|
This function returns a vector whose elements are point intervals containing the lower bounds of a vector.
|
|
|
This method returns a vector whose elements are point intervals containing the lower bounds of this vector.
|
|
|
This method finds the maximum magnitude and location of this vector.
The maximum magnitude is found by finding the maximum value of each element using max(
|
|
||||||||||||
|
This function returns a vector whose elements are point intervals containing the midpoints of a vector.
|
|
|
This method returns a vector whose elements are point intervals containing the midpoints of this vector.
|
|
|
This method finds the minimum magnitude and location of this vector.
The minimum magnitude is found by finding the minimum value of each element using min(
|
|
||||||||||||||||
|
This operator multiplies a scalar to a vector.
|
|
||||||||||||||||
|
This this multiplies a vector to another, and stores the result.
|
|
|
The norm of this vector.
|
|
|
This operator returns the intersection of this vector and another.
|
|
|
This operator multiplies a scalar to this vector.
|
|
|
This operator multiplies a vector to this vector.
|
|
|
This operator adds a vector and scalar value.
|
|
|
This operator adds a vector to this vector.
|
|
|
This operator subtracts a scalar value from this vector.
|
|
|
This operator subtracts a vector from this vector.
|
|
|
This operator copies the value of v into this vector.
|
|
|
This operator returns the interval of the element at the given index. The indexes are zero based, i.e. The first element is [0].
|
|
|
This operator returns the union of this vector and another.
|
|
||||||||||||||||
|
This function moves the elements of x to the new addresses specified in p.
|
|
|
This function moves this vector's elements to the new addresses specified in p.
|
|
||||||||||||||||
|
This method implements the reciprocal scale of an interval vector. The reciprocalScale is defined as
|
|
|
This method implements the reciprocal scale of this interval vector. The reciprocalScale is defined as
|
|
||||||||||||||||||||||||
|
This function performs a scaled vector accumulation. This operation is defined by
|
|
||||||||||||||||
|
This function performs a scaled vector accumulation using this vector. This operation is defined by
|
|
||||||||||||||||||||||||
|
This function cancels the addition of y to the vector x. Scaled cancellation is calculated in the following way:
|
|
||||||||||||||||
|
This function cancels the addition of y to the vector x. Scaled cancellation is calculated in the following way:
|
|
||||||||||||||||||||
|
This method returns the dot product of this vector and and another. The scaled vector is found using the following formula (where x is this vector):
|
|
||||||||||||
|
This method sets the element at index to the given value.
|
|
||||||||||||
|
This function solves a system of equations using an LU matrix.
This function solves the equation
|
|
||||||||||||||||||||
|
This method subtracts a scalar value from the vector.
|
|
||||||||||||||||||||
|
This method subtracts a from b.
|
|
|
The sum of all each element squared.
|
|
|
This method swaps this vector with another efficiently. This method reassigns the pointers IntervalVector::a to each other. This is markedly more efficient than the elementwise copy that would occur if you used the assignment operator.
|
|
||||||||||||
|
This function returns a vector whose elements are point intervals containing the upper bounds of a vector.
|
|
|
This method returns a vector whose elements are point intervals containing the upper bounds of this vector.
|
|
|
The sum of all the elements of this vector.
|
|
||||||||||||
|
This function returns a vector whose elements are point intervals containing the widths of a vector.
|
|
|
This method returns a vector whose elements are point intervals containing the widths of this vector.
|
|
||||||||||||
|
This function tests if each element in v is disjoint with the corresponding element in y.
|
|
||||||||||||
|
This function returns the dot product of a vector and and another.
|
|
||||||||||||
|
This function test if each element in v encloses the corresponding element in y.
|
|
||||||||||||
|
This function tests if each element in v contains the corresponding element in y.
|
|
||||||||||||
|
This function performs a convex interval hull on the elements of two vectors.
|
|
||||||||||||
|
This function returns the intersection of this vector and another.
|
|
||||||||||||
|
This function returns the union of x and y.
|
|
|
This function tells whether the vector contains an empty element.
|
|
|
This function returns a vector whose elements are point intervals containing the lower bounds of a vector.
|
|
|
This function returns a vector whose elements are point intervals containing the midpoints of a vector.
|
|
||||||||||||
|
The norm of a vector.
|
|
||||||||||||
|
This operator multiplies a scalar to a vector.
|
|
||||||||||||
|
This operator adds a vector and scalar value.
|
|
||||||||||||
|
This operator subtracts a scalar value from the vector.
|
|
||||||||||||
|
This operator is a convenience operator for outputing vectors. The outputed vector will have the following format.
|
|
||||||||||||
|
This operator reads a vector from the stream. If the read vector is of a different dimension than v, then v is resized to the read vector's dimension. The read vector must be formated as follows:
|
|
||||||||||||
|
This function moves the elements of x to the new addresses specified in p.
|
|
||||||||||||
|
This funtion implements the reciprocal scale of an interval vector. The reciprocalScale is defined as
|
|
||||||||||||||||||||
|
This function performs a scaled vector accumulation. This operation is defined by
|
|
||||||||||||||||||||
|
This function cancels the addition of y to the vector x. Scaled cancellation is calculated in the following way:
|
|
||||||||||||||||||||||||
|
This function returns the dot product of a vector and and another. The scaled vector is found using the following formula:
|
|
||||||||||||
|
This method swaps two vectors efficiently. This method reassigns the pointers IntervalVector::a to each other. This is markedly more efficient than the elementwise copy that would occur if you used the assignment operator.
|
|
|
This function returns a vector whose elements are point intervals containing the upper bounds of a vector.
|
|
|
This function returns a vector whose elements are point intervals containing the widths of a vector.
|
|
|
The array that stores the elements.
|
|
|
The dimension of the vector.
|
|
|
This is a work around, ignore it.
|
1.4.4