Loading...
Searching...
No Matches
ssvectorbase.h
Go to the documentation of this file.
49 * This class implements semi-sparse vectors. Such are #VectorBase%s where the indices of its nonzero elements can be
50 * stored in an extra IdxSet. Only elements with absolute value > #epsilon are considered to be nonzero. Since really
51 * storing the nonzeros is not always convenient, an SSVectorBase provides two different stati: setup and not setup.
52 * An SSVectorBase being setup means that the nonzero indices are available, otherwise an SSVectorBase is just an
53 * ordinary VectorBase with an empty IdxSet. Note that due to arithmetic operation, zeros can slip in, i.e., it is
64 // ------------------------------------------------------------------------------------------------------------------
89 // ------------------------------------------------------------------------------------------------------------------
92 * An SSVectorBase can be set up or not. In case it is set up, its IdxSet correctly contains all indices of nonzero
93 * elements of the SSVectorBase. Otherwise, it does not contain any useful data. Whether or not an SSVectorBase is
100 * - setup(): This method initializes the IdxSet to the SSVectorBase's nonzero indices and sets the status to
103 * - forceSetup(): This method sets the status to ``setup'' without verifying that the IdxSet correctly contains all
141 /// Initializes nonzero indices for elements with absolute values above #epsilon and sets all other elements to 0.
179 // ------------------------------------------------------------------------------------------------------------------
292 // ------------------------------------------------------------------------------------------------------------------
343 // ------------------------------------------------------------------------------------------------------------------
568 // ------------------------------------------------------------------------------------------------------------------
666 // ------------------------------------------------------------------------------------------------------------------
700 /** The redundancy with the copy constructor below is necessary since otherwise the compiler doesn't realize that it
int max() const returns the maximal number of indices which can be stored in IdxSet. Definition idxset.h:138 SSVectorBase< R > & assign2productShort(const SVSetBase< S > &A, const SSVectorBase< T > &x) Assignment helper. Definition basevectors.h:647 SSVectorBase< R > & assign2product1(const SVSetBase< S > &A, const SSVectorBase< T > &x) Assignment helper. Definition basevectors.h:611 SSVectorBase< R > & multAdd(S xx, const SVectorBase< T > &vec) Addition of a scaled vector. Definition basevectors.h:389 R length() const Floating point approximation of euclidian norm (without any approximation guarantee). Definition ssvectorbase.h:561 SSVectorBase< R > & assign(const SVectorBase< S > &rhs) Assigns only the elements of rhs. Definition basevectors.h:863 SSVectorBase< R > & assign2product4setup(const SVSetBase< S > &A, const SSVectorBase< T > &x, Timer *timeSparse, Timer *timeFull, int &nCallsSparse, int &nCallsFull) Assigns SSVectorBase to for a setup x. Definition basevectors.h:550 void setup() Initializes nonzero indices for elements with absolute values above epsilon and sets all other elemen... Definition ssvectorbase.h:142 SSVectorBase< R > & assign2product(const SSVectorBase< S > &x, const SVSetBase< T > &A) Assigns to SSVectorBase. Definition basevectors.h:519 SSVectorBase< R > & operator-=(const SSVectorBase< S > &vec) Subtraction. Definition ssvectorbase.h:405 int pos(int i) const Finds the position of index i in the IdxSet, or -1 if i doesn't exist. Definition ssvectorbase.h:201 void setEpsilon(R eps) Changes the non-zero epsilon, invalidating the setup. */. Definition ssvectorbase.h:120 SSVectorBase< R > & assignPWproduct4setup(const SSVectorBase< S > &x, const SSVectorBase< T > &y) Assigns pair wise vector product to SSVectorBase. Definition basevectors.h:458 SSVectorBase< R > & operator=(const SSVectorBase< S > &rhs) Assignment operator. Definition ssvectorbase.h:786 SSVectorBase< R > & operator=(const SSVectorBase< R > &rhs) Assignment operator. Definition ssvectorbase.h:832 SSVectorBase< R > & multAdd(S x, const VectorBase< T > &vec) Addition of a scaled vector. Definition ssvectorbase.h:491 void setSize(int n) Sets number of nonzeros (thereby unSetup SSVectorBase). Definition ssvectorbase.h:594 void setup_and_assign(SSVectorBase< S > &rhs) Sets up rhs vector, and assigns it. Definition ssvectorbase.h:732 void setMax(int newmax) Allocates enough space to accommodate newmax values. Definition ssvectorbase.h:75 SSVectorBase< R > & assign2productFull(const SVSetBase< S > &A, const SSVectorBase< T > &x) Assignment helper. Definition basevectors.h:761 SSVectorBase< R > & operator=(const VectorBase< S > &rhs) Assignment operator. Definition ssvectorbase.h:882 void clearNum(int n) Sets n 'th nonzero element to 0 (index n must exist). Definition ssvectorbase.h:279 SSVectorBase< R > & assign2productAndSetup(const SVSetBase< S > &A, SSVectorBase< T > &x) Assigns SSVectorBase to thereby setting up x. Definition basevectors.h:805 VectorBase< R > & operator=(const VectorBase< S > &vec) Assignment operator. Definition vectorbase.h:157 void reDim(int newdim, const bool setZero=true) Resets VectorBase's dimension to newdim. Definition vectorbase.h:541 VectorBase< R > & multAdd(const S &x, const VectorBase< T > &vec) Addition of scaled vector. Definition vectorbase.h:458 Set of indices. Everything should be within this namespace. Memory allocation routines. Debugging, floating point type and parameter definitions. #define MSG_ERROR(x) Prints out message x if the verbosity level is at least SPxOut::ERROR. Definition spxdefines.h:162 Timer class. Dense vector.
|