queso-0.52.0
|
Class for vector operations using GSL library. More...
#include <GslVector.h>
Public Member Functions | |
void | sort () |
This function sorts the elements of the vector this in ascending numerical order. More... | |
void | matlabDiff (unsigned int firstPositionToStoreDiff, double valueForRemainderPosition, GslVector &outputVec) const |
void | matlabLinearInterpExtrap (const GslVector &x1Vec, const GslVector &y1Vec, const GslVector &x2Vec) |
void | mpiBcast (int srcRank, const MpiComm &bcastComm) |
void | mpiAllReduce (RawType_MPI_Op mpiOperation, const MpiComm &opComm, GslVector &resultVec) const |
void | mpiAllQuantile (double probability, const MpiComm &opComm, GslVector &resultVec) const |
void | subWriteContents (const std::string &varNamePrefix, const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds) const |
void | subReadContents (const std::string &fileName, const std::string &fileType, const std::set< unsigned int > &allowedSubEnvIds) |
gsl_vector * | data () const |
Constructor/Destructor methods. | |
GslVector () | |
Default Constructor. More... | |
GslVector (const BaseEnvironment &env, const Map &map) | |
GslVector (const BaseEnvironment &env, const Map &map, double value) | |
GslVector (const BaseEnvironment &env, double d1, double d2, const Map &map) | |
GslVector (const GslVector &v, double start, double end) | |
Construct a vector, with length the same as v , with evenly spaced numbers from start to end , inclusive. More... | |
GslVector (const GslVector &y) | |
~GslVector () | |
Destructor. More... | |
Set methods. | |
GslVector & | operator= (const GslVector &rhs) |
Copies values from vector rhs to this . More... | |
GslVector & | operator*= (double a) |
Stores in this the coordinate-wise multiplication of this and a. More... | |
GslVector & | operator/= (double a) |
Stores in this the coordinate-wise division of this by a. More... | |
GslVector & | operator*= (const GslVector &rhs) |
Stores in this the coordinate-wise multiplication of this with rhs. More... | |
GslVector & | operator/= (const GslVector &rhs) |
Stores in this the coordinate-wise division of this by rhs. More... | |
GslVector & | operator+= (const GslVector &rhs) |
Stores in this the coordinate-wise addition of this and rhs. More... | |
GslVector & | operator-= (const GslVector &rhs) |
Stores in this the coordinate-wise subtraction of this by rhs. More... | |
void | cwSet (double value) |
Component-wise sets all values to this with value. More... | |
void | cwSetGaussian (double mean, double stdDev) |
This function sets component-wise Gaussian random variates, with mean mean and standard deviation stdDev. More... | |
void | cwSetGaussian (const GslVector &meanVec, const GslVector &stdDevVec) |
This function sets component-wise Gaussian random variates, with vectors for mean and standard deviation. More... | |
void | cwSetUniform (const GslVector &aVec, const GslVector &bVec) |
This function sets component-wise a number uniformly distributed in the range of elements of [aVec,bVec]. More... | |
void | cwSetBeta (const GslVector &alpha, const GslVector &beta) |
This function returns a random variate from the beta distribution, with vector parameters alpha and beta. More... | |
void | cwSetGamma (const GslVector &a, const GslVector &b) |
This function returns a random variate from the gamma distribution with vector parameters a and b. More... | |
void | cwSetInverseGamma (const GslVector &alpha, const GslVector &beta) |
This function returns a random variate from the inverse gamma distribution with vector parameters alpha and beta. More... | |
void | cwSetConcatenated (const GslVector &v1, const GslVector &v2) |
This function concatenates GslVector v1 and GslVector v2 into this . More... | |
void | cwSetConcatenated (const std::vector< const GslVector * > &vecs) |
This function concatenates vectors v1 and v2 into this vector. More... | |
void | cwSet (unsigned int initialPos, const GslVector &vec) |
This function sets the vector vec into this starting at position initialPos. More... | |
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. More... | |
void | cwInvert () |
This function inverts component-wise the element values of this . More... | |
void | cwSqrt () |
This function returns component-wise the square-root of this . More... | |
Accessor methods. | |
double & | operator[] (unsigned int i) |
Element access method (non-const). More... | |
const double & | operator[] (unsigned int i) const |
Element access method (const). More... | |
Attribute methods. | |
unsigned int | sizeLocal () const |
Returns the length of this vector. More... | |
unsigned int | sizeGlobal () const |
Returns the global length of this vector. More... | |
double | getMaxValue () const |
Returns the maximum value in the vector this . More... | |
double | getMinValue () const |
Returns minimum value in the vector this . More... | |
int | getMaxValueIndex () const |
This function returns the index of the maximum value in the vector this . More... | |
int | getMinValueIndex () const |
This function returns the index of the minimum value in the vector this . More... | |
void | getMaxValueAndIndex (double &value, int &index) |
This function returns maximum value in the vector this and its the index. More... | |
void | getMinValueAndIndex (double &value, int &index) |
This function returns minimum value in the vector this and its the index. More... | |
GslVector | abs () const |
This function returns absolute value of elements in this . More... | |
Mathematical methods. | |
double | norm2Sq () const |
Returns the 2-norm squared of this vector. More... | |
double | norm2 () const |
Returns the 2-norm (Euclidean norm) of the vector. More... | |
double | norm1 () const |
Returns the 1-norm of the vector. More... | |
double | normInf () const |
Returns the infinity-norm (maximum norm) of the vector. More... | |
double | sumOfComponents () const |
Returns the sum of the components of the vector. More... | |
I/O methods. | |
void | print (std::ostream &os) const |
Print method. Defines the behavior of the std::ostream << operator inherited from the Object class. More... | |
Comparison methods. | |
bool | atLeastOneComponentSmallerThan (const GslVector &rhs) const |
This function returns true if at least one component of this is smaller than the respective component of rhs. More... | |
bool | atLeastOneComponentBiggerThan (const GslVector &rhs) const |
This function returns true if at least one component of this is bigger than the respective component of rhs. More... | |
bool | atLeastOneComponentSmallerOrEqualThan (const GslVector &rhs) const |
This function returns true if at least one component of this is smaller than or equal to the respective component of rhs. More... | |
bool | atLeastOneComponentBiggerOrEqualThan (const GslVector &rhs) const |
This function returns true if at least one component of this is bigger than or equal to the respective component of rhs. More... | |
Public Member Functions inherited from QUESO::Vector | |
Vector () | |
Default Constructor. More... | |
Vector (const BaseEnvironment &env, const Map &map) | |
Shaped Constructor. More... | |
Vector (const Vector &rhs) | |
Copy Constructor. More... | |
virtual | ~Vector () |
Virtual Destructor. More... | |
Vector & | operator= (const Vector &rhs) |
Operator for copying a vector. More... | |
Vector & | operator*= (double a) |
Operator for multiplication of the vector by a scalar. More... | |
Vector & | operator/= (double a) |
Operator for division of the vector by a scalar. More... | |
Vector & | operator+= (const Vector &rhs) |
Operator for addition (element-wise) of two vectors. More... | |
Vector & | operator-= (const Vector &rhs) |
Operator for subtraction (element-wise) of two vectors. More... | |
const BaseEnvironment & | env () const |
const Map & | map () const |
unsigned int | numOfProcsForStorage () const |
void | setPrintHorizontally (bool value) const |
Determines whether vector should be printed horizontally. More... | |
bool | getPrintHorizontally () const |
Checks if vector is printed horizontally. More... | |
void | setPrintScientific (bool value) const |
Determines whether vector should be printed in Scientific Notation. More... | |
bool | getPrintScientific () const |
Checks if the vector should be printed in Scientific Notation. More... | |
Private Member Functions | |
void | copy (const GslVector &src) |
This function copies the elements of the vector src into this . More... | |
Private Attributes | |
gsl_vector * | m_vec |
GSL vector. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QUESO::Vector | |
virtual void | copy (const Vector &src) |
Copies vector src to this matrix. More... | |
Protected Attributes inherited from QUESO::Vector | |
const BaseEnvironment & | m_env |
Environment variable. More... | |
const Map & | m_map |
Mapping variable. More... | |
bool | m_printHorizontally |
Flag for either or not print this matrix horizontally. More... | |
bool | m_printScientific |
Flag for either or not print this matrix in scientific notation. More... | |
Class for vector operations using GSL library.
This class creates and provides basic support for vectors of templated type as a specialization of Vector using GSL vectors, which are defined by an encapsulated gsl_vector structure.
Definition at line 48 of file GslVector.h.
QUESO::GslVector::GslVector | ( | ) |
Default Constructor.
Creates an empty vector of no length.
Definition at line 32 of file GslVector.C.
References QUESO::Vector::m_env, UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::GslVector::GslVector | ( | const BaseEnvironment & | env, |
const Map & | map | ||
) |
Definition at line 42 of file GslVector.C.
References QUESO::Vector::m_env, QUESO::Vector::m_map, m_vec, QUESO::Map::NumGlobalElements(), QUESO::Map::NumMyElements(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::GslVector::GslVector | ( | const BaseEnvironment & | env, |
const Map & | map, | ||
double | value | ||
) |
Definition at line 78 of file GslVector.C.
References cwSet(), QUESO::Vector::m_env, QUESO::Vector::m_map, m_vec, QUESO::Map::NumGlobalElements(), QUESO::Map::NumMyElements(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::GslVector::GslVector | ( | const BaseEnvironment & | env, |
double | d1, | ||
double | d2, | ||
const Map & | map | ||
) |
Definition at line 110 of file GslVector.C.
References QUESO::Vector::m_env, QUESO::Vector::m_map, m_vec, QUESO::Map::NumGlobalElements(), QUESO::Map::NumMyElements(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::GslVector::GslVector | ( | const GslVector & | v, |
double | start, | ||
double | end | ||
) |
Construct a vector, with length the same as v
, with evenly spaced numbers from start
to end
, inclusive.
Definition at line 145 of file GslVector.C.
References QUESO::Vector::m_env, QUESO::Vector::m_map, m_vec, QUESO::Vector::map(), QUESO::Map::NumGlobalElements(), QUESO::Map::NumMyElements(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::GslVector::GslVector | ( | const GslVector & | y | ) |
Definition at line 180 of file GslVector.C.
References copy(), QUESO::Vector::m_env, QUESO::Vector::m_map, m_vec, QUESO::Vector::map(), QUESO::Map::NumGlobalElements(), QUESO::Map::NumMyElements(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
QUESO::GslVector::~GslVector | ( | ) |
GslVector QUESO::GslVector::abs | ( | ) | const |
This function returns absolute value of elements in this
.
Definition at line 1304 of file GslVector.C.
References sizeLocal().
Referenced by QUESO::GslMatrix::largestEigen(), and QUESO::GslMatrix::smallestEigen().
bool QUESO::GslVector::atLeastOneComponentBiggerOrEqualThan | ( | const GslVector & | rhs | ) | const |
This function returns true if at least one component of this
is bigger than or equal to the respective component of rhs.
Definition at line 1243 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
bool QUESO::GslVector::atLeastOneComponentBiggerThan | ( | const GslVector & | rhs | ) | const |
This function returns true if at least one component of this
is bigger than the respective component of rhs.
Definition at line 1205 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
bool QUESO::GslVector::atLeastOneComponentSmallerOrEqualThan | ( | const GslVector & | rhs | ) | const |
This function returns true if at least one component of this
is smaller than or equal to the respective component of rhs.
Definition at line 1224 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
bool QUESO::GslVector::atLeastOneComponentSmallerThan | ( | const GslVector & | rhs | ) | const |
This function returns true if at least one component of this
is smaller than the respective component of rhs.
Definition at line 1186 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
|
private |
This function copies the elements of the vector src into this
.
Definition at line 329 of file GslVector.C.
References QUESO::Vector::copy(), QUESO::Vector::m_env, m_vec, UQ_FATAL_RC_MACRO, and QUESO::BaseEnvironment::worldRank().
Referenced by GslVector(), and operator=().
void QUESO::GslVector::cwExtract | ( | unsigned int | initialPos, |
GslVector & | vec | ||
) | const |
This function sets the values of this starting at position initialPos ans saves them in vector vec.
Definition at line 634 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
|
virtual |
This function inverts component-wise the element values of this
.
Implements QUESO::Vector.
Definition at line 654 of file GslVector.C.
References sizeLocal().
Referenced by QUESO::operator/().
|
virtual |
Component-wise sets all values to this
with value.
Implements QUESO::Vector.
Definition at line 435 of file GslVector.C.
References sizeLocal().
Referenced by QUESO::GslOptimizer::GslOptimizer(), GslVector(), and QUESO::GslMatrix::inverse().
void QUESO::GslVector::cwSet | ( | unsigned int | initialPos, |
const GslVector & | vec | ||
) |
This function sets the vector vec into this
starting at position initialPos.
Definition at line 614 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
This function returns a random variate from the beta distribution, with vector parameters alpha and beta.
Definition at line 474 of file GslVector.C.
References QUESO::RngBase::betaSample(), QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseEnvironment::fullRank(), QUESO::Vector::m_env, QUESO::BaseEnvironment::rngObject(), sizeLocal(), QUESO::BaseEnvironment::subDisplayFile(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
This function concatenates GslVector v1 and GslVector v2 into this
.
Definition at line 575 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
void QUESO::GslVector::cwSetConcatenated | ( | const std::vector< const GslVector * > & | vecs | ) |
This function concatenates vectors v1
and v2
into this
vector.
Definition at line 594 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
This function returns a random variate from the gamma distribution with vector parameters a and b.
Definition at line 537 of file GslVector.C.
References QUESO::RngBase::gammaSample(), QUESO::Vector::m_env, QUESO::BaseEnvironment::rngObject(), sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
|
virtual |
This function sets component-wise Gaussian random variates, with mean mean and standard deviation stdDev.
Implements QUESO::Vector.
Definition at line 446 of file GslVector.C.
References QUESO::RngBase::gaussianSample(), QUESO::Vector::m_env, QUESO::BaseEnvironment::rngObject(), and sizeLocal().
This function sets component-wise Gaussian random variates, with vectors for mean and standard deviation.
Definition at line 456 of file GslVector.C.
References QUESO::RngBase::gaussianSample(), QUESO::Vector::m_env, QUESO::BaseEnvironment::rngObject(), and sizeLocal().
This function returns a random variate from the inverse gamma distribution with vector parameters alpha and beta.
Definition at line 556 of file GslVector.C.
References QUESO::RngBase::gammaSample(), QUESO::Vector::m_env, QUESO::BaseEnvironment::rngObject(), sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
This function sets component-wise a number uniformly distributed in the range of elements of [aVec,bVec].
Definition at line 465 of file GslVector.C.
References QUESO::Vector::m_env, QUESO::BaseEnvironment::rngObject(), sizeLocal(), and QUESO::RngBase::uniformSample().
void QUESO::GslVector::cwSqrt | ( | ) |
This function returns component-wise the square-root of this
.
Definition at line 665 of file GslVector.C.
References sizeLocal().
gsl_vector * QUESO::GslVector::data | ( | ) | const |
Definition at line 1180 of file GslVector.C.
References m_vec.
Referenced by QUESO::GslMatrix::eigen(), QUESO::GslMatrix::internalSvd(), QUESO::GslMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::setColumn(), QUESO::GslMatrix::setRow(), and QUESO::GslMatrix::svdSolve().
double QUESO::GslVector::getMaxValue | ( | ) | const |
Returns the maximum value in the vector this
.
Definition at line 1262 of file GslVector.C.
References m_vec.
Referenced by getMaxValueAndIndex().
void QUESO::GslVector::getMaxValueAndIndex | ( | double & | value, |
int & | index | ||
) |
This function returns maximum value in the vector this
and its the index.
Definition at line 1286 of file GslVector.C.
References getMaxValue(), and getMaxValueIndex().
int QUESO::GslVector::getMaxValueIndex | ( | ) | const |
This function returns the index of the maximum value in the vector this
.
Definition at line 1274 of file GslVector.C.
References m_vec.
Referenced by getMaxValueAndIndex().
double QUESO::GslVector::getMinValue | ( | ) | const |
Returns minimum value in the vector this
.
Definition at line 1268 of file GslVector.C.
References m_vec.
Referenced by getMinValueAndIndex().
void QUESO::GslVector::getMinValueAndIndex | ( | double & | value, |
int & | index | ||
) |
This function returns minimum value in the vector this
and its the index.
Definition at line 1295 of file GslVector.C.
References getMinValue(), and getMinValueIndex().
int QUESO::GslVector::getMinValueIndex | ( | ) | const |
This function returns the index of the minimum value in the vector this
.
Definition at line 1280 of file GslVector.C.
References m_vec.
Referenced by getMinValueAndIndex().
void QUESO::GslVector::matlabDiff | ( | unsigned int | firstPositionToStoreDiff, |
double | valueForRemainderPosition, | ||
GslVector & | outputVec | ||
) | const |
Definition at line 676 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
void QUESO::GslVector::matlabLinearInterpExtrap | ( | const GslVector & | x1Vec, |
const GslVector & | y1Vec, | ||
const GslVector & | x2Vec | ||
) |
Definition at line 707 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
Referenced by QUESO::GslMatrix::matlabLinearInterpExtrap().
void QUESO::GslVector::mpiAllQuantile | ( | double | probability, |
const MpiComm & | opComm, | ||
GslVector & | resultVec | ||
) | const |
Definition at line 885 of file GslVector.C.
References QUESO::MpiComm::Bcast(), QUESO::MpiComm::Gather(), QUESO::Vector::m_env, QUESO::MpiComm::MyPID(), QUESO::MpiComm::NumProc(), RawValue_MPI_DOUBLE, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
void QUESO::GslVector::mpiAllReduce | ( | RawType_MPI_Op | mpiOperation, |
const MpiComm & | opComm, | ||
GslVector & | resultVec | ||
) | const |
Definition at line 861 of file GslVector.C.
References QUESO::MpiComm::Allreduce(), QUESO::Vector::m_env, QUESO::MpiComm::MyPID(), RawValue_MPI_DOUBLE, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
void QUESO::GslVector::mpiBcast | ( | int | srcRank, |
const MpiComm & | bcastComm | ||
) |
Definition at line 797 of file GslVector.C.
References QUESO::MpiComm::Allreduce(), QUESO::MpiComm::Barrier(), QUESO::MpiComm::Bcast(), QUESO::Vector::m_env, QUESO::MpiComm::MyPID(), QUESO::MpiComm::NumProc(), RawValue_MPI_DOUBLE, RawValue_MPI_SUM, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
double QUESO::GslVector::norm1 | ( | ) | const |
Returns the 1-norm of the vector.
Definition at line 395 of file GslVector.C.
References sizeLocal().
double QUESO::GslVector::norm2 | ( | ) | const |
Returns the 2-norm (Euclidean norm) of the vector.
Definition at line 389 of file GslVector.C.
References norm2Sq().
Referenced by QUESO::GslMatrix::invertMultiply().
double QUESO::GslVector::norm2Sq | ( | ) | const |
Returns the 2-norm squared of this vector.
Definition at line 383 of file GslVector.C.
References QUESO::scalarProduct().
Referenced by norm2().
double QUESO::GslVector::normInf | ( | ) | const |
Returns the infinity-norm (maximum norm) of the vector.
Definition at line 408 of file GslVector.C.
References sizeLocal().
GslVector & QUESO::GslVector::operator*= | ( | double | a | ) |
Stores in this
the coordinate-wise multiplication of this
and a.
Definition at line 238 of file GslVector.C.
References QUESO::Vector::m_env, m_vec, UQ_FATAL_RC_MACRO, and QUESO::BaseEnvironment::worldRank().
Stores in this
the coordinate-wise multiplication of this
with rhs.
Definition at line 258 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
Stores in this
the coordinate-wise addition of this
and rhs.
Definition at line 292 of file GslVector.C.
References QUESO::Vector::m_env, m_vec, UQ_FATAL_RC_MACRO, and QUESO::BaseEnvironment::worldRank().
Stores in this
the coordinate-wise subtraction of this
by rhs.
Definition at line 304 of file GslVector.C.
References QUESO::Vector::m_env, m_vec, UQ_FATAL_RC_MACRO, and QUESO::BaseEnvironment::worldRank().
GslVector & QUESO::GslVector::operator/= | ( | double | a | ) |
Stores in this
the coordinate-wise division of this
by a.
Definition at line 250 of file GslVector.C.
Stores in this
the coordinate-wise division of this
by rhs.
Definition at line 275 of file GslVector.C.
References QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
Copies values from vector rhs to this
.
Definition at line 219 of file GslVector.C.
References copy(), QUESO::Vector::m_env, sizeLocal(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
double & QUESO::GslVector::operator[] | ( | unsigned int | i | ) |
Element access method (non-const).
Returns the i-th element if x[i] is specified, the expression x(i) will return the same element.
Definition at line 317 of file GslVector.C.
References m_vec.
const double & QUESO::GslVector::operator[] | ( | unsigned int | i | ) | const |
Element access method (const).
Returns the i-th element if x[i] is specified, the expression x(i) will return the same element.
Definition at line 323 of file GslVector.C.
References m_vec.
|
virtual |
Print method. Defines the behavior of the std::ostream << operator inherited from the Object class.
Implements QUESO::Vector.
Definition at line 923 of file GslVector.C.
References QUESO::Vector::m_printHorizontally, QUESO::Vector::m_printScientific, and sizeLocal().
Referenced by QUESO::operator<<().
|
virtual |
Returns the global length of this vector.
Implements QUESO::Vector.
Definition at line 372 of file GslVector.C.
References QUESO::Vector::m_env, QUESO::Vector::m_map, m_vec, QUESO::Map::NumGlobalElements(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
|
virtual |
Returns the length of this vector.
Implements QUESO::Vector.
Definition at line 343 of file GslVector.C.
References QUESO::Vector::m_env, QUESO::Vector::m_map, m_vec, QUESO::Map::NumMyElements(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
Referenced by abs(), atLeastOneComponentBiggerOrEqualThan(), atLeastOneComponentBiggerThan(), atLeastOneComponentSmallerOrEqualThan(), atLeastOneComponentSmallerThan(), cwExtract(), cwInvert(), cwSet(), cwSetBeta(), cwSetConcatenated(), cwSetGamma(), cwSetGaussian(), cwSetInverseGamma(), cwSetUniform(), cwSqrt(), QUESO::GslMatrix::eigen(), QUESO::GslMatrix::fillWithTensorProduct(), QUESO::GslMatrix::getColumn(), QUESO::GslMatrix::getRow(), QUESO::GslMatrix::GslMatrix(), QUESO::GslBlockMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::largestEigen(), QUESO::leftDiagScaling(), matlabDiff(), matlabLinearInterpExtrap(), QUESO::GslMatrix::matlabLinearInterpExtrap(), QUESO::matrixProduct(), mpiAllQuantile(), mpiAllReduce(), mpiBcast(), QUESO::GslMatrix::multiply(), norm1(), normInf(), operator*=(), operator/=(), operator=(), QUESO::operator==(), print(), QUESO::GslMatrix::rank(), QUESO::rightDiagScaling(), QUESO::scalarProduct(), QUESO::GslMatrix::setColumn(), QUESO::GslOptimizer::setInitialPoint(), QUESO::GslMatrix::setRow(), QUESO::GslMatrix::smallestEigen(), subReadContents(), subWriteContents(), sumOfComponents(), QUESO::GslMatrix::svd(), and QUESO::GslMatrix::svdSolve().
|
virtual |
This function sorts the elements of the vector this
in ascending numerical order.
Implements QUESO::Vector.
Definition at line 789 of file GslVector.C.
References m_vec.
void QUESO::GslVector::subReadContents | ( | const std::string & | fileName, |
const std::string & | fileType, | ||
const std::set< unsigned int > & | allowedSubEnvIds | ||
) |
Definition at line 1029 of file GslVector.C.
References QUESO::BaseEnvironment::closeFile(), QUESO::BaseEnvironment::fullRank(), QUESO::Vector::m_env, QUESO::Vector::numOfProcsForStorage(), QUESO::BaseEnvironment::openInputFile(), sizeLocal(), QUESO::BaseEnvironment::subDisplayFile(), QUESO::BaseEnvironment::subRank(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
void QUESO::GslVector::subWriteContents | ( | const std::string & | varNamePrefix, |
const std::string & | fileName, | ||
const std::string & | fileType, | ||
const std::set< unsigned int > & | allowedSubEnvIds | ||
) | const |
Definition at line 983 of file GslVector.C.
References QUESO::BaseEnvironment::closeFile(), QUESO::Vector::getPrintHorizontally(), QUESO::Vector::getPrintScientific(), QUESO::Vector::m_env, QUESO::Vector::numOfProcsForStorage(), QUESO::FilePtrSetStruct::ofsVar, QUESO::BaseEnvironment::openOutputFile(), QUESO::Vector::setPrintHorizontally(), QUESO::Vector::setPrintScientific(), sizeLocal(), QUESO::BaseEnvironment::subIdString(), QUESO::BaseEnvironment::subRank(), UQ_FATAL_TEST_MACRO, and QUESO::BaseEnvironment::worldRank().
double QUESO::GslVector::sumOfComponents | ( | ) | const |
Returns the sum of the components of the vector.
Definition at line 423 of file GslVector.C.
References sizeLocal().
|
private |
GSL vector.
Definition at line 245 of file GslVector.h.
Referenced by copy(), data(), getMaxValue(), getMaxValueIndex(), getMinValue(), getMinValueIndex(), GslVector(), operator*=(), operator+=(), operator-=(), operator[](), sizeGlobal(), sizeLocal(), sort(), and ~GslVector().