25 #ifndef UQ_VECTOR_SPACE_H
26 #define UQ_VECTOR_SPACE_H
28 #include <queso/DistArray.h>
29 #include <queso/Map.h>
30 #include <queso/VectorSet.h>
46 template <
class V = GslVector,
class M = GslMatrix>
47 class VectorSpace :
public VectorSet<V,M>
57 unsigned int dimGlobalValue,
67 const BaseEnvironment&
env ()
const;
71 const Map&
map ()
const;
139 void print (std::ostream& os)
const;
145 using VectorSet<V,M>::m_env;
146 using VectorSet<V,M>::m_prefix;
147 using VectorSet<V,M>::m_volume;
180 #endif // UQ_VECTOR_SPACE_H
void printComponentsNames(std::ostream &os, bool printHorizontally) const
Prints the local component names.
void print(std::ostream &os) const
Prints only a message.
const V & zeroVector() const
Returns a vector filled with zeros.
const DistArray< std::string > * componentsNamesArray() const
Access to private attribute m_componentsNamesArray, which is an instance of DistArray.
unsigned int dimGlobal() const
M * newProposalMatrix(const V *varVec, const V *auxVec) const
Creates a diagonal matrix conditionally to values from vector varVec, guaranteeing that its values ar...
A class for partitioning vectors and matrices.
A class representing a vector space.
std::string m_emptyComponentName
Empty string for the components names.
const std::string & prefix() const
Access to private attribute m_prefix.
const std::string & localComponentName(unsigned int localComponentId) const
Returns the local component names.
M * newMatrix() const
Creates an empty matrix of size given by Map& map. See template specialization.
unsigned int numOfProcsForStorage() const
Returns total number of processes.
Map * newMap()
Creates a new map. See template specialization.
const BaseEnvironment & env() const
Environment.
bool contains(const V &vec) const
Whether vector contains vector vec.
unsigned int m_dimLocal
Local dimension (number of elements owned by the calling processor.).
V * newVector() const
Creates an empty vector of size given by Map& map. See template specialization.
DistArray< std::string > * m_componentsNamesVec
Vector of strings of the type DistArray to store the names of the components.
~VectorSpace()
Destructor.
DistArray< std::string > * m_componentsNamesArray
Array of strings of the type DistArray to store the names of the components.
unsigned int globalIdOfFirstComponent() const
unsigned int dimLocal() const
VectorSpace()
Default constructor.
void centroid(V &vec) const
The (INFINITY/nonexistent) centroid of the space.
const Map & map() const
Map.
V * m_zeroVector
A vector of all elements equal to zero.
const VectorSpace< V, M > & vectorSpace() const
Accessor method to this. Vector space to which this vector set belongs to.
void moments(M &vec) const
The (INFINITY/nonexistent) matrix of second moments of the space.
unsigned int m_dimGlobal
Global dimension.
const std::vector< std::string > * componentsNamesVec() const
Access to private attribute m_componentsNamesVec.
M * newDiagMatrix(const V &v) const
Creates a diagonal matrix with the elements and size of vector v.