26 #ifndef UQ_GSL_VECTOR_H 
   27 #define UQ_GSL_VECTOR_H 
   33 #include <queso/Defines.h> 
   34 #include <queso/Vector.h> 
   36 #include <gsl/gsl_vector.h> 
  101       const double& 
operator[](
unsigned int i) 
const;
 
  119   double       norm2            () 
const;
 
  122   double       norm1            () 
const;
 
  133   void         cwSet            (
double value);
 
  175   void         print            (std::ostream& os) 
const;
 
  182   void         matlabDiff       (
unsigned int firstPositionToStoreDiff, 
double valueForRemainderPosition, 
GslVector& outputVec) 
const;
 
  188                                  const std::string&            fileName,
 
  189                                  const std::string&            fileType,
 
  190                                  const std::set<unsigned int>& allowedSubEnvIds) 
const;
 
  192                                  const std::string&            fileType,
 
  193                                  const std::set<unsigned int>& allowedSubEnvIds);
 
  211   gsl_vector*  
data                          () 
const;
 
  265   return *gsl_vector_ptr(
m_vec,i);
 
  273   return *gsl_vector_const_ptr(
m_vec,i);
 
  279 #endif // UQ_GSL_VECTOR_H 
void subReadContents(const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds)
 
void cwSetConcatenated(const GslVector &v1, const GslVector &v2)
This function concatenates GslVector v1 and GslVector v2 into this. 
 
Class for vector operations (virtual). 
 
void cwSqrt()
This function returns component-wise the square-root of this. 
 
void sort()
This function sorts the elements of the vector this in ascending numerical order. ...
 
void cwSetGamma(const GslVector &a, const GslVector &b)
This function returns a random variate from the gamma distribution with vector parameters a and b...
 
bool atLeastOneComponentSmallerThan(const GslVector &rhs) const 
This function returns true if at least one component of this is smaller than the respective component...
 
GslVector & operator+=(const GslVector &rhs)
Stores in this the coordinate-wise addition of this and rhs. 
 
double getMinValue() const 
Returns minimum value in the vector this. 
 
void cwSetInverseGamma(const GslVector &alpha, const GslVector &beta)
This function returns a random variate from the inverse gamma distribution with vector parameters alp...
 
void getMaxValueAndIndex(double &value, int &index)
This function returns maximum value in the vector this and its the index. 
 
void cwSetBeta(const GslVector &alpha, const GslVector &beta)
This function returns a random variate from the beta distribution, with vector parameters alpha and b...
 
A class for partitioning vectors and matrices. 
 
void cwExtract(unsigned int initialPos, GslVector &vec) const 
This function sets the values of this starting at position initialPos ans saves them in vector vec...
 
GslVector & operator-=(const GslVector &rhs)
Stores in this the coordinate-wise subtraction of this by rhs. 
 
bool atLeastOneComponentBiggerOrEqualThan(const GslVector &rhs) const 
This function returns true if at least one component of this is bigger than or equal to the respectiv...
 
void matlabLinearInterpExtrap(const GslVector &x1Vec, const GslVector &y1Vec, const GslVector &x2Vec)
 
GslVector()
Default Constructor. 
 
GslMatrix operator*(double a, const GslMatrix &mat)
 
unsigned int sizeGlobal() const 
Returns the global length of this vector. 
 
double getMaxValue() const 
Returns the maximum value in the vector this. 
 
void mpiAllQuantile(double probability, const MpiComm &opComm, GslVector &resultVec) const 
 
void cwSet(double value)
Component-wise sets all values to this with value. 
 
GslVector operator/(double a, const GslVector &x)
 
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
 
GslVector abs() const 
This function returns absolute value of elements in this. 
 
double norm2Sq() const 
Returns the 2-norm squared of this vector. 
 
GslVector & operator=(const GslVector &rhs)
Copies values from vector rhs to this. 
 
int getMaxValueIndex() const 
This function returns the index of the maximum value in the vector this. 
 
double & operator[](unsigned int i)
Element access method (non-const). 
 
void mpiAllReduce(RawType_MPI_Op mpiOperation, const MpiComm &opComm, GslVector &resultVec) const 
 
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
 
void print(std::ostream &os) const 
Print method. Defines the behavior of the std::ostream << operator inherited from the Object class...
 
double sumOfComponents() const 
Returns the sum of the components of the vector. 
 
int getMinValueIndex() const 
This function returns the index of the minimum value in the vector this. 
 
gsl_vector * data() const 
 
GslVector & operator/=(double a)
Stores in this the coordinate-wise division of this by a. 
 
unsigned int sizeLocal() const 
Returns the length of this vector. 
 
GslVector & operator*=(double a)
Stores in this the coordinate-wise multiplication of this and a. 
 
GslMatrix operator-(const GslMatrix &m1, const GslMatrix &m2)
 
void copy(const GslVector &src)
This function copies the elements of the vector src into this. 
 
void cwInvert()
This function inverts component-wise the element values of this. 
 
double normInf() const 
Returns the infinity-norm (maximum norm) of the vector. 
 
GslMatrix operator+(const GslMatrix &m1, const GslMatrix &m2)
 
bool atLeastOneComponentBiggerThan(const GslVector &rhs) const 
This function returns true if at least one component of this is bigger than the respective component ...
 
bool atLeastOneComponentSmallerOrEqualThan(const GslVector &rhs) const 
This function returns true if at least one component of this is smaller than or equal to the respecti...
 
gsl_vector * m_vec
GSL vector. 
 
Class for vector operations using GSL library. 
 
double norm1() const 
Returns the 1-norm of the vector. 
 
bool operator==(const GslVector &lhs, const GslVector &rhs)
 
void subWriteContents(const std::string &varNamePrefix, const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds) const 
 
The QUESO MPI Communicator Class. 
 
void matlabDiff(unsigned int firstPositionToStoreDiff, double valueForRemainderPosition, GslVector &outputVec) const 
 
const BaseEnvironment & env() const 
 
void mpiBcast(int srcRank, const MpiComm &bcastComm)
 
void getMinValueAndIndex(double &value, int &index)
This function returns minimum value in the vector this and its the index. 
 
void cwSetUniform(const GslVector &aVec, const GslVector &bVec)
This function sets component-wise a number uniformly distributed in the range of elements of [aVec...
 
double norm2() const 
Returns the 2-norm (Euclidean norm) of the vector. 
 
void cwSetGaussian(double mean, double stdDev)
This function sets component-wise Gaussian random variates, with mean mean and standard deviation std...
 
double scalarProduct(const GslVector &x, const GslVector &y)