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... | |
Public Member Functions inherited from DVectorBase< R > | |
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... | |
Public Member Functions inherited from VectorBase< R > | |
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 | |
Protected Member Functions inherited from IdxSet | |
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... | |
Protected Attributes inherited from VectorBase< R > | |
int | dimen |
Dimension of vector. More... | |
R * | val |
Values of vector. More... | |
Protected Attributes inherited from IdxSet | |
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 661 of file ssvectorbase.h.
SSVectorBase | ( | const SSVectorBase< S > & | vec | ) |
Copy constructor.
Definition at line 676 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 693 of file ssvectorbase.h.
|
explicit |
Constructs nonsetup copy of vec
.
Definition at line 708 of file ssvectorbase.h.
~SSVectorBase | ( | ) |
destructor
Definition at line 883 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 209 of file ssvectorbase.h.
Referenced by SPxBasis::condition(), SPxBoundFlippingRT::flipAndUpdate(), soplex::initConstVecs(), and SPxBasis::multWithBase().
int* altIndexMem | ( | ) |
Returns array indices.
Definition at line 312 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 326 of file ssvectorbase.h.
R* altValues | ( | ) |
Returns array values.
Definition at line 319 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 857 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 891 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 539 of file basevectors.h.
Referenced by SSVectorBase< Real >::multAdd(), and SPxSolver::setupPupdate().
|
private |
Assignment helper.
Definition at line 604 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 570 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 798 of file basevectors.h.
Referenced by SSVectorBase< Real >::multAdd(), and SPxSolver::setupPupdate().
|
private |
Assignment helper.
Definition at line 754 of file basevectors.h.
Referenced by SSVectorBase< Real >::~SSVectorBase().
|
private |
Assignment helper.
Definition at line 640 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 478 of file basevectors.h.
Referenced by SSVectorBase< Real >::multAdd(), SPxLeastSqSC::scale(), soplex::updateScale(), and soplex::updateScaleFinal().
void clear | ( | ) |
Clears vector.
Definition at line 603 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 254 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 270 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 563 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 163 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 100 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 105 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 175 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 294 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 306 of file ssvectorbase.h.
Referenced by UpdateVector::idx(), SPxSolver::perturbMax(), and SPxSolver::perturbMin().
bool isConsistent | ( | ) | const |
consistency check.
Definition at line 620 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 121 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 551 of file ssvectorbase.h.
Referenced by SPxBasis::condition(), and SPxSolver::leave().
R length2 | ( | ) | const |
Squared euclidian norm.
Definition at line 535 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 514 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 482 of file ssvectorbase.h.
R operator* | ( | const SSVectorBase< S > & | w | ) |
Definition at line 432 of file ssvectorbase.h.
SSVectorBase<R>& operator*= | ( | S | x | ) |
Scaling.
Definition at line 417 of file ssvectorbase.h.
SSVectorBase<R>& operator+= | ( | const VectorBase< S > & | vec | ) |
Addition.
Definition at line 340 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 359 of file ssvectorbase.h.
SSVectorBase<R>& operator-= | ( | const VectorBase< S > & | vec | ) |
Subtraction.
Definition at line 377 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 396 of file ssvectorbase.h.
SSVectorBase<R>& operator= | ( | const SSVectorBase< S > & | rhs | ) |
Assignment operator.
Definition at line 776 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::operator=().
SSVectorBase<R>& operator= | ( | const SSVectorBase< R > & | rhs | ) |
Assignment operator.
Definition at line 822 of file ssvectorbase.h.
SSVectorBase< R > & operator= | ( | const SVectorBase< S > & | rhs | ) |
Assignment operator.
Definition at line 925 of file basevectors.h.
SSVectorBase<R>& operator= | ( | const VectorBase< S > & | rhs | ) |
Assignment operator.
Definition at line 872 of file ssvectorbase.h.
R operator[] | ( | int | i | ) | const |
Returns i
'th value.
Definition at line 288 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 192 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 569 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 594 of file ssvectorbase.h.
void scaleValue | ( | int | i, |
int | scaleExp | ||
) |
Scale i
'th element by a.
Definition at line 243 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 111 of file ssvectorbase.h.
Referenced by SoPlex::_computeInfeasBox(), and SPxSteepPR::setType().
|
private |
Allocates enough space to accommodate newmax
values.
Definition at line 66 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 584 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 133 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 722 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 219 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 200 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 127 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 183 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 300 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 53 of file ssvectorbase.h.
|
friend |
Definition at line 51 of file ssvectorbase.h.
|
friend |
Definition at line 52 of file ssvectorbase.h.
|
private |
A value x with |x| < epsilon is considered zero.
Definition at line 63 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 60 of file ssvectorbase.h.
Referenced by SSVectorBase< Real >::assign2productAndSetup(), SSVectorBase< Real >::isSetup(), and SSVectorBase< Real >::setup_and_assign().