SoPlex
|
SVectorBase with prev/next pointers. More...
Public Member Functions | |
Construction / destruction | |
DLPSV () | |
Default constructor. | |
DLPSV (const DLPSV ©) | |
Copy constructor. | |
DLPSV (DLPSV &©) | |
move constructor. | |
DLPSV & | operator= (DLPSV &&rhs) |
move assignment operator. | |
DLPSV & | operator= (const DLPSV &rhs) |
Assignment operator. | |
Successor / predecessor | |
DLPSV *& | next () |
Next SVectorBase. | |
DLPSV *const & | next () const |
Next SVectorBase. | |
DLPSV *const & | prev () const |
Previous SVectorBase. | |
DLPSV *& | prev () |
Previous SVectorBase. | |
![]() | |
SVectorBase< Real > & | operator= (const VectorBase< S > &vec) |
Assignment operator (specialization for Real). | |
Real | operator* (const SVectorBase< S > &w) const |
specialization for inner product for sparse vectors | |
int | size () const |
Number of used indices. | |
int | max () const |
Maximal number of indices. | |
int | dim () const |
Dimension of the vector defined as maximal index + 1. | |
int | pos (int i) const |
Position of index i . | |
R | operator[] (int i) const |
Value to index i . | |
Nonzero< R > & | element (int n) |
Reference to the n 'th nonzero element. | |
const Nonzero< R > & | element (int n) const |
The n 'th nonzero element. | |
int & | index (int n) |
Reference to index of n 'th nonzero. | |
int | index (int n) const |
Index of n 'th nonzero. | |
R & | value (int n) |
Reference to value of n 'th nonzero. | |
const R & | value (int n) const |
Value of n 'th nonzero. | |
void | add (int i, const R &v) |
Append one nonzero (i,v). | |
void | add (int i) |
Append one uninitialized nonzero. | |
void | add (const SVectorBase &sv) |
Append nonzeros of sv . | |
void | add (int n, const int i[], const R v[]) |
Append n nonzeros. | |
template<class S> | |
void | add (int n, const int i[], const S v[]) |
Append n nonzeros. | |
void | add (int n, const Nonzero< R > e[]) |
Append n nonzeros. | |
void | remove (int n, int m) |
Remove nonzeros n thru m . | |
void | remove (int n) |
Remove n 'th nonzero. | |
void | clear () |
Remove all indices. | |
void | sort () |
Sort nonzeros to increasing indices. | |
R | maxAbs () const |
Maximum absolute value, i.e., infinity norm. | |
R | minAbs () const |
Minimum absolute value. | |
R | length () const |
Floating point approximation of euclidian norm (without any approximation guarantee). | |
R | length2 () const |
Squared norm. | |
SVectorBase< R > & | operator*= (const R &x) |
Scaling. | |
R | operator* (const VectorBase< R > &w) const |
Inner product. | |
template<class S> | |
R | operator* (const SVectorBase< S > &w) const |
inner product for sparse vectors | |
SVectorBase (int n=0, Nonzero< R > *p_mem=nullptr) | |
Default constructor. | |
SVectorBase (const SVectorBase< R > &sv)=default | |
template<class S> | |
SVectorBase< R > & | operator= (const VectorBase< S > &vec) |
Assignment operator. | |
SVectorBase< R > & | operator= (const SVectorBase< R > &sv) |
Assignment operator. | |
SVectorBase< R > & | operator= (const SVectorBase< R > &&sv) |
move assignement operator. | |
template<class S> | |
SVectorBase< R > & | operator= (const SVectorBase< S > &sv) |
Assignment operator. | |
SVectorBase< Real > & | scaleAssign (int scaleExp, const SVectorBase< Real > &sv) |
scale and assign | |
SVectorBase< Real > & | scaleAssign (const int *scaleExp, const SVectorBase< Real > &sv, bool negateExp=false) |
scale and assign | |
template<class S> | |
SVectorBase< R > & | assignArray (const S *rowValues, const int *rowIndices, int rowSize) |
Assignment operator. | |
template<class S> | |
SVectorBase< R > & | operator= (const SSVectorBase< S > &sv) |
Assignment operator. | |
Nonzero< R > * | mem () const |
get pointer to internal memory. | |
void | set_size (int s) |
Set size of the vector. | |
void | set_max (int m) |
Set the maximum number of nonzeros in the vector. | |
void | setMem (int n, Nonzero< R > *elmem) |
Set the memory area where the nonzeros will be stored. | |
bool | isConsistent () const |
Consistency check. | |
bool | hasNaNs () const |
Checks whether the array contains any nan entries. | |
bool | hasInfs () const |
Checks whether the array contains any NaN entries. | |
Private Attributes | |
Data | |
DLPSV * | thenext |
next SVectorBase | |
DLPSV * | theprev |
previous SVectorBase | |
Additional Inherited Members | |
![]() | |
typedef Nonzero< R > | Element |
SVectorBase with prev/next pointers.
The management of the SVectorBases is implemented by a DataSet<DLPSV>, the keys used externally are DataKeys.
The management of nonzeros is done by a Real linked list IdList<DLPSV>, where the SVectorBases are kept in the order in which their indices occurr in the Array. The SVectorBases are kept without holes: If one is removed or moved to the end, the SVectorBase preceeding it obtains the space for all the nonzeros that previously belonged to the (re-)moved one. However, the nonzeros in use are uneffected by this.
Definition at line 91 of file svsetbase.h.
DLPSV | ( | ) |
Default constructor.
Definition at line 111 of file svsetbase.h.
References SVectorBase< R >::SVectorBase, thenext, and theprev.
Referenced by DLPSV(), DLPSV(), next(), next(), operator=(), operator=(), prev(), and prev().
Copy constructor.
Definition at line 119 of file svsetbase.h.
References DLPSV(), and SVectorBase< R >::SVectorBase.
move constructor.
Definition at line 124 of file svsetbase.h.
References DLPSV(), and SVectorBase< R >::SVectorBase.
DLPSV *& next | ( | ) |
DLPSV *const & next | ( | ) | const |
Assignment operator.
Definition at line 143 of file svsetbase.h.
References DLPSV(), and SVectorBase< R >::operator=().
move assignment operator.
Definition at line 129 of file svsetbase.h.
References DLPSV(), SVectorBase< R >::operator=(), thenext, and theprev.
DLPSV *& prev | ( | ) |
DLPSV *const & prev | ( | ) | const |
|
private |
next SVectorBase
Definition at line 99 of file svsetbase.h.
Referenced by DLPSV(), next(), next(), and operator=().
|
private |
previous SVectorBase
Definition at line 100 of file svsetbase.h.
Referenced by DLPSV(), operator=(), prev(), and prev().