Semi sparse vector.This class implements semi-sparse vectors. Such are DVectorBases where the indices of its nonzero elements can be stored in an extra IdxSet. Only elements with absolute value > epsilon are considered to be nonzero. Since really storing the nonzeros is not always convenient, an SSVectorBase provides two different stati: setup and not setup. An SSVectorBase being setup means that the nonzero indices are available, otherwise an SSVectorBase is just an ordinary DVectorBase with an empty IdxSet. Note that due to arithmetic operation, zeros can slip in, i.e., it is only guaranteed that at least every non-zero is in the IdxSet. More...
#include <dsvectorbase.h>
Public Member Functions | |
template<> | |
SSVectorBase< Rational > & | assign (const SVectorBase< Rational > &rhs) |
Assigns only the elements of rhs . More... | |
Status of an SSVectorBase | |
An SSVectorBase can be set up or not. In case it is set up, its IdxSet correctly contains all indices of nonzero elements of the SSVectorBase. Otherwise, it does not contain any useful data. Whether or not an SSVectorBase is setup can be determined with the method isSetup(). There are three methods for directly affecting the setup status of an SSVectorBase:
| |
R * | get_ptr () |
Only used in slufactor.cpp. More... | |
R | getEpsilon () const |
Returns the non-zero epsilon used. More... | |
void | setEpsilon (R eps) |
Changes the non-zero epsilon, invalidating the setup. */. More... | |
bool | isSetup () const |
Returns setup status. More... | |
void | unSetup () |
Makes SSVectorBase not setup. More... | |
void | setup () |
Initializes nonzero indices for elements with absolute values above epsilon and sets all other elements to 0. More... | |
void | forceSetup () |
Forces setup status. More... | |
Methods for setup SSVectorBases | |
int | index (int n) const |
Returns index of the n 'th nonzero element. More... | |
R | value (int n) const |
Returns value of the n 'th nonzero element. More... | |
int | pos (int i) const |
Finds the position of index i in the IdxSet, or -1 if i doesn't exist. More... | |
int | size () const |
Returns the number of nonzeros. More... | |
void | add (int i, R x) |
Adds nonzero (i , x ) to SSVectorBase. More... | |
void | setValue (int i, R x) |
Sets i 'th element to x . More... | |
void | scaleValue (int i, int scaleExp) |
Scale i 'th element by a. More... | |
void | clearIdx (int i) |
Clears element i . More... | |
void | clearNum (int n) |
Sets n 'th nonzero element to 0 (index n must exist). More... | |
Methods independent of the Status | |
R | operator[] (int i) const |
Returns i 'th value. More... | |
const int * | indexMem () const |
Returns array indices. More... | |
const R * | values () const |
Returns array values. More... | |
const IdxSet & | indices () const |
Returns indices. More... | |
int * | altIndexMem () |
Returns array indices. More... | |
R * | altValues () |
Returns array values. More... | |
IdxSet & | altIndices () |
Returns indices. More... | |
Arithmetic operations | |
template<class S > | |
SSVectorBase< R > & | operator+= (const VectorBase< S > &vec) |
Addition. More... | |
template<class S > | |
SSVectorBase< R > & | operator+= (const SVectorBase< S > &vec) |
Addition. More... | |
template<class S > | |
SSVectorBase< R > & | operator+= (const SSVectorBase< S > &vec) |
Addition. More... | |
template<class S > | |
SSVectorBase< R > & | operator-= (const VectorBase< S > &vec) |
Subtraction. More... | |
template<class S > | |
SSVectorBase< R > & | operator-= (const SVectorBase< S > &vec) |
Subtraction. More... | |
template<class S > | |
SSVectorBase< R > & | operator-= (const SSVectorBase< S > &vec) |
Subtraction. More... | |
template<class S > | |
SSVectorBase< R > & | operator*= (S x) |
Scaling. More... | |
template<class S > | |
R | operator* (const SSVectorBase< S > &w) |
template<class S , class T > | |
SSVectorBase< R > & | multAdd (S xx, const SVectorBase< T > &vec) |
Addition of a scaled vector. More... | |
template<class S , class T > | |
SSVectorBase< R > & | multAdd (S x, const VectorBase< T > &vec) |
Addition of a scaled vector. More... | |
template<class S , class T > | |
SSVectorBase< R > & | assignPWproduct4setup (const SSVectorBase< S > &x, const SSVectorBase< T > &y) |
Assigns pair wise vector product to SSVectorBase. More... | |
template<class S , class T > | |
SSVectorBase< R > & | assign2product (const SSVectorBase< S > &x, const SVSetBase< T > &A) |
Assigns \(x^T \cdot A\) to SSVectorBase. More... | |
template<class S , class T > | |
SSVectorBase< R > & | assign2product4setup (const SVSetBase< S > &A, const SSVectorBase< T > &x) |
Assigns SSVectorBase to \(A \cdot x\) for a setup x . More... | |
template<class S , class T > | |
SSVectorBase< R > & | assign2productAndSetup (const SVSetBase< S > &A, SSVectorBase< T > &x) |
Assigns SSVectorBase to \(A \cdot x\) thereby setting up x . More... | |
R | maxAbs () const |
Maximum absolute value, i.e., infinity norm. More... | |
R | length2 () const |
Squared euclidian norm. More... | |
Real | length () const |
Floating point approximation of euclidian norm (without any approximation guarantee). More... | |
Miscellaneous | |
int | dim () const |
Dimension of VectorBase. More... | |
void | reDim (int newdim) |
Resets dimension to newdim . More... | |
void | setSize (int n) |
Sets number of nonzeros (thereby unSetup SSVectorBase). More... | |
void | reMem (int newsize) |
Resets memory consumption to newsize . More... | |
void | clear () |
Clears vector. More... | |
bool | isConsistent () const |
consistency check. More... | |
Constructors / Destructors | |
SSVectorBase (int p_dim, R p_eps=Param::epsilon()) | |
Default constructor. More... | |
template<class S > | |
SSVectorBase (const SSVectorBase< S > &vec) | |
Copy constructor. More... | |
SSVectorBase (const SSVectorBase< R > &vec) | |
Copy constructor. More... | |
template<class S > | |
SSVectorBase (const VectorBase< S > &vec, R eps=Param::epsilon()) | |
Constructs nonsetup copy of vec . More... | |
template<class S > | |
void | setup_and_assign (SSVectorBase< S > &rhs) |
Sets up rhs vector, and assigns it. More... | |
template<class S > | |
SSVectorBase< R > & | assign (const SVectorBase< S > &rhs) |
Assigns only the elements of rhs . More... | |
template<class S > | |
SSVectorBase< R > & | operator= (const SSVectorBase< S > &rhs) |
Assignment operator. More... | |
SSVectorBase< R > & | operator= (const SSVectorBase< R > &rhs) |
Assignment operator. More... | |
template<class S > | |
SSVectorBase< R > & | operator= (const SVectorBase< S > &rhs) |
Assignment operator. More... | |
template<class S > | |
SSVectorBase< R > & | operator= (const VectorBase< S > &rhs) |
Assignment operator. More... | |
~SSVectorBase () | |
destructor More... | |
![]() | |
template<> | |
void | reSize (int newsize) |
Resets DVectorBase's memory size to newsize (specialization for Real). More... | |
DVectorBase (int d=0) | |
Default constructor. d is the initial dimension. More... | |
template<class S > | |
DVectorBase (const VectorBase< S > &old) | |
Copy constructor. More... | |
DVectorBase (const DVectorBase< R > &old) | |
Copy constructor. More... | |
template<class S > | |
DVectorBase (const DVectorBase< S > &old) | |
Copy constructor. More... | |
DVectorBase< R > & | operator= (const VectorBase< R > &vec) |
Assignment operator. More... | |
template<class S > | |
DVectorBase< R > & | operator= (const VectorBase< S > &vec) |
Assignment operator. More... | |
DVectorBase< R > & | operator= (const DVectorBase< R > &vec) |
Assignment operator. More... | |
template<class S > | |
DVectorBase< R > & | operator= (const DVectorBase< S > &vec) |
Assignment operator. More... | |
template<class S > | |
DVectorBase< R > & | operator= (const SVectorBase< S > &vec) |
Assignment operator. More... | |
virtual | ~DVectorBase () |
Destructor. More... | |
int | memSize () const |
Returns DVectorBase's memory size. More... | |
void | reDim (int newdim, const bool setZero=true) |
Resets DVectorBase's dimension to newdim . More... | |
void | reSize (int newsize) |
Resets DVectorBase's memory size to newsize . More... | |
bool | isConsistent () const |
Consistency check. More... | |
![]() | |
template<> | |
VectorBase< Real > & | operator= (const VectorBase< Real > &vec) |
Assignment operator (specialization for Real). More... | |
template<> | |
VectorBase< Real > & | operator= (const VectorBase< Rational > &vec) |
Assignment operator (specialization for Real). More... | |
template<> | |
void | clear () |
Set vector to 0 (specialization for Real). More... | |
template<> | |
Rational | operator* (const VectorBase< Rational > &vec) const |
Inner product. More... | |
VectorBase (int p_dimen, R *p_val) | |
Constructor. More... | |
template<class S > | |
VectorBase< R > & | operator= (const VectorBase< S > &vec) |
Assignment operator. More... | |
VectorBase< R > & | operator= (const VectorBase< R > &vec) |
Assignment operator. More... | |
VectorBase< Real > & | scaleAssign (int scaleExp, const VectorBase< Real > &vec) |
scale and assign More... | |
VectorBase< Real > & | scaleAssign (const int *scaleExp, const VectorBase< Real > &vec, bool negateExp=false) |
scale and assign More... | |
template<class S > | |
VectorBase< R > & | operator= (const SVectorBase< S > &vec) |
Assignment operator. More... | |
template<class S > | |
VectorBase< R > & | operator= (const SSVectorBase< S > &vec) |
Assignment operator. More... | |
template<class S > | |
VectorBase< R > & | assign (const SVectorBase< S > &vec) |
Assign values of vec . More... | |
template<class S > | |
VectorBase< R > & | assign (const SSVectorBase< S > &vec) |
Assign values of vec . More... | |
void | clear () |
Set vector to 0. More... | |
template<class S > | |
VectorBase< R > & | operator+= (const VectorBase< S > &vec) |
Addition. More... | |
template<class S > | |
VectorBase< R > & | operator+= (const SVectorBase< S > &vec) |
Addition. More... | |
template<class S > | |
VectorBase< R > & | operator+= (const SSVectorBase< S > &vec) |
Addition. More... | |
template<class S > | |
VectorBase< R > & | operator-= (const VectorBase< S > &vec) |
Subtraction. More... | |
template<class S > | |
VectorBase< R > & | operator-= (const SVectorBase< S > &vec) |
Subtraction. More... | |
template<class S > | |
VectorBase< R > & | operator-= (const SSVectorBase< S > &vec) |
Subtraction. More... | |
template<class S > | |
VectorBase< R > & | operator*= (const S &x) |
Scaling. More... | |
template<class S > | |
VectorBase< R > & | operator/= (const S &x) |
Division. More... | |
R | operator* (const VectorBase< R > &vec) const |
Inner product. More... | |
R | operator* (const SVectorBase< R > &vec) const |
Inner product. More... | |
R | operator* (const SSVectorBase< R > &vec) const |
Inner product. More... | |
R | maxAbs () const |
Maximum absolute value, i.e., infinity norm. More... | |
R | minAbs () const |
Minimum absolute value. More... | |
Real | length () const |
Floating point approximation of euclidian norm (without any approximation guarantee). More... | |
R | length2 () const |
Squared norm. More... | |
template<class S , class T > | |
VectorBase< R > & | multAdd (const S &x, const VectorBase< T > &vec) |
Addition of scaled vector. More... | |
template<class S , class T > | |
VectorBase< R > & | multAdd (const S &x, const SVectorBase< T > &vec) |
Addition of scaled vector. More... | |
template<class S , class T > | |
VectorBase< R > & | multSub (const S &x, const SVectorBase< T > &vec) |
Subtraction of scaled vector. More... | |
template<class S , class T > | |
VectorBase< R > & | multAdd (const S &x, const SSVectorBase< T > &vec) |
Addition of scaled vector. More... | |
R * | get_ptr () |
Conversion to C-style pointer. More... | |
const R * | get_const_ptr () const |
Conversion to C-style pointer. More... | |
bool | isConsistent () const |
Consistency check. More... | |
int | dim () const |
Dimension of vector. More... | |
R & | operator[] (int n) |
Return n 'th value by reference. More... | |
const R & | operator[] (int n) const |
Return n 'th value. More... | |
Private Member Functions | |
Private helpers | |
template<class S , class T > | |
SSVectorBase< R > & | assign2product1 (const SVSetBase< S > &A, const SSVectorBase< T > &x) |
Assignment helper. More... | |
template<class S , class T > | |
SSVectorBase< R > & | assign2productShort (const SVSetBase< S > &A, const SSVectorBase< T > &x) |
Assignment helper. More... | |
template<class S , class T > | |
SSVectorBase< R > & | assign2productFull (const SVSetBase< S > &A, const SSVectorBase< T > &x) |
Assignment helper. More... | |
Friends | |
class | DVectorBase< R > |
class | VectorBase< R > |
template<class S > | |
class | DSVectorBase |
Data | |
bool | setupStatus |
Is the SSVectorBase set up? More... | |
R | epsilon |
A value x with |x| < epsilon is considered zero. More... | |
void | setMax (int newmax) |
Allocates enough space to accommodate newmax values. More... | |
Additional Inherited Members | |
![]() | |
IdxSet (int n, int imem[], int l=0) | |
constructor. More... | |
IdxSet () | |
default constructor. More... | |
virtual | ~IdxSet () |
destructor. More... | |
IdxSet & | operator= (const IdxSet &set) |
assignment operator. More... | |
IdxSet (const IdxSet &) | |
copy constructor. More... | |
int | index (int n) const |
access n 'th index. More... | |
int | size () const |
returns the number of used indices. More... | |
int | max () const |
returns the maximal number of indices which can be stored in IdxSet. More... | |
int | dim () const |
returns the maximal index. More... | |
int | pos (int i) const |
returns the position of index i . More... | |
void | add (int n) |
appends n uninitialized indices. More... | |
void | add (const IdxSet &set) |
appends all indices of set . More... | |
void | add (int n, const int i[]) |
appends n indices in i . More... | |
void | addIdx (int i) |
appends index i . More... | |
void | remove (int n, int m) |
removes indices at position numbers n through m . More... | |
void | remove (int n) |
removes n 'th index. More... | |
void | clear () |
removes all indices. More... | |
bool | isConsistent () const |
consistency check. More... | |
![]() | |
int | dimen |
Dimension of vector. More... | |
R * | val |
Values of vector. More... | |
![]() | |
int | num |
number of used indices More... | |
int | len |
length of array idx More... | |
int * | idx |
array of indices More... | |
bool | freeArray |
true iff idx should be freed inside of this object More... | |
Semi sparse vector.
This class implements semi-sparse vectors. Such are DVectorBases where the indices of its nonzero elements can be stored in an extra IdxSet. Only elements with absolute value > epsilon are considered to be nonzero. Since really storing the nonzeros is not always convenient, an SSVectorBase provides two different stati: setup and not setup. An SSVectorBase being setup means that the nonzero indices are available, otherwise an SSVectorBase is just an ordinary DVectorBase with an empty IdxSet. Note that due to arithmetic operation, zeros can slip in, i.e., it is only guaranteed that at least every non-zero is in the IdxSet.
Definition at line 29 of file dsvectorbase.h.
|
explicit |
Default constructor.
Definition at line 657 of file ssvectorbase.h.
SSVectorBase | ( | const SSVectorBase< S > & | vec | ) |
Copy constructor.
Definition at line 672 of file ssvectorbase.h.
SSVectorBase | ( | const SSVectorBase< R > & | vec | ) |
Copy constructor.
The redundancy with the copy constructor below is necessary since otherwise the compiler doesn't realize that it could use the more general one with S = R and generates a shallow copy constructor.
Definition at line 689 of file ssvectorbase.h.
|
explicit |
Constructs nonsetup copy of vec
.
Definition at line 704 of file ssvectorbase.h.
~SSVectorBase | ( | ) |
destructor
Definition at line 879 of file ssvectorbase.h.
void add | ( | int | i, |
R | x | ||
) |
Adds nonzero (i
, x
) to SSVectorBase.
No nonzero with index i
must exist in the SSVectorBase.
Definition at line 208 of file ssvectorbase.h.
Referenced by SPxBasis::condition(), SPxBoundFlippingRT::flipAndUpdate(), soplex::initConstVecs(), and SPxBasis::multWithBase().
int* altIndexMem | ( | ) |
Returns array indices.
Definition at line 311 of file ssvectorbase.h.
Referenced by SLUFactorRational::change(), SLUFactor::change(), SLUFactorRational::changeEta(), SLUFactor::changeEta(), SPxFastRT::maxDelta(), SPxFastRT::minDelta(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SLUFactorRational::solveLeft(), SLUFactor::solveLeft(), SLUFactorRational::solveRight4update(), and SLUFactor::solveRight4update().
IdxSet& altIndices | ( | ) |
Returns indices.
Definition at line 325 of file ssvectorbase.h.
R* altValues | ( | ) |
Returns array values.
Definition at line 318 of file ssvectorbase.h.
Referenced by SLUFactorRational::change(), SLUFactor::change(), SLUFactorRational::changeEta(), SLUFactor::changeEta(), SPxFastRT::maxDelta(), SPxFastRT::minDelta(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SLUFactorRational::solveLeft(), SLUFactor::solveLeft(), SLUFactorRational::solveRight(), SLUFactor::solveRight(), SLUFactorRational::solveRight4update(), and SLUFactor::solveRight4update().
SSVectorBase< R > & assign | ( | const SVectorBase< S > & | rhs | ) |
Assigns only the elements of rhs
.
Definition at line 846 of file basevectors.h.
Referenced by SSVectorBase< Real >::setup_and_assign(), SLUFactorRational::solveLeft(), and SLUFactor::solveLeft().
SSVectorBase< Rational > & assign | ( | const SVectorBase< Rational > & | rhs | ) |
Assigns only the elements of rhs
.
Definition at line 880 of file basevectors.h.
SSVectorBase< R > & assign2product | ( | const SSVectorBase< S > & | x, |
const SVSetBase< T > & | A | ||
) |
Assigns \(x^T \cdot A\) to SSVectorBase.
Definition at line 535 of file basevectors.h.
Referenced by SSVectorBase< Real >::multAdd(), and SPxSolver::setupPupdate().
|
private |
Assignment helper.
Definition at line 599 of file basevectors.h.
Referenced by SSVectorBase< Real >::~SSVectorBase().
SSVectorBase< R > & assign2product4setup | ( | const SVSetBase< S > & | A, |
const SSVectorBase< T > & | x | ||
) |
Assigns SSVectorBase to \(A \cdot x\) for a setup x
.
Definition at line 566 of file basevectors.h.
Referenced by SSVectorBase< Real >::multAdd(), SPxLeastSqSC::scale(), SPxSolver::setupPupdate(), and soplex::updateRes().
SSVectorBase< R > & assign2productAndSetup | ( | const SVSetBase< S > & | A, |
SSVectorBase< T > & | x | ||
) |
Assigns SSVectorBase to \(A \cdot x\) thereby setting up x
.
Definition at line 788 of file basevectors.h.
Referenced by SSVectorBase< Real >::multAdd(), and SPxSolver::setupPupdate().
|
private |
Assignment helper.
Definition at line 745 of file basevectors.h.
Referenced by SSVectorBase< Real >::~SSVectorBase().
|
private |
Assignment helper.
Definition at line 634 of file basevectors.h.
Referenced by SSVectorBase< Real >::~SSVectorBase().
SSVectorBase< R > & assignPWproduct4setup | ( | const SSVectorBase< S > & | x, |
const SSVectorBase< T > & | y | ||
) |
Assigns pair wise vector product to SSVectorBase.
Assigns pair wise vector product of setup x and setup y to SSVectorBase.
Definition at line 475 of file basevectors.h.
Referenced by SSVectorBase< Real >::multAdd(), SPxLeastSqSC::scale(), soplex::updateScale(), and soplex::updateScaleFinal().
void clear | ( | ) |
Clears vector.
Definition at line 600 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SLUFactorRational::change(), SLUFactor::change(), SLUFactor::clear(), SLUFactorRational::clear(), UpdateVector::clearUpdate(), SPxBasis::condition(), SPxBasis::coSolve(), SPxBoundFlippingRT::flipAndUpdate(), SPxSolver::leave(), SPxSteepPR::load(), SPxBasis::multBaseWith(), SPxBasis::multWithBase(), SLUFactorRational::operator=(), SLUFactor::operator=(), SSVectorBase< Real >::operator=(), SPxSteepPR::setRep(), SPxSteepPR::setType(), SSVectorBase< Real >::setup_and_assign(), SPxBasis::solve(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SPxBasis::solve4update(), SLUFactorRational::solveLeft(), SLUFactor::solveLeft(), SLUFactorRational::solveRight(), SLUFactor::solveRight(), SLUFactorRational::solveRight4update(), SLUFactor::solveRight4update(), soplex::updateRes(), soplex::updateScale(), and soplex::updateScaleFinal().
void clearIdx | ( | int | i | ) |
Clears element i
.
Definition at line 253 of file ssvectorbase.h.
Referenced by SPxFastRT::maxReEnter(), SPxFastRT::minReEnter(), and SPxBoundFlippingRT::selectEnter().
void clearNum | ( | int | n | ) |
Sets n
'th nonzero element to 0 (index n
must exist).
Definition at line 269 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxHarrisRT::selectLeave(), and SSVectorBase< Real >::setValue().
int dim | ( | ) | const |
Dimension of VectorBase.
Definition at line 560 of file ssvectorbase.h.
Referenced by VectorBase< Real >::assign(), SSVectorBase< Real >::assign2product4setup(), SSVectorBase< Real >::assign2productAndSetup(), SSVectorBase< Real >::assignPWproduct4setup(), SPxSolver::enter(), UpdateVector::isConsistent(), VectorBase< Real >::multAdd(), SPxBasis::multBaseWith(), SPxBasis::multWithBase(), VectorBase< Real >::operator*(), VectorBase< Real >::operator+=(), VectorBase< Real >::operator-=(), SSVectorBase< Real >::operator=(), SPxSteepPR::setRep(), SSVectorBase< Real >::setup(), SSVectorBase< Real >::setup_and_assign(), and SSVectorBase< Real >::SSVectorBase().
void forceSetup | ( | ) |
Forces setup status.
Definition at line 162 of file ssvectorbase.h.
Referenced by SLUFactorRational::change(), SLUFactor::change(), SLUFactorRational::changeEta(), SLUFactor::changeEta(), SPxFastRT::maxDelta(), SPxFastRT::minDelta(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SLUFactorRational::solveLeft(), SLUFactor::solveLeft(), SLUFactorRational::solveRight4update(), and SLUFactor::solveRight4update().
R* get_ptr | ( | ) |
Only used in slufactor.cpp.
Definition at line 99 of file ssvectorbase.h.
Referenced by SoPlex::getBasisInverseTimesVecReal(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), and SLUFactor::solve3right4update().
R getEpsilon | ( | ) | const |
Returns the non-zero epsilon used.
Definition at line 104 of file ssvectorbase.h.
Referenced by SPxSolver::isConsistent(), SLUFactor::solve2right4update(), SLUFactor::solve3right4update(), SLUFactor::solveLeft(), and SLUFactor::solveRight4update().
int index | ( | int | n | ) | const |
Returns index of the n
'th nonzero element.
Definition at line 174 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SoPlex::_computeReducedProbObjCoeff(), SoPlex::_getCompatibleBoundCons(), SSVectorBase< Real >::assignPWproduct4setup(), SSVectorBase< Real >::clearNum(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SPxBasis::multBaseWith(), SSVectorBase< Real >::operator*(), SSVectorBase< Real >::operator*=(), VectorBase< Real >::operator+=(), SSVectorBase< Real >::operator+=(), VectorBase< Real >::operator-=(), SSVectorBase< Real >::operator-=(), SVectorBase< Real >::operator=(), SSVectorBase< Real >::operator=(), SSVectorBase< Real >::reDim(), SPxHarrisRT::selectEnter(), SPxHarrisRT::selectLeave(), SSVectorBase< Real >::setup_and_assign(), and SPxSolver::updateFtest().
const int* indexMem | ( | ) | const |
Returns array indices.
Definition at line 293 of file ssvectorbase.h.
Referenced by VectorBase< Real >::assign(), SLUFactorRational::change(), SLUFactor::change(), SPxFastRT::maxDelta(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minSelect(), VectorBase< Real >::multAdd(), VectorBase< Real >::operator*(), SPxHarrisRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxHarrisRT::selectLeave(), and SPxBoundFlippingRT::selectLeave().
const IdxSet& indices | ( | ) | const |
Returns indices.
Definition at line 305 of file ssvectorbase.h.
Referenced by UpdateVector::idx(), SPxSolver::perturbMax(), and SPxSolver::perturbMin().
bool isConsistent | ( | ) | const |
consistency check.
Definition at line 617 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::clear(), SSVectorBase< Real >::clearIdx(), SSVectorBase< Real >::clearNum(), SPxSolver::enter(), UpdateVector::isConsistent(), SPxSolver::leave(), SSVectorBase< Real >::operator*=(), SSVectorBase< Real >::operator=(), SSVectorBase< Real >::reDim(), SSVectorBase< Real >::reMem(), SSVectorBase< Real >::scaleValue(), SPxSteepPR::selectLeave(), SSVectorBase< Real >::setup(), SSVectorBase< Real >::setup_and_assign(), SSVectorBase< Real >::setValue(), and SSVectorBase< Real >::SSVectorBase().
bool isSetup | ( | ) | const |
Returns setup status.
Definition at line 120 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SoPlex::_computeReducedProbObjCoeff(), SoPlex::_getCompatibleBoundCons(), VectorBase< Real >::assign(), SSVectorBase< Real >::assign2product1(), SSVectorBase< Real >::assign2product4setup(), SSVectorBase< Real >::assign2productAndSetup(), SSVectorBase< Real >::assign2productFull(), SSVectorBase< Real >::assign2productShort(), SSVectorBase< Real >::assignPWproduct4setup(), SSVectorBase< Real >::clear(), SSVectorBase< Real >::clearIdx(), SSVectorBase< Real >::clearNum(), SPxSolver::enter(), SSVectorBase< Real >::index(), soplex::initConstVecs(), SSVectorBase< Real >::isConsistent(), SPxSolver::leave(), SSVectorBase< Real >::length2(), SSVectorBase< Real >::maxAbs(), SPxFastRT::maxDelta(), SPxFastRT::minDelta(), VectorBase< Real >::multAdd(), SSVectorBase< Real >::multAdd(), SPxBasis::multBaseWith(), VectorBase< Real >::operator*(), SSVectorBase< Real >::operator*=(), VectorBase< Real >::operator+=(), SSVectorBase< Real >::operator+=(), VectorBase< Real >::operator-=(), SSVectorBase< Real >::operator-=(), VectorBase< Real >::operator=(), SVectorBase< Real >::operator=(), SSVectorBase< Real >::operator=(), SSVectorBase< Real >::pos(), SPxLeastSqSC::scale(), SPxBoundFlippingRT::selectLeave(), SSVectorBase< Real >::setup(), SSVectorBase< Real >::setup_and_assign(), SPxSolver::setupPupdate(), SSVectorBase< Real >::setValue(), SSVectorBase< Real >::size(), SPxBasis::solve4update(), and SSVectorBase< Real >::value().
Real length | ( | ) | const |
Floating point approximation of euclidian norm (without any approximation guarantee).
Definition at line 548 of file ssvectorbase.h.
Referenced by SPxBasis::condition(), and SPxSolver::leave().
R length2 | ( | ) | const |
Squared euclidian norm.
Definition at line 532 of file ssvectorbase.h.
Referenced by SPxDevexPR::left4(), SPxSteepPR::left4(), SSVectorBase< Real >::length(), and SPxSteepPR::selectEnter().
R maxAbs | ( | ) | const |
Maximum absolute value, i.e., infinity norm.
Definition at line 511 of file ssvectorbase.h.
SSVectorBase< R > & multAdd | ( | S | xx, |
const SVectorBase< T > & | vec | ||
) |
Addition of a scaled vector.
Definition at line 409 of file basevectors.h.
Referenced by SPxBoundFlippingRT::flipAndUpdate(), SPxBasis::multBaseWith(), and SSVectorBase< Real >::operator*().
SSVectorBase<R>& multAdd | ( | S | x, |
const VectorBase< T > & | vec | ||
) |
Addition of a scaled vector.
Definition at line 479 of file ssvectorbase.h.
R operator* | ( | const SSVectorBase< S > & | w | ) |
Definition at line 429 of file ssvectorbase.h.
SSVectorBase<R>& operator*= | ( | S | x | ) |
Scaling.
Definition at line 414 of file ssvectorbase.h.
SSVectorBase<R>& operator+= | ( | const VectorBase< S > & | vec | ) |
Addition.
Definition at line 339 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::operator+=().
SSVectorBase< R > & operator+= | ( | const SVectorBase< S > & | vec | ) |
Addition.
Definition at line 370 of file basevectors.h.
SSVectorBase<R>& operator+= | ( | const SSVectorBase< S > & | vec | ) |
Addition.
Definition at line 357 of file ssvectorbase.h.
SSVectorBase<R>& operator-= | ( | const VectorBase< S > & | vec | ) |
Subtraction.
Definition at line 374 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::operator-=().
SSVectorBase< R > & operator-= | ( | const SVectorBase< S > & | vec | ) |
Subtraction.
Definition at line 389 of file basevectors.h.
SSVectorBase<R>& operator-= | ( | const SSVectorBase< S > & | vec | ) |
Subtraction.
Definition at line 393 of file ssvectorbase.h.
SSVectorBase<R>& operator= | ( | const SSVectorBase< S > & | rhs | ) |
Assignment operator.
Definition at line 772 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::operator=().
SSVectorBase<R>& operator= | ( | const SSVectorBase< R > & | rhs | ) |
Assignment operator.
Definition at line 818 of file ssvectorbase.h.
SSVectorBase< R > & operator= | ( | const SVectorBase< S > & | rhs | ) |
Assignment operator.
Definition at line 914 of file basevectors.h.
SSVectorBase<R>& operator= | ( | const VectorBase< S > & | rhs | ) |
Assignment operator.
Definition at line 868 of file ssvectorbase.h.
R operator[] | ( | int | i | ) | const |
Returns i
'th value.
Definition at line 287 of file ssvectorbase.h.
int pos | ( | int | i | ) | const |
Finds the position of index i
in the IdxSet, or -1 if i
doesn't exist.
Definition at line 191 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::add(), SSVectorBase< Real >::clearIdx(), SSVectorBase< Real >::isConsistent(), and SSVectorBase< Real >::setValue().
void reDim | ( | int | newdim | ) |
Resets dimension to newdim
.
Definition at line 566 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SPxSteepPR::addedCoVecs(), SPxBoundFlippingRT::flipAndUpdate(), SoPlex::getBasisInverseColRational(), SoPlex::getBasisInverseRowRational(), SoPlex::getBasisInverseTimesVecRational(), SPxSteepPR::load(), SLUFactor::load(), SLUFactorRational::load(), UpdateVector::reDim(), and SPxSteepPR::setRep().
void reMem | ( | int | newsize | ) |
Resets memory consumption to newsize
.
Definition at line 591 of file ssvectorbase.h.
void scaleValue | ( | int | i, |
int | scaleExp | ||
) |
Scale i
'th element by a.
Definition at line 242 of file ssvectorbase.h.
Referenced by SoPlex::getBasisInverseColReal(), and SoPlex::getBasisInverseRowReal().
void setEpsilon | ( | R | eps | ) |
Changes the non-zero epsilon, invalidating the setup. */.
Definition at line 110 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), and SPxSteepPR::setType().
|
private |
Allocates enough space to accommodate newmax
values.
Definition at line 65 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::operator=(), SSVectorBase< Real >::reDim(), SSVectorBase< Real >::reMem(), and SSVectorBase< Real >::setup_and_assign().
void setSize | ( | int | n | ) |
Sets number of nonzeros (thereby unSetup SSVectorBase).
Definition at line 581 of file ssvectorbase.h.
Referenced by SLUFactorRational::change(), SLUFactor::change(), SLUFactorRational::changeEta(), SLUFactor::changeEta(), SPxFastRT::maxDelta(), SPxFastRT::minDelta(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SLUFactorRational::solveLeft(), SLUFactor::solveLeft(), SLUFactorRational::solveRight4update(), and SLUFactor::solveRight4update().
void setup | ( | ) |
Initializes nonzero indices for elements with absolute values above epsilon and sets all other elements to 0.
Definition at line 132 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SPxBasis::condition(), SPxBoundFlippingRT::flipAndUpdate(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SSVectorBase< Real >::multAdd(), SSVectorBase< Real >::operator*(), SSVectorBase< Real >::operator+=(), SSVectorBase< Real >::operator-=(), SPxSolver::perturbMaxEnter(), SPxSolver::perturbMaxLeave(), SPxSolver::perturbMinEnter(), SPxSolver::perturbMinLeave(), SPxLeastSqSC::scale(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxDefaultRT::selectLeave(), SPxHarrisRT::selectLeave(), SPxSolver::setupPupdate(), SPxSolver::updateCoTest(), soplex::updateRes(), and SPxSolver::updateTest().
void setup_and_assign | ( | SSVectorBase< S > & | rhs | ) |
Sets up rhs
vector, and assigns it.
Definition at line 718 of file ssvectorbase.h.
Referenced by SPxSteepPR::selectEnter(), SPxSteepPR::selectLeave(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SLUFactorRational::solveRight4update(), and SLUFactor::solveRight4update().
void setValue | ( | int | i, |
R | x | ||
) |
Sets i
'th element to x
.
Definition at line 218 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SPxBoundFlippingRT::flipAndUpdate(), SoPlex::getBasisInverseColReal(), and SPxHarrisRT::selectEnter().
int size | ( | ) | const |
Returns the number of nonzeros.
Definition at line 199 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SoPlex::_computeReducedProbObjCoeff(), SoPlex::_getCompatibleBoundCons(), VectorBase< Real >::assign(), SSVectorBase< Real >::assign2product1(), SSVectorBase< Real >::assign2product4setup(), SSVectorBase< Real >::assign2productFull(), SSVectorBase< Real >::assign2productShort(), SSVectorBase< Real >::assignPWproduct4setup(), SLUFactorRational::change(), SLUFactor::change(), SLUFactorRational::changeEta(), SLUFactor::changeEta(), SPxSolver::computeDualfarkas4Col(), SPxSolver::computeDualfarkas4Row(), SPxSolver::computePrimalray4Col(), SPxSolver::computePrimalray4Row(), DSVectorBase< Real >::DSVectorBase(), SPxSolver::enter(), SoPlex::getBasisInverseColReal(), SoPlex::getBasisInverseRowReal(), SPxSolver::leave(), SPxFastRT::maxDelta(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minSelect(), VectorBase< Real >::multAdd(), SPxBasis::multBaseWith(), VectorBase< Real >::operator*(), SSVectorBase< Real >::operator*(), SSVectorBase< Real >::operator*=(), VectorBase< Real >::operator+=(), SSVectorBase< Real >::operator+=(), VectorBase< Real >::operator-=(), SSVectorBase< Real >::operator-=(), DSVectorBase< Real >::operator=(), SVectorBase< Real >::operator=(), SSVectorBase< Real >::operator=(), SPxSolver::perturbMax(), SPxSolver::perturbMin(), SPxHarrisRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxHarrisRT::selectLeave(), SPxBoundFlippingRT::selectLeave(), SSVectorBase< Real >::setup_and_assign(), SPxSolver::setupPupdate(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SLUFactorRational::solveLeft(), SLUFactor::solveLeft(), SLUFactorRational::solveRight4update(), SLUFactor::solveRight4update(), SPxSolver::updateFtest(), and SSVectorBase< Real >::value().
void unSetup | ( | ) |
Makes SSVectorBase not setup.
Definition at line 126 of file ssvectorbase.h.
Referenced by SoPlex::_checkOriginalProblemOptimality(), SoPlex::_computeReducedProbObjCoeff(), SoPlex::_getCompatibleBoundCons(), SoPlex::_getCompatibleColumns(), SoPlex::_updateDecompReducedProblemViol(), SSVectorBase< Real >::altIndexMem(), SSVectorBase< Real >::altIndices(), SSVectorBase< Real >::altValues(), SSVectorBase< Real >::operator=(), SSVectorBase< Real >::setSize(), SLUFactorRational::solve2right4update(), SLUFactor::solve2right4update(), SLUFactorRational::solve3right4update(), SLUFactor::solve3right4update(), SLUFactorRational::solveLeft(), SLUFactor::solveLeft(), SLUFactor::solveRight(), SLUFactorRational::solveRight4update(), and SLUFactor::solveRight4update().
R value | ( | int | n | ) | const |
Returns value of the n
'th nonzero element.
Definition at line 182 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), SoPlex::_computeReducedProbObjCoeff(), SoPlex::_getCompatibleBoundCons(), SoPlex::getBasisInverseColReal(), VectorBase< Real >::operator+=(), SSVectorBase< Real >::operator+=(), VectorBase< Real >::operator-=(), SSVectorBase< Real >::operator-=(), SVectorBase< Real >::operator=(), and SPxSolver::updateFtest().
const R* values | ( | ) | const |
Returns array values.
Definition at line 299 of file ssvectorbase.h.
Referenced by SLUFactorRational::change(), SLUFactor::change(), SPxDevexPR::entered4(), SPxSteepPR::entered4(), SPxDevexPR::left4(), SPxSteepPR::left4(), SPxFastRT::maxDelta(), SPxFastRT::maxSelect(), SPxFastRT::minDelta(), SPxFastRT::minSelect(), SPxSolver::perturbMax(), SPxSolver::perturbMin(), SPxDefaultRT::selectEnter(), SPxHarrisRT::selectEnter(), SPxBoundFlippingRT::selectEnter(), SPxDefaultRT::selectLeave(), SPxHarrisRT::selectLeave(), and SPxBoundFlippingRT::selectLeave().
|
friend |
Definition at line 52 of file ssvectorbase.h.
|
friend |
Definition at line 50 of file ssvectorbase.h.
|
friend |
Definition at line 51 of file ssvectorbase.h.
|
private |
A value x with |x| < epsilon is considered zero.
Definition at line 62 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::getEpsilon(), SSVectorBase< Real >::operator=(), and SSVectorBase< Real >::setup_and_assign().
|
private |
Is the SSVectorBase set up?
Definition at line 59 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::assign2productAndSetup(), SSVectorBase< Real >::isSetup(), and SSVectorBase< Real >::setup_and_assign().