ssvectorbase.h
Go to the documentation of this file.
38 * This class implements semi-sparse vectors. Such are #DVectorBase%s where the indices of its nonzero elements can be 39 * stored in an extra IdxSet. Only elements with absolute value > #epsilon are considered to be nonzero. Since really 40 * storing the nonzeros is not always convenient, an SSVectorBase provides two different stati: setup and not setup. 41 * An SSVectorBase being setup means that the nonzero indices are available, otherwise an SSVectorBase is just an 42 * ordinary DVectorBase with an empty IdxSet. Note that due to arithmetic operation, zeros can slip in, i.e., it is 54 // ------------------------------------------------------------------------------------------------------------------ 79 // ------------------------------------------------------------------------------------------------------------------ 82 * An SSVectorBase can be set up or not. In case it is set up, its IdxSet correctly contains all indices of nonzero 83 * elements of the SSVectorBase. Otherwise, it does not contain any useful data. Whether or not an SSVectorBase is 90 * - setup(): This method initializes the IdxSet to the SSVectorBase's nonzero indices and sets the status to 93 * - forceSetup(): This method sets the status to ``setup'' without verifying that the IdxSet correctly contains all 131 /// Initializes nonzero indices for elements with absolute values above #epsilon and sets all other elements to 0. 169 // ------------------------------------------------------------------------------------------------------------------ 271 // ------------------------------------------------------------------------------------------------------------------ 322 // ------------------------------------------------------------------------------------------------------------------ 527 // ------------------------------------------------------------------------------------------------------------------ 624 // ------------------------------------------------------------------------------------------------------------------ 658 /** The redundancy with the copy constructor below is necessary since otherwise the compiler doesn't realize that it 861 // ------------------------------------------------------------------------------------------------------------------
SSVectorBase< R > & assign2productFull(const SVSetBase< S > &A, const SSVectorBase< T > &x) Assignment helper. Definition: basevectors.h:717 void reDim(int newdim, const bool setZero=true) Resets DVectorBase's dimension to newdim. Definition: dvectorbase.h:249 VectorBase< R > & operator=(const VectorBase< S > &vec) Assignment operator. Definition: vectorbase.h:111 Memory allocation routines. SSVectorBase< R > & assign(const SVectorBase< S > &rhs) Assigns only the elements of rhs. Definition: basevectors.h:818 Dynamic dense vectors.Class DVectorBase is a derived class of VectorBase adding automatic memory mana... Definition: dvectorbase.h:48 Dense vector.Class VectorBase provides dense linear algebra vectors. It does not provide memory manag... Definition: dsvectorbase.h:28 Set of indices. SSVectorBase< R > & operator-=(const VectorBase< S > &vec) Subtraction. Definition: ssvectorbase.h:362 SSVectorBase< R > & operator+=(const SSVectorBase< S > &vec) Addition. Definition: ssvectorbase.h:346 SSVectorBase< R > & assign2product1(const SVSetBase< S > &A, const SSVectorBase< T > &x) Assignment helper. Definition: basevectors.h:571 Dynamic sparse vectors.Class DSVectorBase implements dynamic sparse vectors, i.e. SVectorBases with a... Definition: dsvectorbase.h:42 SSVectorBase< R > & operator=(const SSVectorBase< R > &rhs) Assignment operator. Definition: ssvectorbase.h:790 int number(int i) const Returns the position number of index i, or -1 if i doesn't exist. Definition: ssvectorbase.h:191 SSVectorBase< R > & multAdd(S x, const VectorBase< T > &vec) Addition of a scaled vector. Definition: ssvectorbase.h:455 R operator*(const SSVectorBase< S > &w) Definition: ssvectorbase.h:417 Semi sparse vector.This class implements semi-sparse vectors. Such are DVectorBases where the indices... Definition: dsvectorbase.h:29 SSVectorBase< R > & assign2productAndSetup(const SVSetBase< S > &A, SSVectorBase< T > &x) Assigns SSVectorBase to thereby setting up x. Definition: basevectors.h:760 void reSize(int newsize) Resets DVectorBase's memory size to newsize. Definition: dvectorbase.h:266 int index(int n) const Returns index of the n 'th nonzero element. Definition: ssvectorbase.h:174 SSVectorBase< R > & assign2product(const SSVectorBase< S > &x, const SVSetBase< T > &A) Assigns to SSVectorBase. Definition: basevectors.h:507 void clearNum(int n) Sets n 'th nonzero element to 0 (index n must exist). Definition: ssvectorbase.h:258 int max() const returns the maximal number of indices which can be stored in IdxSet. Definition: idxset.h:129 #define MSG_ERROR(x) Prints out message x if the verbosity level is at least SPxOut::ERROR. Definition: spxdefines.h:109 void setEpsilon(R eps) Changes the non-zero epsilon, invalidating the setup. */. Definition: ssvectorbase.h:110 SSVectorBase< R > & multAdd(S xx, const SVectorBase< T > &vec) Addition of a scaled vector. Definition: basevectors.h:440 Real length() const Floating point approximation of euclidian norm (without any approximation guarantee). Definition: ssvectorbase.h:520 SSVectorBase< R > & operator-=(const SSVectorBase< S > &vec) Subtraction. Definition: ssvectorbase.h:381 Debugging, floating point type and parameter definitions. void setSize(int n) Sets number of nonzeros (thereby unSetup SSVectorBase). Definition: ssvectorbase.h:553 VectorBase< R > & multAdd(const S &x, const VectorBase< T > &vec) Addition of scaled vector. Definition: vectorbase.h:369 void setup_and_assign(SSVectorBase< S > &rhs) Sets up rhs vector, and assigns it. Definition: ssvectorbase.h:690 Everything should be within this namespace. void setMax(int newmax) Allocates enough space to accommodate newmax values. Definition: ssvectorbase.h:65 SSVectorBase< R > & operator=(const SSVectorBase< S > &rhs) Assignment operator. Definition: ssvectorbase.h:744 void setup() Initializes nonzero indices for elements with absolute values above epsilon and sets all other elemen... Definition: ssvectorbase.h:132 SSVectorBase< R > & operator=(const VectorBase< S > &rhs) Assignment operator. Definition: ssvectorbase.h:840 Sparse vectors.Class SVectorBase provides packed sparse vectors. Such are a sparse vectors... Definition: dvectorbase.h:31 SSVectorBase< R > & assign2productShort(const SVSetBase< S > &A, const SSVectorBase< T > &x) Assignment helper. Definition: basevectors.h:606 Set of indices.Class IdxSet provides a set of indices. At construction it must be given an array of i... Definition: idxset.h:56 Sparse vector set.Class SVSetBase provides a set of sparse vectors SVectorBase. All SVectorBases in a... Definition: ssvectorbase.h:33 Dynamic dense vectors. SSVectorBase< R > & assign2product4setup(const SVSetBase< S > &A, const SSVectorBase< T > &x) Assigns SSVectorBase to for a setup x. Definition: basevectors.h:538 |