queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QUESO Namespace Reference

Classes

class  ArrayOfSequences
 Class for handling array samples (arrays of scalar sequences). More...
 
class  BoxSubset
 Class representing a subset of a vector space shaped like a hypercube. More...
 
class  ConcatenationSubset
 A templated class representing the concatenation of two vector subsets. More...
 
class  ConstantScalarFunction
 A class for handling scalar functions which image is a constant (real number). More...
 
class  ConstantVectorFunction
 A class for handling vector functions which image is constant. More...
 
class  DiscreteSubset
 A templated class representing the discrete vector subsets. More...
 
class  GenericScalarFunction
 A class for handling generic scalar functions. More...
 
class  GenericVectorFunction
 A class for handling generic vector functions. More...
 
class  IntersectionSubset
 A templated class representing the intersection of two vector sets. More...
 
class  BaseScalarFunction
 A templated (base) class for handling scalar functions. More...
 
class  BayesianJointPdf
 A class for handling Bayesian joint PDFs. More...
 
class  ScalarFunctionSynchronizer
 A templated class for synchronizing the calls of scalar functions (BaseScalarFunction and derived classes). More...
 
class  ScalarSequence
 Class for handling scalar samples. More...
 
class  SequenceOfVectors
 Class for handling vector samples (sequence of vectors). More...
 
class  BaseVectorFunction
 A templated (base) class for handling vector functions. More...
 
class  VectorFunctionSynchronizer
 A templated class for synchronizing the calls of vector-valued functions. More...
 
class  BaseVectorSequence
 Base class for handling vector and array samples (sequence of vectors or arrays). More...
 
class  VectorSpace
 A class representing a vector space. More...
 
class  VectorSet
 A templated class for handling sets. More...
 
class  VectorSubset
 A templated class for handling subsets. More...
 
class  AlgorithmFactory
 
class  AlgorithmFactoryImp
 
class  AlgorithmFactoryInitializer
 
class  BaseInputOptionsParser
 
class  BasicPdfsBase
 TODO: Base class for basic PDFs (via either GSL or Boost). More...
 
class  BasicPdfsBoost
 TODO: Base class for basic PDFs using Boost library. More...
 
class  BasicPdfsCXX11
 Base class for basic PDFs using C++ math functions. More...
 
class  BasicPdfsGsl
 TODO: Base class for basic PDFs using Gsl library. More...
 
class  BoostInputOptionsParser
 
class  DistArray
 A class for partitioning vectors and matrices. More...
 
struct  FilePtrSetStruct
 Struct for handling data input and output from files. More...
 
class  BaseEnvironment
 This (virtual) class sets up the environment underlying the use of the QUESO library by an executable. More...
 
class  EmptyEnvironment
 This class sets up the environment underlying the use of the QUESO library by an executable. More...
 
class  FullEnvironment
 This class sets up the full environment underlying the use of the QUESO library by an executable. More...
 
class  EnvOptionsValues
 This class provides a suite options one can pass to a QUESO environment. More...
 
class  EnvironmentOptions
 This class reads options one can pass to a QUESO environment through an input file. More...
 
class  LogicError
 
class  NotImplemented
 
class  FileError
 
class  Factory
 
class  FactoryImp
 
class  FunctionBase
 Abstract base class for function objects. More...
 
class  FunctionOperatorBuilder
 
class  GslBlockMatrix
 Class for representing block matrices using GSL library. More...
 
class  GslMatrix
 Class for matrix operations using GSL library. More...
 
class  GslOptimizer
 A base class for handling optimisation of scalar functions. More...
 
class  GslVector
 Class for vector operations using GSL library. More...
 
class  InfiniteDimensionalGaussian
 Class defining infinite dimensional Gaussian measures. More...
 
class  InfiniteDimensionalLikelihoodBase
 Abstract class representing the likelihood. Users must subclass this. More...
 
class  InfiniteDimensionalMCMCSampler
 Class representing the infinite dimensional Markov chain Monte Carlo sampler. More...
 
class  InfiniteDimensionalMCMCSamplerOptions
 This class defines the options that specify the behaviour of the MCMC sampler. More...
 
class  InfiniteDimensionalMeasureBase
 Abstract base class for infinite dimensional measures. More...
 
class  LibMeshFunction
 Function objects using libMesh for the backend. More...
 
class  LibMeshNegativeLaplacianOperator
 Class describing negative Laplacian operator using libmesh backend. More...
 
class  LibMeshOperatorBase
 Abstract base class for operator objects using libmesh in the backend. More...
 
class  Map
 A class for partitioning vectors and matrices. More...
 
class  Matrix
 Class for matrix operations (virtual). More...
 
struct  data_type
 
class  DataType
 
class  StandardType
 
class  MpiComm
 The QUESO MPI Communicator Class. More...
 
class  OperatorBase
 Abstract base class for operator objects. Operators are assumed to be symmetric and positive-definite. More...
 
class  BaseOptimizer
 A base class for handling optimisation of scalar functions. More...
 
class  OptimizerMonitor
 Object to monitor convergence of optimizers. More...
 
class  OptimizerOptions
 This class provides options for a Optimizer. More...
 
class  RngBase
 Class for random number generation (base class for either GSL or Boost RNG). More...
 
class  RngBoost
 
class  RngCXX11
 
class  RngGsl
 
struct  ScopedPtr
 
struct  SharedPtr
 
class  TeuchosMatrix
 Class for matrix operations using Teuchos (Trilinos). More...
 
class  TeuchosVector
 Class for vector operations using Teuchos (Trilinos). More...
 
class  TKFactoryInitializer
 
class  TKFactoryLogitRandomWalk
 
class  TKFactoryMALA
 
class  TKFactoryRandomWalk
 
class  TKFactoryStochasticNewton
 
class  TransitionKernelFactory
 
class  Vector
 Class for vector operations (virtual). More...
 
class  GPMSAEmulator
 
class  GPMSAFactory
 
class  GPMSAOptions
 This class defines the options that specify the behaviour of the Gaussian process emulator. More...
 
class  Base1D1DFunction
 Class for one-dimensional functions. More...
 
class  Generic1D1DFunction
 Class for generic one-dimensional functions. More...
 
class  Constant1D1DFunction
 Class for constant one-dimensional functions. More...
 
class  Linear1D1DFunction
 Class for linear one-dimensional functions. More...
 
class  PiecewiseLinear1D1DFunction
 Class for piecewise-linear one-dimensional functions. More...
 
class  Quadratic1D1DFunction
 Class for one-dimensional quadratic functions. More...
 
class  Sampled1D1DFunction
 Class for one-dimensional sampled functions. More...
 
class  ScalarTimesFunc1D1DFunction
 Class for multiplication of a one-dimensional function by a scalar. More...
 
class  FuncTimesFunc1D1DFunction
 Class for multiplication of a one-dimensional function by another. More...
 
class  FuncPlusFunc1D1DFunction
 Class for addition of a one-dimensional function with another. More...
 
class  LagrangePolynomial1D1DFunction
 Class for one-dimensional Lagrange polynomials. More...
 
class  LagrangeBasis1D1DFunction
 Class for Lagrange polynomial basis. More...
 
class  Base1DQuadrature
 Base class for one-dimensional quadrature rules (numerical integration of functions). More...
 
class  Generic1DQuadrature
 Class for one-dimensional generic quadrature rules (numerical integration of functions). More...
 
class  UniformLegendre1DQuadrature
 Class for Legendre-Gauss quadrature rule for one-dimensional functions. More...
 
class  GaussianHermite1DQuadrature
 Class for Hermite-Gauss quadrature rule for one-dimensional functions. More...
 
class  WignerInverseChebyshev1st1DQuadrature
 Class for first type Chebyshev-Gauss quadrature rule for one-dimensional functions. More...
 
class  WignerChebyshev2nd1DQuadrature
 Class for second type Chebyshev-Gauss quadrature rule for one-dimensional functions. More...
 
class  TwoDArray
 Class for handling arrays of generic data. More...
 
class  ArrayOfOneDGrids
 Class to accommodate arrays of one-dimensional grid. More...
 
class  ArrayOfOneDTables
 Class to accommodate arrays of one-dimensional tables. More...
 
class  AsciiTable
 Class for reading ASCII values from a table in a file. More...
 
class  BaseQuadrature
 Base class for quadrature rules. More...
 
class  Fft
 Class for a Fast Fourier Transform (FFT) algorithm. More...
 
class  MonteCarloQuadrature
 Numerical integration using Monte Carlo. More...
 
class  MultiDimensionalIndexing
 
class  MultiDQuadratureBase
 Base class for multi-dimensional quadrature rules. More...
 
class  BaseOneDGrid
 Base class for accommodating one-dimensional grids. More...
 
class  StdOneDGrid
 Class for accommodating standard one-dimensional grids. More...
 
class  StreamUtilities
 
class  TensorProductQuadrature
 Numerical quadrature using a tensor product of Base1DQuadrature rules. More...
 
class  UniformOneDGrid
 Class for accommodating uniform one-dimensional grids. More...
 
class  BaseTKGroup
 This base class allows the representation of a transition kernel. More...
 
class  Algorithm
 
class  BetaJointPdf
 A class for handling Beta joint PDFs. More...
 
class  BetaVectorRealizer
 A class for handling sampling from a Beta probability density distribution. More...
 
class  BetaVectorRV
 A class representing a vector RV constructed via Beta distribution. More...
 
class  ConcatenatedJointPdf
 A class for handling concatenated PDFs. More...
 
class  ConcatenatedVectorRealizer
 A class for handling sampling from concatenated probability density distributions. More...
 
class  ConcatenatedVectorRV
 A class representing concatenated vector RVs. More...
 
class  ExponentialMatrixCovarianceFunction
 A class for exponential covariance matrices. More...
 
class  ExponentialScalarCovarianceFunction
 A class for exponential covariances. More...
 
class  FiniteDistribution
 A templated class for a finite distribution. More...
 
class  GammaJointPdf
 A class for handling Gamma joint PDFs. More...
 
class  GammaVectorRealizer
 A class for handling sampling from a Gamma probability density distribution. More...
 
class  GammaVectorRV
 A class representing a vector RV constructed via Gamma distribution. More...
 
class  GaussianJointPdf
 A class for handling Gaussian joint PDFs. More...
 
class  GaussianLikelihoodBlockDiagonalCovariance
 A class representing a Gaussian likelihood with block-diagonal covariance matrix. More...
 
class  GaussianLikelihoodBlockDiagonalCovarianceRandomCoefficients
 A class representing a Gaussian likelihood with block-diagonal covariance matrix. More...
 
class  GaussianLikelihoodDiagonalCovariance
 A class that represents a Gaussian likelihood with diagonal covariance matrix. More...
 
class  GaussianLikelihoodFullCovariance
 A class that represents a Gaussian likelihood with full covariance. More...
 
class  GaussianLikelihoodFullCovarianceRandomCoefficient
 A class that represents a Gaussian likelihood with full covariance and random coefficient. More...
 
class  GaussianLikelihoodScalarCovariance
 A class that represents a Gaussian likelihood with scalar covariance. More...
 
class  GaussianVectorCdf
 TODO: A class for handling Gaussian CDFs. More...
 
class  GaussianVectorMdf
 TODO: A class for handling Gaussian MDFs. More...
 
class  GaussianVectorRealizer
 A class for handling sampling from Gaussian probability density distributions. More...
 
class  GaussianVectorRV
 A class representing a Gaussian vector RV. More...
 
class  GenericJointPdf
 A class for handling generic joint PDFs. More...
 
class  GenericMatrixCovarianceFunction
 A class for generic covariance matrices. More...
 
class  GenericScalarCovarianceFunction
 A class for generic covariances. More...
 
class  GenericVectorCdf
 A class for handling generic vector CDFs. More...
 
class  GenericVectorMdf
 A class for handling generic MDFs of vector functions. More...
 
class  GenericVectorRealizer
 A class for handling sampling from generic probability density distributions. More...
 
class  GenericVectorRV
 A templated class for handling generic vector RVs. More...
 
class  HessianCovMatricesTKGroup
 This class allows the representation of a transition kernel with Hessians. More...
 
class  InverseGammaJointPdf
 A class for handling Inverse Gamma joint PDFs. More...
 
class  InverseGammaVectorRealizer
 A class for handling sampling from an Inverse Gamma probability density distribution. More...
 
class  InverseGammaVectorRV
 A class representing a vector RV constructed via Inverse Gamma distribution. More...
 
class  InvLogitGaussianJointPdf
 A class for handling hybrid (transformed) Gaussians with bounds. More...
 
class  InvLogitGaussianVectorRealizer
 A class for handling sampling from (transformed) Gaussian probability density distributions with bounds. More...
 
class  InvLogitGaussianVectorRV
 A class representing a (transformed) Gaussian vector RV with bounds. More...
 
class  JeffreysJointPdf
 A class for handling jeffreys joint PDFs. More...
 
class  JeffreysVectorRealizer
 A class for handling sampling from a jeffreys probability density distribution. More...
 
class  JeffreysVectorRV
 A class representing a jeffreys vector RV. More...
 
class  BaseJointPdf
 A templated (base) class for handling joint PDFs. More...
 
class  LikelihoodBase
 Base class for canned Gaussian likelihoods. More...
 
class  LogNormalJointPdf
 A class for handling Log-Normal joint PDFs. More...
 
class  LogNormalVectorRealizer
 A class for handling sampling from a Log-Normal probability density distribution. More...
 
class  LogNormalVectorRV
 A class representing a LogNormal vector RV. More...
 
class  MarkovChainPositionData
 A templated class that represents a Markov Chain. More...
 
class  BaseMatrixCovarianceFunction
 A templated (base) class to accommodate covariance matrix of (random) vector functions. More...
 
class  BayseianJointPdf
 
class  MetropolisAdjustedLangevinTK
 This class allows the representation of the MALA transition kernel with a scaled covariance matrix for the purposes of delayed rejection. More...
 
struct  MHRawChainInfoStruct
 A struct that represents a Metropolis-Hastings sample. More...
 
class  MetropolisHastingsSG
 A templated class that represents a Metropolis-Hastings generator of samples. More...
 
class  MhOptionsValues
 This class provides options for the Metropolis-Hastings generator of samples if no input file is available. More...
 
class  MetropolisHastingsSGOptions
 This class reads the options for the Metropolis-Hastings generator of samples from an input file. More...
 
struct  BIP_routine_struct
 
struct  ExchangeInfoStruct
 
struct  BalancedLinkedChainControlStruct
 
struct  BalancedLinkedChainsPerNodeStruct
 
struct  UnbalancedLinkedChainControlStruct
 
struct  UnbalancedLinkedChainsPerNodeStruct
 
class  MLSampling
 A templated class that represents a Multilevel generator of samples. More...
 
class  MLSamplingLevelOptions
 This class provides options for each level of the Multilevel sequence generator if no input file is available. More...
 
class  MLSamplingOptions
 This class provides options for the Multilevel sequence generator if no input file is available. More...
 
class  ModelValidation
 A templated class for model validation of the example validationPyramid. More...
 
class  MonteCarloSG
 A templated class that implements a Monte Carlo generator of samples. More...
 
class  McOptionsValues
 This class provides options for the Monte Carlo sequence generator if no input file is available. More...
 
class  MonteCarloSGOptions
 This class reads the options for the Monte Carlo sequence generator from an input file. More...
 
class  PoweredJointPdf
 A class for handling a powered joint PDFs. More...
 
class  SampledScalarCdf
 A class for handling sampled CDFs. More...
 
class  SampledVectorCdf
 A class for handling sampled vector CDFs. More...
 
class  SampledVectorMdf
 A class for handling sampled vector MDFs. More...
 
class  BaseScalarCdf
 A templated (base) class for handling CDFs. More...
 
class  BaseScalarCovarianceFunction
 A templated (base) class to accommodate scalar covariance functions (of random variables). More...
 
class  ScalarGaussianRandomField
 A class for handling scalar Gaussian random fields (GRF). More...
 
class  ScaledCovMatrixTKGroup
 This class allows the representation of a transition kernel with a scaled covariance matrix. More...
 
class  SequentialVectorRealizer
 A class for handling sequential draws (sampling) from probability density distributions. More...
 
class  StatisticalForwardProblem
 This templated class represents a Statistical Forward Problem. More...
 
class  SfpOptionsValues
 This class provides options for a Statistical Forward Problem if no input file is available. More...
 
class  StatisticalForwardProblemOptions
 This class reads option values for a Statistical Forward Problem from an input file. More...
 
class  StatisticalInverseProblem
 This templated class represents a Statistical Inverse Problem. More...
 
class  SipOptionsValues
 This class provides options for a Statistical Inverse Problem if no input file is available. More...
 
class  StatisticalInverseProblemOptions
 This class reads option values for a Statistical Inverse Problem from an input file. More...
 
class  StdScalarCdf
 A class for handling standard CDFs. More...
 
class  TransformedScaledCovMatrixTKGroup
 This class represents a transition kernel with a scaled covariance matrix on hybrid bounded/unbounded state spaces. More...
 
class  UniformJointPdf
 A class for handling uniform joint PDFs. More...
 
class  UniformVectorRealizer
 A class for handling sampling from a Uniform probability density distribution. More...
 
class  UniformVectorRV
 A class representing a uniform vector RV. More...
 
class  ValidationCycle
 A templated class for validation cycle of the examples validationCycle and validationCycle2. More...
 
class  BaseVectorCdf
 A templated (base) class for handling CDFs of vector functions. More...
 
class  VectorGaussianRandomField
 A class for handling vector Gaussian random fields (GRF). More...
 
class  BaseVectorMdf
 A templated (base) class for handling MDFs of vector functions. More...
 
class  BaseVectorRealizer
 A templated (base) class for handling sampling from vector RVs. More...
 
class  BaseVectorRV
 A templated base class for handling vector RV. More...
 
class  WignerJointPdf
 A class for handling Wigner joint PDFs. More...
 
class  WignerVectorRealizer
 A class for handling sampling from a Wigner probability density distribution. More...
 
class  WignerVectorRV
 A class representing a vector RV constructed via Wigner distribution. More...
 
class  InterpolationSurrogateData
 
class  InterpolationSurrogateBase
 Base class for interpolation-based surrogates. More...
 
class  InterpolationSurrogateBuilder
 Build interpolation-based surrogate. More...
 
class  InterpolationSurrogateDataSet
 Container class for multiple, consistent InterpolationSurrogateData objects. More...
 
class  InterpolationSurrogateIOASCII
 
class  InterpolationSurrogateIOBase
 
class  LinearLagrangeInterpolationSurrogate
 Linear Lagrange interpolation surrogate. More...
 
class  SurrogateBase
 Base class for surrogates of models. More...
 
class  SurrogateBuilderBase
 Base class for builders of surrogates. More...
 

Typedefs

typedef MPI_Comm RawType_MPI_Comm
 
typedef MPI_Group RawType_MPI_Group
 
typedef MPI_Datatype RawType_MPI_Datatype
 
typedef MPI_Datatype data_type
 
typedef MPI_Op RawType_MPI_Op
 
typedef MPI_Status RawType_MPI_Status
 

Functions

template<class V , class M >
VectorSet< V, M > * InstantiateIntersection (const VectorSet< V, M > &domain1, const VectorSet< V, M > &domain2)
 This method calculates the intersection of domain1 and domain2. More...
 
template<class T >
void ComputeSubGaussian2dKde (const ScalarSequence< T > &scalarSeq1, const ScalarSequence< T > &scalarSeq2, unsigned int initialPos, double scaleValue1, double scaleValue2, const std::vector< T > &evaluationPositions1, const std::vector< T > &evaluationPositions2, std::vector< double > &densityValues)
 
template<class T >
void ComputeUnifiedGaussian2dKde (bool useOnlyInter0Comm, const ScalarSequence< T > &scalarSeq1, const ScalarSequence< T > &scalarSeq2, unsigned int initialPos, double unifiedScaleValue1, double unifiedScaleValue2, const std::vector< T > &unifiedEvaluationPositions1, const std::vector< T > &unifiedEvaluationPositions2, std::vector< double > &unifiedDensityValues)
 
template<class T >
void ComputeCovCorrBetweenScalarSequences (const ScalarSequence< T > &subPSeq, const ScalarSequence< T > &subQSeq, unsigned int subNumSamples, T &covValue, T &corrValue)
 
template<class P_V , class P_M , class Q_V , class Q_M >
void ComputeCovCorrMatricesBetweenVectorSequences (const BaseVectorSequence< P_V, P_M > &subPSeq, const BaseVectorSequence< Q_V, Q_M > &subQSeq, unsigned int subNumSamples, P_M &pqCovMatrix, P_M &pqCorrMatrix)
 
std::ostream & operator<< (std::ostream &os, const SequenceStatisticalOptions &obj)
 
int MyWorldfullRank ()
 Returns the rank of the calling process in the communicator. More...
 
void queso_terminate_handler ()
 Function for unhandled exceptions in Queso. More...
 
void QUESO_version_print (std::ostream &os)
 
int QUESO_get_numeric_version ()
 
std::ostream & operator<< (std::ostream &os, const BaseEnvironment &obj)
 
std::ostream & operator<< (std::ostream &os, const EnvironmentOptions &obj)
 Print values of the options chosen. More...
 
std::ostream & operator<< (std::ostream &os, const GslBlockMatrix &obj)
 
GslMatrix operator* (double a, const GslMatrix &mat)
 
GslVector operator* (const GslMatrix &mat, const GslVector &vec)
 
GslMatrix operator* (const GslMatrix &m1, const GslMatrix &m2)
 
GslMatrix operator+ (const GslMatrix &m1, const GslMatrix &m2)
 
GslMatrix operator- (const GslMatrix &m1, const GslMatrix &m2)
 
GslMatrix matrixProduct (const GslVector &v1, const GslVector &v2)
 
GslMatrix leftDiagScaling (const GslVector &vec, const GslMatrix &mat)
 
GslMatrix rightDiagScaling (const GslMatrix &mat, const GslVector &vec)
 
std::ostream & operator<< (std::ostream &os, const GslMatrix &obj)
 
GslVector operator/ (double a, const GslVector &x)
 
GslVector operator/ (const GslVector &x, const GslVector &y)
 
GslVector operator* (double a, const GslVector &x)
 
GslVector operator* (const GslVector &x, const GslVector &y)
 
double scalarProduct (const GslVector &x, const GslVector &y)
 
GslVector operator+ (const GslVector &x, const GslVector &y)
 
GslVector operator- (const GslVector &x, const GslVector &y)
 
bool operator== (const GslVector &lhs, const GslVector &rhs)
 
std::ostream & operator<< (std::ostream &os, const GslVector &obj)
 
 QUESO_STANDARD_TYPE (char, MPI_CHAR)
 
 QUESO_STANDARD_TYPE (int, MPI_INT)
 
 QUESO_STANDARD_TYPE (unsigned int, MPI_UNSIGNED)
 
 QUESO_STANDARD_TYPE (double, MPI_DOUBLE)
 
TeuchosMatrix operator* (double a, const TeuchosMatrix &mat)
 
TeuchosVector operator* (const TeuchosMatrix &mat, const TeuchosVector &vec)
 
TeuchosMatrix operator* (const TeuchosMatrix &m1, const TeuchosMatrix &m2)
 
TeuchosMatrix operator+ (const TeuchosMatrix &m1, const TeuchosMatrix &m2)
 
TeuchosMatrix operator- (const TeuchosMatrix &m1, const TeuchosMatrix &m2)
 
TeuchosMatrix matrixProduct (const TeuchosVector &v1, const TeuchosVector &v2)
 
TeuchosMatrix leftDiagScaling (const TeuchosVector &vec, const TeuchosMatrix &mat)
 
TeuchosMatrix rightDiagScaling (const TeuchosMatrix &mat, const TeuchosVector &vec)
 
std::ostream & operator<< (std::ostream &os, const TeuchosMatrix &obj)
 
TeuchosVector operator/ (double a, const TeuchosVector &x)
 
TeuchosVector operator/ (const TeuchosVector &x, const TeuchosVector &y)
 
TeuchosVector operator* (double a, const TeuchosVector &x)
 
TeuchosVector operator* (const TeuchosVector &x, const TeuchosVector &y)
 
double scalarProduct (const TeuchosVector &x, const TeuchosVector &y)
 
TeuchosVector operator+ (const TeuchosVector &x, const TeuchosVector &y)
 
TeuchosVector operator- (const TeuchosVector &x, const TeuchosVector &y)
 
bool operator== (const TeuchosVector &lhs, const TeuchosVector &rhs)
 
std::ostream & operator<< (std::ostream &os, const TeuchosVector &obj)
 
template<>
void BoostInputOptionsParser::getOption< std::vector< double, std::allocator< double > > > (const std::string &name, std::vector< double, std::allocator< double > > &value) const
 
std::ostream & operator<< (std::ostream &os, const BoostInputOptionsParser &parser)
 
template void BoostInputOptionsParser::registerOption< std::string > (const std::string &, const std::string &, const std::string &)
 
template void BoostInputOptionsParser::getOption< std::string > (const std::string &, std::string &) const
 
template void BoostInputOptionsParser::getOption< std::vector< unsigned int, std::allocator< unsigned int > > > (const std::string &, std::vector< unsigned int, std::allocator< unsigned int > > &) const
 
std::ostream & operator<< (std::ostream &os, const EnvOptionsValues &obj)
 
double c_evaluate (const gsl_vector *x, void *context)
 
void c_evaluate_derivative (const gsl_vector *x, void *context, gsl_vector *derivative)
 
void c_evaluate_with_derivative (const gsl_vector *x, void *context, double *f, gsl_vector *derivative)
 
std::ostream & operator<< (std::ostream &os, const InfiniteDimensionalMCMCSamplerOptions &obj)
 
std::ostream & operator<< (std::ostream &os, const OptimizerOptions &obj)
 
std::ostream & operator<< (std::ostream &os, const GPMSAOptions &obj)
 
template<class T >
double SubF1F2Gaussian2dKdeIntegral (const ScalarSequence< T > &scalarSeq1, const ScalarSequence< T > &scalarSeq2, unsigned int initialPos, double scaleValue1, double scaleValue2, const Base1D1DFunction &func1, const Base1D1DFunction &func2, unsigned int quadratureOrder)
 Calculates the integral of a 2D Gaussian KDE. More...
 
template<class V , class M >
void CovCond (double condNumber, const V &direction, M &covMatrix, M &precMatrix)
 
template<typename T >
bool queso_isnan (T arg)
 
template<typename T >
bool queso_isfinite (T arg)
 
void MiscReadDoublesFromString (const std::string &inputString, std::vector< double > &outputDoubles)
 
void MiscReadWordsFromString (const std::string &inputString, std::vector< std::string > &outputWords)
 
void MiscExtractDoubleFromString (std::string &inputString, double &outputDouble)
 
void MiscExtractWordFromString (std::string &inputString, std::string &outputWord)
 
int MiscReadStringAndDoubleFromFile (std::ifstream &ifs, std::string &termString, double *termValue)
 
int MiscReadCharsAndDoubleFromFile (std::ifstream &ifs, std::string &termString, double *termValue, bool &endOfLineAchieved)
 
double MiscGammar (double a, double b, const RngBase *rngObject)
 
double MiscGetEllapsedSeconds (struct timeval *timeval0)
 
double MiscHammingWindow (unsigned int N, unsigned int j)
 
double MiscGaussianDensity (double x, double mu, double sigma)
 
unsigned int MiscUintDebugMessage (unsigned int value, const char *message)
 
int MiscIntDebugMessage (int value, const char *message)
 
double MiscDoubleDebugMessage (double value, const char *message)
 
int CheckFilePath (const char *path)
 
int GRVY_CheckDir (const char *dirname)
 
template<class T >
bool MiscCheckForSameValueInAllNodes (T &inputValue, double acceptableTreshold, const MpiComm &comm, const char *whereString)
 
template<class V >
void MiscComputePositionsBetweenMinMax (V minValues, V maxValues, std::vector< V * > &positions)
 
template<class V1 , class V2 >
void MiscCheckTheParallelEnvironment (const V1 &vec1, const V2 &vec2)
 
template<class V , class M >
std::ostream & operator<< (std::ostream &os, const ArrayOfOneDTables< V, M > &obj)
 
template<class V , class M >
std::ostream & operator<< (std::ostream &os, const AsciiTable< V, M > &obj)
 
template<class V , class M >
void ComputeConditionalGaussianVectorRV (const V &muVec1, const V &muVec2, const M &sigmaMat11, const M &sigmaMat12, const M &sigmaMat21, const M &sigmaMat22, const V &sampleVec2, V &muVec1_cond_on_2, M &sigmaMat11_cond_on_2)
 
void distANN_XY (const ANNpointArray dataX, const ANNpointArray dataY, double *distsXY, unsigned int dimX, unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
 
void normalizeANN_XY (ANNpointArray dataXY, unsigned int dimXY, ANNpointArray dataX, unsigned int dimX, ANNpointArray dataY, unsigned int dimY, unsigned int N)
 
void whiteningANN_X_Y (ANNpointArray dataX1, ANNpointArray dataX2, unsigned int dimX, unsigned int N1, unsigned int N2)
 
double computeMI_ANN (ANNpointArray dataXY, unsigned int dimX, unsigned int dimY, unsigned int k, unsigned int N, double eps)
 
template<template< class P_V, class P_M > class RV, class P_V , class P_M >
double estimateMI_ANN (const RV< P_V, P_M > &jointRV, const unsigned int xDimSel[], unsigned int dimX, const unsigned int yDimSel[], unsigned int dimY, unsigned int k, unsigned int N, double eps)
 
template<class P_V , class P_M , template< class P_V, class P_M > class RV_1, template< class P_V, class P_M > class RV_2>
double estimateMI_ANN (const RV_1< P_V, P_M > &xRV, const RV_2< P_V, P_M > &yRV, const unsigned int xDimSel[], unsigned int dimX, const unsigned int yDimSel[], unsigned int dimY, unsigned int k, unsigned int N, double eps)
 
template<class P_V , class P_M , template< class P_V, class P_M > class RV_1, template< class P_V, class P_M > class RV_2>
double estimateKL_ANN (RV_1< P_V, P_M > &xRV, RV_2< P_V, P_M > &yRV, unsigned int xDimSel[], unsigned int dimX, unsigned int yDimSel[], unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
 
template<class P_V , class P_M , template< class P_V, class P_M > class RV_1, template< class P_V, class P_M > class RV_2>
double estimateCE_ANN (RV_1< P_V, P_M > &xRV, RV_2< P_V, P_M > &yRV, unsigned int xDimSel[], unsigned int dimX, unsigned int yDimSel[], unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
 
template<class V , class M >
std::ostream & operator<< (std::ostream &os, const BaseJointPdf< V, M > &obj)
 
std::ostream & operator<< (std::ostream &os, const MetropolisHastingsSGOptions &obj)
 
void BIP_routine (glp_tree *tree, void *info)
 
std::ostream & operator<< (std::ostream &os, const MonteCarloSGOptions &obj)
 Prints the object obj, overloading an operator. More...
 
template<class T >
double horizontalDistance (const BaseScalarCdf< T > &cdf1, const BaseScalarCdf< T > &cdf2, double epsilon)
 It calculated the maximum horizontal distance between two CDFs. More...
 
std::ostream & operator<< (std::ostream &os, const StatisticalForwardProblemOptions &obj)
 Prints the object obj, overloading an operator. More...
 
std::ostream & operator<< (std::ostream &os, const StatisticalInverseProblemOptions &obj)
 Prints the object obj, overloading an operator. More...
 
template<class V , class M >
void horizontalDistances (const BaseVectorCdf< V, M > &cdf1, const BaseVectorCdf< V, M > &cdf2, const V &epsilonVec, V &distances)
 It calculated the maximum horizontal distances between two vector CDFs. More...
 
template<class P_V , class P_M , class Q_V , class Q_M >
void ComputeCovCorrMatricesBetweenVectorRvs (const BaseVectorRV< P_V, P_M > &paramRv, const BaseVectorRV< Q_V, Q_M > &qoiRv, unsigned int localNumSamples, P_M &pqCovMatrix, P_M &pqCorrMatrix)
 
std::ostream & operator<< (std::ostream &os, const MhOptionsValues &obj)
 
template<class P_V , class P_M >
std::ostream & operator<< (std::ostream &os, const MLSampling< P_V, P_M > &obj)
 
std::ostream & operator<< (std::ostream &os, const MLSamplingLevelOptions &obj)
 
std::ostream & operator<< (std::ostream &os, const MLSamplingOptions &obj)
 
std::ostream & operator<< (std::ostream &os, const McOptionsValues &obj)
 
 if (m_env.subDisplayFile()!=NULL)
 
 if (m_ov.m_pseqComputeStats) m_pseqStatisticalOptionsObj
 
SfpOptionsValues::SfpOptionsValues()
m_parser 
registerOption< bool > (m_option_computeSolution, UQ_SFP_COMPUTE_SOLUTION_ODV,"compute solution process")
 
m_parser registerOption< bool > (m_option_computeCovariances, UQ_SFP_COMPUTE_COVARIANCES_ODV,"compute pq covariances")
 
m_parser registerOption< bool > (m_option_computeCorrelations, UQ_SFP_COMPUTE_CORRELATIONS_ODV,"compute pq correlations")
 
m_parser registerOption< std::string > (m_option_dataOutputFileName, UQ_SFP_DATA_OUTPUT_FILE_NAME_ODV,"name of data output file")
 
m_parser registerOption< std::string > (m_option_dataOutputAllowedSet, UQ_SFP_DATA_OUTPUT_ALLOWED_SET_ODV,"subEnvs that will write to data output file")
 
m_parser registerOption< std::string > (m_option_solver, UQ_SFP_SOLVER_ODV,"algorithm for propagation")
 
m_parser scanInputFile ()
 
m_parser getOption< std::string > (m_option_help, m_help)
 
m_parser getOption< bool > (m_option_computeSolution, m_computeSolution)
 
m_parser getOption< bool > (m_option_computeCovariances, m_computeCovariances)
 
m_parser getOption< bool > (m_option_computeCorrelations, m_computeCorrelations)
 
m_parser getOption< std::string > (m_option_dataOutputFileName, m_dataOutputFileName)
 
m_parser getOption< std::set< unsigned int > > (m_option_dataOutputAllowedSet, m_dataOutputAllowedSet)
 
m_parser getOption< std::string > (m_option_solver, m_solver)
 
 for (unsigned int i=0;i< size;i++)
 
 checkOptions ()
 
std::ostream & operator<< (std::ostream &os, const SfpOptionsValues &obj)
 
std::ostream & operator<< (std::ostream &os, const SipOptionsValues &obj)
 

Variables

const int UQ_UNAVAILABLE_RANK = -1
 
const int UQ_OK_RC = 0
 
const int UQ_INCOMPLETE_IMPLEMENTATION_RC = -1
 
const int UQ_INVALID_PARAMETER_SPEC_RC = -2
 
const int UQ_INVALID_OBSERVABLE_SPEC_RC = -3
 
const int UQ_INVALID_QOI_SPEC_RC = -4
 
const int UQ_INVALID_INTERNAL_RESULT_RC = -5
 
const int UQ_INVALID_INTERNAL_STATE_RC = -6
 
const int UQ_FAILED_TO_OPEN_FILE_RC = -7
 
const int UQ_MATRIX_IS_NOT_POS_DEFINITE_RC = -8
 
const int UQ_FAILED_READING_FILE_RC = -9
 
const int UQ_INVALID_SPACE_COMPONENT_ID_RC = -10
 
const int UQ_MATRIX_SVD_FAILED_RC = -11
 
template<typename T >
DistArray< T >::DistArray(const
Map &inputMap, const int
inputRowSize) 
for (int i=0;i< m_Map.NumGlobalElements();++i)
 
std::terminate_handler old_terminate_handler
 
McOptionsValues::McOptionsValues(#ifdef
QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
const SsOptionsValues
*alternativePSsOptionsValues,
const SsOptionsValues
*alternativeQSsOptionsValues#endif 
if )(m_alternativeQSsOptionsValues=*alternativeQSsOptionsValues)
 
MonteCarloSGOptions::MonteCarloSGOptions(const
BaseEnvironment &env, const
char *prefix 
queso_require_not_equal_to_msg )(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
 
MonteCarloSGOptions::MonteCarloSGOptions(const
BaseEnvironment &env, const
char *prefix, const
McOptionsValues
&alternativeOptionsValues 
queso_require_equal_to_msg )(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
 
 m_help = env->input()(m_option_help, UQ_SFP_HELP)
 
 m_computeSolution = env->input()(m_option_computeSolution, UQ_SFP_COMPUTE_SOLUTION_ODV)
 
 m_computeCovariances = env->input()(m_option_computeCovariances, UQ_SFP_COMPUTE_COVARIANCES_ODV)
 
 m_computeCorrelations = env->input()(m_option_computeCorrelations, UQ_SFP_COMPUTE_CORRELATIONS_ODV)
 
 m_dataOutputFileName = env->input()(m_option_dataOutputFileName, UQ_SFP_DATA_OUTPUT_FILE_NAME_ODV)
 
unsigned int size = env->input().vector_variable_size(m_option_dataOutputAllowedSet)
 
 m_solver = env->input()(m_option_solver, UQ_SFP_SOLVER_ODV)
 

Typedef Documentation

typedef MPI_Datatype QUESO::data_type

Definition at line 44 of file MpiComm.h.

Definition at line 41 of file MpiComm.h.

Definition at line 43 of file MpiComm.h.

Definition at line 42 of file MpiComm.h.

typedef int QUESO::RawType_MPI_Op

Definition at line 45 of file MpiComm.h.

Definition at line 46 of file MpiComm.h.

Function Documentation

void QUESO::BIP_routine ( glp_tree *  tree,
void *  info 
)

Definition at line 39 of file MLSampling.C.

References QUESO::BaseEnvironment::displayVerbosity(), and QUESO::BaseEnvironment::subDisplayFile().

40 {
41  const BaseEnvironment& env = *(((BIP_routine_struct *) info)->env);
42  unsigned int currLevel = ((BIP_routine_struct *) info)->currLevel;
43 
44  int reason = glp_ios_reason(tree);
45 
46  if ((env.subDisplayFile()) && (env.displayVerbosity() >= 1)) {
47  *env.subDisplayFile() << "In BIP_routine()"
48  << ", level " << currLevel+LEVEL_REF_ID
49  << ": glp_ios_reason() = " << reason
50  << std::endl;
51  }
52  std::cout << "In BIP_routine: reason = " << reason << std::endl;
53 
54  switch (reason) {
55  case GLP_IROWGEN: // 0x01 /* request for row generation */
56  sleep(1);
57  break;
58 
59  case GLP_IBINGO: // 0x02 /* better integer solution found */
60  sleep(1);
61  break;
62 
63  case GLP_IHEUR: // 0x03 /* request for heuristic solution */
64  // Do nothing
65  break;
66 
67  case GLP_ICUTGEN: // 0x04 /* request for cut generation */
68  // Do nothing
69  break;
70 
71  case GLP_IBRANCH: // 0x05 /* request for branching */
72  // Do nothing
73  break;
74 
75  case GLP_ISELECT: // 0x06 /* request for subproblem selection */
76  // Do nothing
77  break;
78 
79  case GLP_IPREPRO: // 0x07 /* request for preprocessing */
80  // Do nothing
81  break;
82 
83  default:
84  queso_error_msg("invalid glp_ios_readon");
85  break;
86  }
87 
88  return;
89 }
template void QUESO::BoostInputOptionsParser::getOption< std::string > ( const std::string &  ,
std::string &   
) const
template<>
void QUESO::BoostInputOptionsParser::getOption< std::vector< double, std::allocator< double > > > ( const std::string &  name,
std::vector< double, std::allocator< double > > &  value 
) const

Definition at line 142 of file BoostInputOptionsParser.C.

References MiscReadDoublesFromString().

143 {
144  queso_deprecated();
145  if (m_scannedInputFile) {
146  // Need to reset value?
147 
148  // Get the option as a string
149  // DM: Why do it this way? Doesn't boost support vectors as input options?
150  std::string optionValue;
151  this->getOption<std::string>(name, optionValue);
152  MiscReadDoublesFromString(optionValue, value);
153  }
154 }
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
template void QUESO::BoostInputOptionsParser::getOption< std::vector< unsigned int, std::allocator< unsigned int > > > ( const std::string &  ,
std::vector< unsigned int, std::allocator< unsigned int > > &   
) const
template void QUESO::BoostInputOptionsParser::registerOption< std::string > ( const std::string &  ,
const std::string &  ,
const std::string &   
)
double QUESO::c_evaluate ( const gsl_vector *  x,
void *  context 
)

Definition at line 43 of file GslOptimizer.C.

References QUESO::GslOptimizer::objectiveFunction().

Referenced by c_evaluate_with_derivative(), QUESO::GslOptimizer::minimize_no_gradient(), and QUESO::GslOptimizer::minimize_with_gradient().

43  {
44 
45  GslOptimizer * optimizer = static_cast<GslOptimizer * >(context);
46 
47  GslVector state(
48  optimizer->objectiveFunction().domainSet().vectorSpace().zeroVector());
49 
50  // DM: Doing this copy sucks, but whatever. It'll do for now.
51  for (unsigned int i = 0; i < state.sizeLocal(); i++) {
52  state[i] = gsl_vector_get(x, i);
53  }
54 
55  // Bail early if GSL tries to evaluate outside of the domain
56  if (!optimizer->objectiveFunction().domainSet().contains(state)) {
57  return GSL_NAN;
58  }
59 
60  // Should cache derivative here so we don't recompute stuff
61  double result = -optimizer->objectiveFunction().lnValue(state);
62 
63  return result;
64  }
void QUESO::c_evaluate_derivative ( const gsl_vector *  x,
void *  context,
gsl_vector *  derivative 
)

Definition at line 67 of file GslOptimizer.C.

References QUESO::BaseOptimizer::getFiniteDifferenceStepSize(), and QUESO::GslOptimizer::objectiveFunction().

Referenced by c_evaluate_with_derivative(), and QUESO::GslOptimizer::minimize_with_gradient().

68  {
69  GslOptimizer * optimizer = static_cast<GslOptimizer * >(context);
70 
71  GslVector state(
72  optimizer->objectiveFunction().domainSet().vectorSpace().zeroVector());
73  GslVector deriv(
74  optimizer->objectiveFunction().domainSet().vectorSpace().zeroVector());
75 
76  // DM: Doing this copy sucks, but whatever. It'll do for now.
77  for (unsigned int i = 0; i < state.sizeLocal(); i++) {
78  state[i] = gsl_vector_get(x, i);
79 
80  // We fill with GSL_NAN and use it as a flag to check later that the user
81  // actually fills the derivative vector with stuff
82  deriv[i] = GSL_NAN;
83  }
84 
85  if (!optimizer->objectiveFunction().domainSet().contains(state)) {
86  // Fill derivative with error codes if the point is outside of the
87  // domain
88  for (unsigned int i = 0; i < deriv.sizeLocal(); i++) {
89  gsl_vector_set(derivative, i, GSL_NAN);
90  }
91  }
92  else {
93  // We should cache the return value here so we don't recompute stuff
94  double fx = -optimizer->objectiveFunction().lnValue(state, deriv);
95 
96  // Decide whether or not we need to do a finite difference based on
97  // whether the user actually filled deriv with values that are not
98  // GSL_NAN
99  //
100  // We're currently doing this check every time this function gets called.
101  // We could probably pull this logic out of here and put it somewhere
102  // where it only happens once
103  bool userComputedDerivative = true;
104  for (unsigned int i = 0; i < deriv.sizeLocal(); i++) {
105  // If the user missed out a derivative in any direction, fall back to
106  // a finite difference
107  if (gsl_isnan(deriv[i])) {
108  userComputedDerivative = false;
109  break;
110  }
111  }
112 
113  if (userComputedDerivative) {
114  for (unsigned int i = 0; i < deriv.sizeLocal(); i++) {
115  gsl_vector_set(derivative, i, -deriv[i]); // We need the minus sign
116  }
117  }
118  else {
119  // Finite difference step-size
120  double h = optimizer->getFiniteDifferenceStepSize();
121 
122  // User did not provide a derivative, so do a finite difference
123  for (unsigned int i = 0; i < deriv.sizeLocal(); i++) {
124  double tempState = state[i];
125  state[i] += h;
126 
127  // User didn't provide a derivative, so we don't bother passing in
128  // the derivative vector again
129  double fxph = -optimizer->objectiveFunction().lnValue(state);
130 
131  // Reset the state back to what it was before
132  state[i] = tempState;
133 
134  // Make sure we didn't do anything dumb and tell gsl if we did
135  if (!gsl_isnan(fx) && !gsl_isnan(fxph)) {
136  gsl_vector_set(derivative, i, (fxph - fx) / h);
137  }
138  else {
139  gsl_vector_set(derivative, i, GSL_NAN);
140  }
141  }
142  }
143  }
144  }
void QUESO::c_evaluate_with_derivative ( const gsl_vector *  x,
void *  context,
double *  f,
gsl_vector *  derivative 
)

Definition at line 147 of file GslOptimizer.C.

References c_evaluate(), and c_evaluate_derivative().

Referenced by QUESO::GslOptimizer::minimize_with_gradient().

148  {
149  // We don't need to call both of these
150  *f = c_evaluate(x, context);
151  c_evaluate_derivative(x, context, derivative);
152  }
void c_evaluate_derivative(const gsl_vector *x, void *context, gsl_vector *derivative)
Definition: GslOptimizer.C:67
double c_evaluate(const gsl_vector *x, void *context)
Definition: GslOptimizer.C:43
int QUESO::CheckFilePath ( const char *  pathname)

int CheckFilePath(const char *path) {

// verify parent directories in path exist (and create if not).

ifdef HAVE_GRVY return(grvy_check_file_path(path)); else

return 0; endif }

Definition at line 362 of file Miscellaneous.C.

References GRVY_CheckDir().

Referenced by QUESO::FullEnvironment::construct(), QUESO::InfiniteDimensionalMCMCSampler::InfiniteDimensionalMCMCSampler(), QUESO::BaseEnvironment::openInputFile(), QUESO::BaseEnvironment::openOutputFile(), QUESO::BaseEnvironment::openUnifiedInputFile(), and QUESO::BaseEnvironment::openUnifiedOutputFile().

363  {
364 
365  // verify parent directories in path exist (and create if not).
366 
367 #ifdef HAVE_GRVY
368  return(grvy_check_file_path(pathname));
369 #else
370 
371  const int MAX_DEPTH = 50;
372 
373  char *pathlocal;
374  char *parents;
375  char *dirstring;
376  char *token;
377  int depth = 0;
378 
379  // Save a copy of pathname and look for the parent directories.
380 
381  pathlocal = strdup(pathname);
382  dirstring = strdup(pathname);
383  parents = dirname(pathlocal);
384 
385  if(strcmp(parents,".") == 0)
386  {
387  free(pathlocal);
388  free(dirstring);
389  return 0;
390  }
391 
392  // Deal with the possibility of an absolute path being provided
393 
394  bool abs_path = false;
395 
396  std::string leading_char("");
397  std::string path_to_check;
398 
399  if(strncmp(parents,"/",1) == 0)
400  {
401  leading_char = "/";
402  abs_path = true;
403  }
404 
405  // Verify existence of top-level directory
406 
407  if( (token = strtok(parents,"/")) != NULL )
408  {
409  path_to_check += leading_char + token;
410 
411  if ( GRVY_CheckDir(path_to_check.c_str()) )
412  {
413  free(pathlocal);
414  free(dirstring);
415  return -1;
416  }
417 
418  // Now, search for any remaining parent directories.
419 
420  if(abs_path)
421  sprintf(dirstring,"/%s",token);
422  else
423  sprintf(dirstring,"%s",token);
424 
425  while ( (token = strtok(0,"/")) && (depth < MAX_DEPTH) )
426  {
427  dirstring = strcat(dirstring,"/");
428 
429  if(GRVY_CheckDir(strcat(dirstring,token)))
430  {
431  free(pathlocal);
432  free(dirstring);
433  return -1;
434  }
435  depth++;
436  };
437 
438  if(depth >= MAX_DEPTH )
439  {
440  std::cerr << __func__ << ": error - Max directory depth exceeded, limit = " << MAX_DEPTH << std::endl;
441  free(pathlocal);
442  free(dirstring);
443  return -1;
444  }
445  }
446 
447  // Clean Up
448  free(pathlocal);
449  free(dirstring);
450 
451  return 0;
452 #endif
453  }
int GRVY_CheckDir(const char *dirname)
QUESO::checkOptions ( )
template<class V , class M >
void QUESO::ComputeConditionalGaussianVectorRV ( const V &  muVec1,
const V &  muVec2,
const M &  sigmaMat11,
const M &  sigmaMat12,
const M &  sigmaMat21,
const M &  sigmaMat22,
const V &  sampleVec2,
V &  muVec1_cond_on_2,
M &  sigmaMat11_cond_on_2 
)

Definition at line 207 of file GaussianVectorRV.C.

References queso_require_equal_to_msg, and QUESO::BaseEnvironment::subDisplayFile().

217 {
218  const BaseEnvironment& env = muVec1.env();
219  unsigned int dim1 = muVec1.sizeLocal();
220  unsigned int dim2 = muVec2.sizeLocal();
221 
222  queso_require_msg(!((sigmaMat11.numRowsLocal() != dim1) || (sigmaMat11.numCols() != dim1)), "invalid sigmaMat11");
223 
224  queso_require_msg(!((sigmaMat12.numRowsLocal() != dim1) || (sigmaMat12.numCols() != dim2)), "invalid sigmaMat12");
225 
226  queso_require_msg(!((sigmaMat21.numRowsLocal() != dim2) || (sigmaMat21.numCols() != dim1)), "invalid sigmaMat21");
227 
228  queso_require_msg(!((sigmaMat22.numRowsLocal() != dim2) || (sigmaMat22.numCols() != dim2)), "invalid sigmaMat22");
229 
230  // Check transpose operation
231  M mat_tt(sigmaMat12);
232  mat_tt.cwSet(0.);
233  mat_tt.fillWithTranspose(0,0,sigmaMat21,true,true);
234  double auxNorm = (mat_tt - sigmaMat12).normFrob();
235  if (auxNorm >= 1.e-12) {
236  if (env.subDisplayFile()) {
237  *env.subDisplayFile() << "In ComputeConditionalGaussianVectorRV()"
238  << ": WARNING, ||sigmaMat21^T - sigmaMat12||_2 = " << auxNorm
239  << std::endl;
240  }
241  }
242  queso_require_less_msg(auxNorm, 1.e-12, "sigmaMat12 and sigmaMat21 are not transpose of each other");
243 
244  queso_require_equal_to_msg(sampleVec2.sizeLocal(), dim2, "invalid sampleVec2");
245 
246  queso_require_equal_to_msg(muVec1_cond_on_2.sizeLocal(), dim1, "invalid muVec1_cond_on_2");
247 
248  queso_require_msg(!((sigmaMat11_cond_on_2.numRowsLocal() != dim1) || (sigmaMat11_cond_on_2.numCols() != dim1)), "invalid sigmaMat11_cond_on_2");
249 
250  muVec1_cond_on_2 = muVec1 + sigmaMat12 * sigmaMat22.invertMultiply(sampleVec2 - muVec2);
251  sigmaMat11_cond_on_2 = sigmaMat11 - sigmaMat12 * sigmaMat22.invertMultiply(sigmaMat21);
252 
253  return;
254 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
template<class T >
void QUESO::ComputeCovCorrBetweenScalarSequences ( const ScalarSequence< T > &  subPSeq,
const ScalarSequence< T > &  subQSeq,
unsigned int  subNumSamples,
T &  covValue,
T &  corrValue 
)

Definition at line 4040 of file ScalarSequence.C.

References QUESO::ScalarSequence< T >::env(), QUESO::BaseEnvironment::inter0Comm(), QUESO::BaseEnvironment::inter0Rank(), QUESO::ScalarSequence< T >::subSequenceSize(), QUESO::ScalarSequence< T >::unifiedMeanExtra(), and QUESO::ScalarSequence< T >::unifiedSampleVarianceExtra().

Referenced by ComputeSubGaussian2dKde().

4046 {
4047  // Check input data consistency
4048  const BaseEnvironment& env = subPSeq.env();
4049 
4050  queso_require_msg(!((subNumSamples > subPSeq.subSequenceSize()) || (subNumSamples > subQSeq.subSequenceSize())), "subNumSamples is too large");
4051 
4052  // For both P and Q vector sequences: fill them
4053  T tmpP = 0.;
4054  T tmpQ = 0.;
4055 
4056  // For both P and Q vector sequences: compute the unified mean
4057  T unifiedMeanP = subPSeq.unifiedMeanExtra(true,0,subNumSamples);
4058  T unifiedMeanQ = subQSeq.unifiedMeanExtra(true,0,subNumSamples);
4059 
4060  // Compute "sub" covariance matrix
4061  covValue = 0.;
4062  for (unsigned k = 0; k < subNumSamples; ++k) {
4063  // For both P and Q vector sequences: get the difference (wrt the unified mean) in them
4064  tmpP = subPSeq[k] - unifiedMeanP;
4065  tmpQ = subQSeq[k] - unifiedMeanQ;
4066  covValue += tmpP*tmpQ;
4067  }
4068 
4069  // For both P and Q vector sequences: compute the unified variance
4070  T unifiedSampleVarianceP = subPSeq.unifiedSampleVarianceExtra(true,
4071  0,
4072  subNumSamples,
4073  unifiedMeanP);
4074 
4075  T unifiedSampleVarianceQ = subQSeq.unifiedSampleVarianceExtra(true,
4076  0,
4077  subNumSamples,
4078  unifiedMeanQ);
4079 
4080  // Compute unified covariance
4081  if (env.inter0Rank() >= 0) {
4082  unsigned int unifiedNumSamples = 0;
4083  env.inter0Comm().template Allreduce<unsigned int>(&subNumSamples, &unifiedNumSamples, (int) 1, RawValue_MPI_SUM,
4084  "ComputeCovCorrBetweenScalarSequences()",
4085  "failed MPI.Allreduce() for subNumSamples");
4086 
4087  double aux = 0.;
4088  env.inter0Comm().template Allreduce<double>(&covValue, &aux, (int) 1, RawValue_MPI_SUM,
4089  "ComputeCovCorrBetweenScalarSequences()",
4090  "failed MPI.Allreduce() for a matrix position");
4091  covValue = aux/((double) (unifiedNumSamples-1)); // Yes, '-1' in order to compensate for the 'N-1' denominator factor in the calculations of sample variances above (whose square roots will be used below)
4092 
4093  corrValue = covValue/std::sqrt(unifiedSampleVarianceP)/std::sqrt(unifiedSampleVarianceQ);
4094 
4095  if ((corrValue < -1.) || (corrValue > 1.)) { // prudencio 2010-07-23
4096  std::cerr << "In ComputeCovCorrBetweenScalarSequences()"
4097  << ": computed correlation is out of range, corrValue = " << corrValue
4098  << std::endl;
4099  }
4100 
4101  // env.worldRank(),
4102  // "ComputeCovCorrBetweenScalarSequences()",
4103  // "computed correlation is out of range");
4104  }
4105  else {
4106  // Node not in the 'inter0' communicator: do nothing extra
4107  }
4108 
4109  return;
4110 }
template<class P_V , class P_M , class Q_V , class Q_M >
void QUESO::ComputeCovCorrMatricesBetweenVectorRvs ( const BaseVectorRV< P_V, P_M > &  paramRv,
const BaseVectorRV< Q_V, Q_M > &  qoiRv,
unsigned int  localNumSamples,
P_M &  pqCovMatrix,
P_M &  pqCorrMatrix 
)

Definition at line 209 of file VectorRV.C.

References ComputeCovCorrMatricesBetweenVectorSequences(), QUESO::BaseVectorRV< V, M >::imageSet(), QUESO::VectorSpace< V, M >::numOfProcsForStorage(), QUESO::BaseVectorRealizer< V, M >::realization(), QUESO::BaseVectorRV< V, M >::realizer(), QUESO::VectorSet< V, M >::vectorSpace(), and QUESO::VectorSpace< V, M >::zeroVector().

215 {
216  // Check input data consistency
217  bool useOnlyInter0Comm = (paramRv.imageSet().vectorSpace().numOfProcsForStorage() == 1) &&
218  (qoiRv.imageSet().vectorSpace().numOfProcsForStorage() == 1);
219 
220  queso_require_msg(useOnlyInter0Comm, "parallel vectors not supported yet");
221 
222  unsigned int numRows = paramRv.imageSet().vectorSpace().dim();
223  unsigned int numCols = qoiRv.imageSet().vectorSpace().dim();
224 
225  queso_require_msg(!((numRows != pqCovMatrix.numRows()) || (numCols != pqCovMatrix.numCols())), "inconsistent dimensions for covariance matrix");
226 
227  queso_require_msg(!((numRows != pqCorrMatrix.numRows()) || (numCols != pqCorrMatrix.numCols())), "inconsistent dimensions for correlation matrix");
228 
229  queso_require_msg(!((localNumSamples > paramRv.realizer().period()) || (localNumSamples > qoiRv.realizer().period())), "localNumSamples is too large");
230 
231  // For both P and Q vector sequences: fill them
232  P_V tmpP(paramRv.imageSet().vectorSpace().zeroVector());
233  Q_V tmpQ(qoiRv.imageSet().vectorSpace().zeroVector());
234 
235  SequenceOfVectors<P_V,P_M> localWorkingPSeq(paramRv.imageSet().vectorSpace(),
236  localNumSamples,
237  "covTmpP");
238  SequenceOfVectors<Q_V,Q_M> localWorkingQSeq(qoiRv.imageSet().vectorSpace(),
239  localNumSamples,
240  "covTmpQ");
241  for (unsigned int k = 0; k < localNumSamples; ++k) {
242  paramRv.realizer().realization(tmpP);
243  localWorkingPSeq.setPositionValues(k,tmpP);
244 
245  qoiRv.realizer().realization(tmpQ);
246  localWorkingQSeq.setPositionValues(k,tmpQ);
247  }
248 
250  localWorkingQSeq,
251  localNumSamples,
252  pqCovMatrix,
253  pqCorrMatrix);
254 
255  return;
256 }
const V & zeroVector() const
Returns a vector filled with zeros.
Definition: VectorSpace.C:174
unsigned int numOfProcsForStorage() const
Returns total number of processes.
Definition: VectorSpace.C:149
virtual void realization(V &nextValues) const =0
Performs a realization (sample) from a probability density function. See template specialization...
const VectorSet< V, M > & imageSet() const
Image set of the vector RV; access to private attribute m_imageSet.
Definition: VectorRV.C:83
virtual const VectorSpace< V, M > & vectorSpace() const =0
Vector space to which this set belongs to. See template specialization.
const BaseVectorRealizer< V, M > & realizer() const
Finds a realization (sample) of the PDF of this vector RV; access to private attribute m_realizer...
Definition: VectorRV.C:106
void ComputeCovCorrMatricesBetweenVectorSequences(const BaseVectorSequence< P_V, P_M > &subPSeq, const BaseVectorSequence< Q_V, Q_M > &subQSeq, unsigned int subNumSamples, P_M &pqCovMatrix, P_M &pqCorrMatrix)
template<class P_V , class P_M , class Q_V , class Q_M >
void QUESO::ComputeCovCorrMatricesBetweenVectorSequences ( const BaseVectorSequence< P_V, P_M > &  subPSeq,
const BaseVectorSequence< Q_V, Q_M > &  subQSeq,
unsigned int  subNumSamples,
P_M &  pqCovMatrix,
P_M &  pqCorrMatrix 
)

Definition at line 2774 of file VectorSequence.C.

References QUESO::MpiComm::Barrier(), QUESO::VectorSpace< V, M >::dimGlobal(), QUESO::VectorSpace< V, M >::dimLocal(), QUESO::BaseVectorSequence< V, M >::getPositionValues(), QUESO::BaseEnvironment::inter0Comm(), QUESO::BaseEnvironment::inter0Rank(), QUESO::VectorSpace< V, M >::numOfProcsForStorage(), QUESO::BaseVectorSequence< V, M >::subSequenceSize(), QUESO::BaseVectorSequence< V, M >::unifiedMeanExtra(), QUESO::BaseVectorSequence< V, M >::unifiedSampleVarianceExtra(), QUESO::BaseVectorSequence< V, M >::vectorSpace(), QUESO::BaseEnvironment::worldRank(), and QUESO::VectorSpace< V, M >::zeroVector().

Referenced by QUESO::BaseVectorSequence< V, M >::computeCovCorrMatrices(), ComputeCovCorrMatricesBetweenVectorRvs(), and QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::solveWithMonteCarlo().

2780 {
2781  queso_require_greater_equal_msg(subNumSamples, 2,
2782  "must provide at least 2 samples to compute correlation matrices");
2783 
2784  // Check input data consistency
2785  const BaseEnvironment& env = subPSeq.vectorSpace().zeroVector().env();
2786 
2787  bool useOnlyInter0Comm = (subPSeq.vectorSpace().numOfProcsForStorage() == 1) &&
2788  (subQSeq.vectorSpace().numOfProcsForStorage() == 1);
2789 
2790  queso_require_msg(useOnlyInter0Comm, "parallel vectors not supported yet");
2791 
2792  unsigned int numRowsLocal = subPSeq.vectorSpace().dimLocal();
2793  unsigned int numCols = subQSeq.vectorSpace().dimGlobal();
2794 
2795  queso_require_msg(!((numRowsLocal != pqCovMatrix.numRowsLocal()) || (numCols != pqCovMatrix.numCols())), "inconsistent dimensions for covariance matrix");
2796 
2797  queso_require_msg(!((numRowsLocal != pqCorrMatrix.numRowsLocal()) || (numCols != pqCorrMatrix.numCols())), "inconsistent dimensions for correlation matrix");
2798 
2799  queso_require_msg(!((subNumSamples > subPSeq.subSequenceSize()) || (subNumSamples > subQSeq.subSequenceSize())), "subNumSamples is too large");
2800 
2801  // For both P and Q vector sequences: fill them
2802  P_V tmpP(subPSeq.vectorSpace().zeroVector());
2803  Q_V tmpQ(subQSeq.vectorSpace().zeroVector());
2804 
2805  // For both P and Q vector sequences: compute the unified mean
2806  P_V unifiedMeanP(subPSeq.vectorSpace().zeroVector());
2807  subPSeq.unifiedMeanExtra(0,subNumSamples,unifiedMeanP);
2808 
2809  Q_V unifiedMeanQ(subQSeq.vectorSpace().zeroVector());
2810  subQSeq.unifiedMeanExtra(0,subNumSamples,unifiedMeanQ);
2811 
2812  // Compute "sub" covariance matrix
2813  for (unsigned i = 0; i < numRowsLocal; ++i) {
2814  for (unsigned j = 0; j < numCols; ++j) {
2815  pqCovMatrix(i,j) = 0.;
2816  }
2817  }
2818  for (unsigned k = 0; k < subNumSamples; ++k) {
2819  // For both P and Q vector sequences: get the difference (wrt the unified mean) in them
2820  subPSeq.getPositionValues(k,tmpP);
2821  tmpP -= unifiedMeanP;
2822 
2823  subQSeq.getPositionValues(k,tmpQ);
2824  tmpQ -= unifiedMeanQ;
2825 
2826  for (unsigned i = 0; i < numRowsLocal; ++i) {
2827  for (unsigned j = 0; j < numCols; ++j) {
2828  pqCovMatrix(i,j) += tmpP[i]*tmpQ[j];
2829  }
2830  }
2831  }
2832 
2833  // For both P and Q vector sequences: compute the unified variance
2834  P_V unifiedSampleVarianceP(subPSeq.vectorSpace().zeroVector());
2835  subPSeq.unifiedSampleVarianceExtra(0,
2836  subNumSamples,
2837  unifiedMeanP,
2838  unifiedSampleVarianceP);
2839 
2840  Q_V unifiedSampleVarianceQ(subQSeq.vectorSpace().zeroVector());
2841  subQSeq.unifiedSampleVarianceExtra(0,
2842  subNumSamples,
2843  unifiedMeanQ,
2844  unifiedSampleVarianceQ);
2845 
2846  // Check the variance is positive in every component
2847  double minSampleVarianceP;
2848  double minSampleVarianceQ;
2849  minSampleVarianceP = unifiedSampleVarianceP.getMinValue();
2850  minSampleVarianceQ = unifiedSampleVarianceQ.getMinValue();
2851  queso_require_greater_msg(minSampleVarianceP, 0.0, "sample variance is not positive");
2852  queso_require_greater_msg(minSampleVarianceQ, 0.0, "sample variance is not positive");
2853 
2854  // Compute unified covariance matrix
2855  if (useOnlyInter0Comm) {
2856  if (env.inter0Rank() >= 0) {
2857  unsigned int unifiedNumSamples = 0;
2858  env.inter0Comm().template Allreduce<unsigned int>(&subNumSamples, &unifiedNumSamples, (int) 1, RawValue_MPI_SUM,
2859  "ComputeCovCorrMatricesBetweenVectorSequences()",
2860  "failed MPI.Allreduce() for subNumSamples");
2861 
2862  for (unsigned i = 0; i < numRowsLocal; ++i) {
2863  for (unsigned j = 0; j < numCols; ++j) {
2864  double aux = 0.;
2865  env.inter0Comm().template Allreduce<double>(&pqCovMatrix(i,j), &aux, (int) 1, RawValue_MPI_SUM,
2866  "ComputeCovCorrMatricesBetweenVectorSequences()",
2867  "failed MPI.Allreduce() for a matrix position");
2868  pqCovMatrix(i,j) = aux/((double) (unifiedNumSamples-1)); // Yes, '-1' in order to compensate for the 'N-1' denominator factor in the calculations of sample variances above (whose square roots will be used below)
2869  }
2870  }
2871 
2872  for (unsigned i = 0; i < numRowsLocal; ++i) {
2873  for (unsigned j = 0; j < numCols; ++j) {
2874  pqCorrMatrix(i,j) = pqCovMatrix(i,j)/std::sqrt(unifiedSampleVarianceP[i])/std::sqrt(unifiedSampleVarianceQ[j]);
2875  if (((pqCorrMatrix(i,j) + 1.) < -1.e-8) ||
2876  ((pqCorrMatrix(i,j) - 1.) > 1.e-8)) {
2877  if (env.inter0Rank() == 0) {
2878  std::cerr << "In ComputeCovCorrMatricesBetweenVectorSequences()"
2879  << ": worldRank = " << env.worldRank()
2880  << ", i = " << i
2881  << ", j = " << j
2882  << ", pqCorrMatrix(i,j)+1 = " << pqCorrMatrix(i,j)+1.
2883  << ", pqCorrMatrix(i,j)-1 = " << pqCorrMatrix(i,j)-1.
2884  << std::endl;
2885  }
2886  env.inter0Comm().Barrier();
2887  }
2888  queso_require_greater_equal_msg
2889  (pqCorrMatrix(i,j), -1. - 1.e-8,
2890  "computed correlation is out of range");
2891  queso_require_less_equal_msg
2892  (pqCorrMatrix(i,j), 1. + 1.e-8,
2893  "computed correlation is out of range");
2894  }
2895  }
2896  }
2897  else {
2898  // Node not in the 'inter0' communicator: do nothing extra
2899  }
2900  }
2901  else {
2902  queso_require_msg(useOnlyInter0Comm, "parallel vectors not supported yet (2)");
2903  }
2904 
2905  return;
2906 }
const V & zeroVector() const
Returns a vector filled with zeros.
Definition: VectorSpace.C:174
unsigned int dimGlobal() const
Definition: VectorSpace.C:161
virtual unsigned int subSequenceSize() const =0
Size of the sub-sequence of vectors. See template specialization.
virtual void unifiedMeanExtra(unsigned int initialPos, unsigned int numPos, V &unifiedMeanVec) const =0
Finds the mean value of the unified sequence of numPos positions starting at position initialPos...
virtual void unifiedSampleVarianceExtra(unsigned int initialPos, unsigned int numPos, const V &unifiedMeanVec, V &unifiedSamVec) const =0
Finds the sample variance of the unified sequence, considering numPos positions starting at position ...
unsigned int numOfProcsForStorage() const
Returns total number of processes.
Definition: VectorSpace.C:149
virtual void getPositionValues(unsigned int posId, V &vec) const =0
Gets the values of the sequence at position posId and stores them at vec. See template specialization...
const VectorSpace< V, M > & vectorSpace() const
Vector space; access to protected attribute VectorSpace&lt;V,M&gt;&amp; m_vectorSpace.
double QUESO::computeMI_ANN ( ANNpointArray  dataXY,
unsigned int  dimX,
unsigned int  dimY,
unsigned int  k,
unsigned int  N,
double  eps 
)

Computes the mutual information

Definition at line 161 of file InfoTheory_impl.h.

References annAllocPts(), annDeallocPts(), ANNkd_tree::annkFRSearch(), distANN_XY(), and normalizeANN_XY().

Referenced by estimateMI_ANN().

164 {
165 
166  ANNpointArray dataX, dataY;
167  double* distsXY;
168  double MI_est;
169  ANNkd_tree* kdTreeX;
170  ANNkd_tree* kdTreeY;
171 
172  unsigned int dimXY = dimX + dimY;
173 
174  // Allocate memory
175  dataX = annAllocPts(N,dimX);
176  dataY = annAllocPts(N,dimY);
177  distsXY = new double[N];
178 
179  // Normalize data and populate the marginals dataX, dataY
180  normalizeANN_XY( dataXY, dimXY, dataX, dimX, dataY, dimY, N);
181 
182  // Get distance to knn for each point
183  kdTreeX = new ANNkd_tree( dataX, N, dimX );
184  kdTreeY = new ANNkd_tree( dataY, N, dimY );
185  distANN_XY( dataXY, dataXY, distsXY, dimXY, dimXY, N, N, k, eps );
186 
187  // Compute mutual information
188  double marginal_contrib = 0.0;
189  for( unsigned int i = 0; i < N; i++ ) {
190  // get the number of points within a specified radius
191  int no_pts_X = kdTreeX->annkFRSearch( dataX[ i ], distsXY[ i ], 0, NULL, NULL, eps);
192  int no_pts_Y = kdTreeY->annkFRSearch( dataY[ i ], distsXY[ i ], 0, NULL, NULL, eps);
193  // digamma evaluations
194  marginal_contrib += gsl_sf_psi_int( no_pts_X+1 ) + gsl_sf_psi_int( no_pts_Y+1 );
195  }
196  MI_est = gsl_sf_psi_int( k ) + gsl_sf_psi_int( N ) - marginal_contrib / (double)N;
197 
198  // Deallocate memory
199  delete kdTreeX;
200  delete kdTreeY;
201  delete [] distsXY;
202  annDeallocPts( dataX );
203  annDeallocPts( dataY );
204 
205  return MI_est;
206 
207 }
ANNpoint * ANNpointArray
Definition: ANN.h:376
int annkFRSearch(ANNpoint q, ANNdist sqRad, int k, ANNidxArray nn_idx=NULL, ANNdistArray dd=NULL, double eps=0.0)
void distANN_XY(const ANNpointArray dataX, const ANNpointArray dataY, double *distsXY, unsigned int dimX, unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
DLL_API void annDeallocPts(ANNpointArray &pa)
Definition: ANN.cpp:133
void normalizeANN_XY(ANNpointArray dataXY, unsigned int dimXY, ANNpointArray dataX, unsigned int dimX, ANNpointArray dataY, unsigned int dimY, unsigned int N)
DLL_API ANNpointArray annAllocPts(int n, int dim)
Definition: ANN.cpp:117
template<class T >
void QUESO::ComputeSubGaussian2dKde ( const ScalarSequence< T > &  scalarSeq1,
const ScalarSequence< T > &  scalarSeq2,
unsigned int  initialPos,
double  scaleValue1,
double  scaleValue2,
const std::vector< T > &  evaluationPositions1,
const std::vector< T > &  evaluationPositions2,
std::vector< double > &  densityValues 
)

Definition at line 3931 of file ScalarSequence.C.

References ComputeCovCorrBetweenScalarSequences(), queso_require_equal_to_msg, and QUESO::ScalarSequence< T >::subSequenceSize().

Referenced by ComputeUnifiedGaussian2dKde().

3939 {
3940  queso_require_equal_to_msg(initialPos, 0, "not implemented yet for initialPos != 0");
3941 
3942  double covValue = 0.;
3943  double corrValue = 0.;
3945  scalarSeq2,
3946  scalarSeq1.subSequenceSize(),
3947  covValue,
3948  corrValue);
3949 
3950  bool bRC = ((initialPos < scalarSeq1.subSequenceSize()) &&
3951  (scalarSeq1.subSequenceSize() == scalarSeq2.subSequenceSize()) &&
3952  (0 < evaluationPositions1.size() ) &&
3953  (evaluationPositions1.size() == evaluationPositions2.size() ) &&
3954  (evaluationPositions1.size() == densityValues.size() ));
3955  queso_require_msg(bRC, "invalid input data");
3956 
3957  unsigned int dataSize = scalarSeq1.subSequenceSize() - initialPos;
3958  unsigned int numEvals = evaluationPositions1.size();
3959 
3960  double scale1Inv = 1./scaleValue1;
3961  double scale2Inv = 1./scaleValue2;
3962  //corrValue = 0.;
3963  double r = 1. - corrValue*corrValue;
3964  if (r <= 0.) { // prudencio 2010-07-23
3965  std::cerr << "In ComputeSubGaussian2dKde()"
3966  << ": WARNING, r = " << r
3967  << std::endl;
3968  }
3969 
3970  // scalarSeq1.env().worldRank(),
3971  // "ComputeSubGaussian2dKde()",
3972  // "negative r");
3973  for (unsigned int j = 0; j < numEvals; ++j) {
3974  double x1 = evaluationPositions1[j];
3975  double x2 = evaluationPositions2[j];
3976  double value = 0.;
3977  for (unsigned int k = 0; k < dataSize; ++k) {
3978  double d1k = scale1Inv*(x1 - scalarSeq1[initialPos+k]);
3979  double d2k = scale2Inv*(x2 - scalarSeq2[initialPos+k]);
3980  value += exp(-.5*( d1k*d1k + 2*corrValue*d1k*d2k + d2k*d2k )/r);
3981  }
3982  densityValues[j] = scale1Inv * scale2Inv * (value/(double) dataSize) / 2. / M_PI / sqrt(r);
3983  }
3984 
3985  return;
3986 }
void ComputeCovCorrBetweenScalarSequences(const ScalarSequence< T > &subPSeq, const ScalarSequence< T > &subQSeq, unsigned int subNumSamples, T &covValue, T &corrValue)
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
template<class T >
void QUESO::ComputeUnifiedGaussian2dKde ( bool  useOnlyInter0Comm,
const ScalarSequence< T > &  scalarSeq1,
const ScalarSequence< T > &  scalarSeq2,
unsigned int  initialPos,
double  unifiedScaleValue1,
double  unifiedScaleValue2,
const std::vector< T > &  unifiedEvaluationPositions1,
const std::vector< T > &  unifiedEvaluationPositions2,
std::vector< double > &  unifiedDensityValues 
)

Definition at line 3990 of file ScalarSequence.C.

References ComputeSubGaussian2dKde(), QUESO::ScalarSequence< T >::env(), QUESO::BaseEnvironment::inter0Rank(), and QUESO::BaseEnvironment::numSubEnvironments().

3999 {
4000  if (scalarSeq1.env().numSubEnvironments() == 1) {
4001  return ComputeSubGaussian2dKde(scalarSeq1,
4002  scalarSeq2,
4003  initialPos,
4004  unifiedScaleValue1,
4005  unifiedScaleValue2,
4006  unifiedEvaluationPositions1,
4007  unifiedEvaluationPositions2,
4008  unifiedDensityValues);
4009  }
4010 
4011  // As of 14/Nov/2009, this routine needs to be checked if it requires sub sequences to have equal size. Good.
4012 
4013  if (useOnlyInter0Comm) {
4014  if (scalarSeq1.env().inter0Rank() >= 0) {
4015  queso_error_msg("inter0 case not supported yet");
4016  }
4017  else {
4018  // Node not in the 'inter0' communicator
4019  ComputeSubGaussian2dKde(scalarSeq1,
4020  scalarSeq2,
4021  initialPos,
4022  unifiedScaleValue1,
4023  unifiedScaleValue2,
4024  unifiedEvaluationPositions1,
4025  unifiedEvaluationPositions2,
4026  unifiedDensityValues);
4027  }
4028  }
4029  else {
4030  queso_error_msg("parallel vectors not supported yet");
4031  }
4032 
4033  //scalarSeq1.env().fullComm().Barrier();
4034 
4035  return;
4036 }
void ComputeSubGaussian2dKde(const ScalarSequence< T > &scalarSeq1, const ScalarSequence< T > &scalarSeq2, unsigned int initialPos, double scaleValue1, double scaleValue2, const std::vector< T > &evaluationPositions1, const std::vector< T > &evaluationPositions2, std::vector< double > &densityValues)
template<class V , class M >
void QUESO::CovCond ( double  condNumber,
const V &  direction,
M &  covMatrix,
M &  precMatrix 
)

Definition at line 30 of file CovCond.C.

References leftDiagScaling(), and matrixProduct().

32 {
33  //std::cout << "Entering CovCond()"
34  // << std::endl;
35 
36  V v1(direction);
37  //std::cout << "In CovCond(), v1 contents are:"
38  // << std::endl
39  // << v1
40  // << std::endl;
41 
42  V v2(direction,condNumber,1.0); // MATLAB linspace
43  v2.cwInvert();
44  v2.sort();
45  //std::cout << "In CovCond(), v2 contents are:"
46  // << std::endl
47  // << v2
48  // << std::endl;
49 
50  double v1Norm2 = v1.norm2();
51  if (v1[0] >=0) v1[0] += v1Norm2;
52  else v1[0] -= v1Norm2;
53  double v1Norm2Sq = v1.norm2Sq();
54 
55  M Z(direction,1.0);
56  Z -= (2./v1Norm2Sq) * matrixProduct(v1,v1);
57  //std::cout << "In CovCond(), Z contents are:"
58  // << std::endl
59  // << Z
60  // << std::endl;
61 
62  M Zt(Z.transpose());
63  covMatrix = Z * leftDiagScaling(v2, Zt);
64  precMatrix = Z * leftDiagScaling(1./v2,Zt);
65 
66  //std::cout << "Leaving CovCond()"
67  // << std::endl;
68 }
GslMatrix matrixProduct(const GslVector &v1, const GslVector &v2)
Definition: GslMatrix.C:2036
GslMatrix leftDiagScaling(const GslVector &vec, const GslMatrix &mat)
Definition: GslMatrix.C:2052
void QUESO::distANN_XY ( const ANNpointArray  dataX,
const ANNpointArray  dataY,
double *  distsXY,
unsigned int  dimX,
unsigned int  dimY,
unsigned int  xN,
unsigned int  yN,
unsigned int  k,
double  eps 
)

For each point q in dataX, this performs a k-Nearest Neighbours search of the points in dataY closest to q. The array distsXY is filled with the distance from q to the k-th nearest neighbour.

Definition at line 40 of file InfoTheory_impl.h.

References annClose(), and ANNkd_tree::annkSearch().

Referenced by computeMI_ANN(), estimateCE_ANN(), QUESO::BaseVectorRV< V, M >::estimateENT_ANN(), and estimateKL_ANN().

45 {
46 
47  ANNkd_tree* kdTree;
48  ANNdistArray nnDist;
49  ANNidxArray nnIdx;
50 
51  // Allocate memory
52  nnIdx = new ANNidx[ k+1 ];
53  nnDist = new ANNdist[ k+1 ];
54  kdTree = new ANNkd_tree( dataY, yN, dimY );
55 
56  // Get the distances to all the points
57  for( unsigned int i = 0; i < xN ; i++ )
58  {
59  kdTree->annkSearch( dataX[ i ], k+1, nnIdx, nnDist, eps );
60 
61  double my_dist = nnDist[ k ];
62 
63  // check to see if the dist is zero (query point same as the kNN)
64  // if so find the next k that gives the next positive distance
65  if( my_dist == 0.0 )
66  {
67  ANNdistArray nnDist_tmp = new ANNdist[ yN ];
68  ANNidxArray nnIdx_tmp = new ANNidx[ yN ];
69  kdTree->annkSearch( dataX[ i ], yN, nnIdx_tmp, nnDist_tmp, eps );
70 
71  for( unsigned int my_k = k + 1; my_k < yN; ++my_k )
72  if( nnDist_tmp[ my_k ] > 0.0 )
73  {
74  my_dist = nnDist_tmp[ my_k ];
75  break;
76  }
77  delete [] nnIdx_tmp;
78  delete [] nnDist_tmp;
79  }
80 
81  distsXY[ i ] = my_dist;
82  }
83 
84  // Deallocate memory
85  delete [] nnIdx;
86  delete [] nnDist;
87  delete kdTree;
88  annClose();
89 
90  return;
91 }
DLL_API void annClose()
Definition: kd_tree.cpp:221
int ANNidx
Definition: ANN.h:175
double ANNdist
Definition: ANN.h:159
void annkSearch(ANNpoint q, int k, ANNidxArray nn_idx, ANNdistArray dd, double eps=0.0)
Definition: kd_search.cpp:89
ANNdist * ANNdistArray
Definition: ANN.h:377
ANNidx * ANNidxArray
Definition: ANN.h:378
template<class P_V , class P_M , template< class P_V, class P_M > class RV_1, template< class P_V, class P_M > class RV_2>
double QUESO::estimateCE_ANN ( RV_1< P_V, P_M > &  xRV,
RV_2< P_V, P_M > &  yRV,
unsigned int  xDimSel[],
unsigned int  dimX,
unsigned int  yDimSel[],
unsigned int  dimY,
unsigned int  xN,
unsigned int  yN,
unsigned int  k,
double  eps 
)

Function: estimateCE_ANN (Cross Entropy)

Estimates the cross-entropy of two queso random variables xRV and yRV

Definition at line 385 of file InfoTheory_impl.h.

References annAllocPts(), annDeallocPts(), and distANN_XY().

391 {
392  ANNpointArray dataX;
393  ANNpointArray dataY;
394  double* distsXY;
395  double CE_est;
396 
397  // sanity check
398  if( dimX != dimY ) {
399  queso_error_msg("Error-CE: the dimensions should agree");
400  }
401 
402  // Allocate memory
403  dataX = annAllocPts( xN, dimX );
404  dataY = annAllocPts( yN, dimY );
405  distsXY = new double[xN];
406 
407  // Copy X samples in ANN data structure
408  P_V xSmpRV( xRV.imageSet().vectorSpace().zeroVector() );
409  for( unsigned int i = 0; i < xN; i++ ) {
410  // get a sample from the distribution
411  xRV.realizer().realization( xSmpRV );
412  // copy the vector values in the ANN data structure
413  for( unsigned int j = 0; j < dimX; j++ ) {
414  dataX[ i ][ j ] = xSmpRV[ xDimSel[j] ];
415  }
416  }
417 
418  // Copy Y samples in ANN data structure
419  P_V ySmpRV( yRV.imageSet().vectorSpace().zeroVector() );
420  for( unsigned int i = 0; i < yN; i++ ) {
421  // get a sample from the distribution
422  yRV.realizer().realization( ySmpRV );
423  // copy the vector values in the ANN data structure
424  for( unsigned int j = 0; j < dimY; j++ ) {
425  dataY[ i ][ j ] = ySmpRV[ yDimSel[j] ];
426  }
427  }
428 
429  // Get distance to knn for each point
430  distANN_XY( dataX, dataY, distsXY, dimX, dimY, xN, yN, k, eps );
431 
432  // Compute cross entropy estimate
433  double sum_log = 0.0;
434  for( unsigned int i = 0; i < xN; i++ )
435  {
436  sum_log += log( distsXY[i] );
437  }
438  CE_est = (double)dimX/(double)xN * sum_log + log( (double)yN ) - gsl_sf_psi_int( k );
439 
440  // Deallocate memory
441  annDeallocPts( dataX );
442  annDeallocPts( dataY );
443  delete [] distsXY;
444 
445  return CE_est;
446 }
ANNpoint * ANNpointArray
Definition: ANN.h:376
void distANN_XY(const ANNpointArray dataX, const ANNpointArray dataY, double *distsXY, unsigned int dimX, unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
DLL_API void annDeallocPts(ANNpointArray &pa)
Definition: ANN.cpp:133
DLL_API ANNpointArray annAllocPts(int n, int dim)
Definition: ANN.cpp:117
template<class P_V , class P_M , template< class P_V, class P_M > class RV_1, template< class P_V, class P_M > class RV_2>
double QUESO::estimateKL_ANN ( RV_1< P_V, P_M > &  xRV,
RV_2< P_V, P_M > &  yRV,
unsigned int  xDimSel[],
unsigned int  dimX,
unsigned int  yDimSel[],
unsigned int  dimY,
unsigned int  xN,
unsigned int  yN,
unsigned int  k,
double  eps 
)

Function: estimateKL_ANN (Kullback-Leibler divergence)

Computes the Kullback-Leibler divergence between two queso random variables xRV and yRV.

Definition at line 310 of file InfoTheory_impl.h.

References annAllocPts(), annDeallocPts(), and distANN_XY().

316 {
317  ANNpointArray dataX;
318  ANNpointArray dataY;
319  double* distsX;
320  double* distsXY;
321  double KL_est;
322 
323  // sanity check
324  if( dimX != dimY ) {
325  queso_error_msg("Error-KL: the dimensions should agree");
326  }
327 
328  // Allocate memory
329  dataX = annAllocPts( xN, dimX );
330  dataY = annAllocPts( yN, dimY );
331  distsX = new double[xN];
332  distsXY = new double[xN];
333 
334  // Copy X samples in ANN data structure
335  P_V xSmpRV( xRV.imageSet().vectorSpace().zeroVector() );
336  for( unsigned int i = 0; i < xN; i++ ) {
337  // get a sample from the distribution
338  xRV.realizer().realization( xSmpRV );
339  // copy the vector values in the ANN data structure
340  for( unsigned int j = 0; j < dimX; j++ ) {
341  dataX[ i ][ j ] = xSmpRV[ xDimSel[j] ];
342  }
343  }
344 
345  // Copy Y samples in ANN data structure
346  P_V ySmpRV( yRV.imageSet().vectorSpace().zeroVector() );
347  for( unsigned int i = 0; i < yN; i++ ) {
348  // get a sample from the distribution
349  yRV.realizer().realization( ySmpRV );
350  // copy the vector values in the ANN data structure
351  for( unsigned int j = 0; j < dimY; j++ ) {
352  dataY[ i ][ j ] = ySmpRV[ yDimSel[j] ];
353  }
354  }
355 
356  // Get distance to knn for each point
357  distANN_XY( dataX, dataX, distsX, dimX, dimX, xN, xN, k+1, eps ); // k+1 because the 1st nn is itself
358  distANN_XY( dataX, dataY, distsXY, dimX, dimY, xN, yN, k, eps );
359 
360  // Compute KL-divergence estimate
361  double sum_log_ratio = 0.0;
362  for( unsigned int i = 0; i < xN; i++ )
363  {
364  sum_log_ratio += log( distsXY[i] / distsX[i] );
365  }
366  KL_est = (double)dimX/(double)xN * sum_log_ratio + log( (double)yN / ((double)xN-1.0 ) );
367 
368  // Deallocate memory
369  annDeallocPts( dataX );
370  annDeallocPts( dataY );
371  delete [] distsX;
372  delete [] distsXY;
373 
374  return KL_est;
375 }
ANNpoint * ANNpointArray
Definition: ANN.h:376
void distANN_XY(const ANNpointArray dataX, const ANNpointArray dataY, double *distsXY, unsigned int dimX, unsigned int dimY, unsigned int xN, unsigned int yN, unsigned int k, double eps)
DLL_API void annDeallocPts(ANNpointArray &pa)
Definition: ANN.cpp:133
DLL_API ANNpointArray annAllocPts(int n, int dim)
Definition: ANN.cpp:117
template<template< class P_V, class P_M > class RV, class P_V , class P_M >
double QUESO::estimateMI_ANN ( const RV< P_V, P_M > &  jointRV,
const unsigned int  xDimSel[],
unsigned int  dimX,
const unsigned int  yDimSel[],
unsigned int  dimY,
unsigned int  k,
unsigned int  N,
double  eps 
)

Function: estimateMI_ANN (using a joint) (Mutual Information)

Computes the mutual information using a queso joint RV

Definition at line 214 of file InfoTheory_impl.h.

References annAllocPts(), annDeallocPts(), and computeMI_ANN().

218 {
219  ANNpointArray dataXY;
220  double MI_est;
221 
222  unsigned int dimXY = dimX + dimY;
223 
224  // Allocate memory
225  dataXY = annAllocPts(N,dimXY);
226 
227  // Copy samples in ANN data structure
228  P_V smpRV( jointRV.imageSet().vectorSpace().zeroVector() );
229  for( unsigned int i = 0; i < N; i++ ) {
230  // get a sample from the distribution
231  jointRV.realizer().realization( smpRV );
232 
233  // copy the vector values in the ANN data structure
234  for( unsigned int j = 0; j < dimX; j++ ) {
235  dataXY[ i ][ j ] = smpRV[ xDimSel[j] ];
236  }
237  for( unsigned int j = 0; j < dimY; j++ ) {
238  dataXY[ i ][ dimX + j ] = smpRV[ yDimSel[j] ];
239  }
240  // annPrintPt( dataXY[i], dimXY, std::cout ); std::cout << std::endl;
241  }
242 
243  MI_est = computeMI_ANN( dataXY,
244  dimX, dimY,
245  k, N, eps );
246 
247  // Deallocate memory
248  annDeallocPts( dataXY );
249 
250  return MI_est;
251 }
ANNpoint * ANNpointArray
Definition: ANN.h:376
DLL_API void annDeallocPts(ANNpointArray &pa)
Definition: ANN.cpp:133
DLL_API ANNpointArray annAllocPts(int n, int dim)
Definition: ANN.cpp:117
double computeMI_ANN(ANNpointArray dataXY, unsigned int dimX, unsigned int dimY, unsigned int k, unsigned int N, double eps)
template<class P_V , class P_M , template< class P_V, class P_M > class RV_1, template< class P_V, class P_M > class RV_2>
double QUESO::estimateMI_ANN ( const RV_1< P_V, P_M > &  xRV,
const RV_2< P_V, P_M > &  yRV,
const unsigned int  xDimSel[],
unsigned int  dimX,
const unsigned int  yDimSel[],
unsigned int  dimY,
unsigned int  k,
unsigned int  N,
double  eps 
)

Function: estimateMI_ANN (using two seperate RVs) (Mutual Information)

Definition at line 260 of file InfoTheory_impl.h.

References annAllocPts(), annDeallocPts(), and computeMI_ANN().

265 {
266  ANNpointArray dataXY;
267  double MI_est;
268 
269  unsigned int dimXY = dimX + dimY;
270 
271  // Allocate memory
272  dataXY = annAllocPts(N,dimXY);
273 
274  // Copy samples in ANN data structure
275  P_V smpRV_x( xRV.imageSet().vectorSpace().zeroVector() );
276  P_V smpRV_y( yRV.imageSet().vectorSpace().zeroVector() );
277 
278  for( unsigned int i = 0; i < N; i++ ) {
279  // get a sample from the distribution
280  xRV.realizer().realization( smpRV_x );
281  yRV.realizer().realization( smpRV_y );
282 
283  // copy the vector values in the ANN data structure
284  for( unsigned int j = 0; j < dimX; j++ ) {
285  dataXY[ i ][ j ] = smpRV_x[ xDimSel[j] ];
286  }
287  for( unsigned int j = 0; j < dimY; j++ ) {
288  dataXY[ i ][ dimX + j ] = smpRV_y[ yDimSel[j] ];
289  }
290  // annPrintPt( dataXY[i], dimXY, std::cout ); std::cout << std::endl;
291  }
292 
293  MI_est = computeMI_ANN( dataXY,
294  dimX, dimY,
295  k, N, eps );
296 
297  // Deallocate memory
298  annDeallocPts( dataXY );
299 
300  return MI_est;
301 }
ANNpoint * ANNpointArray
Definition: ANN.h:376
DLL_API void annDeallocPts(ANNpointArray &pa)
Definition: ANN.cpp:133
DLL_API ANNpointArray annAllocPts(int n, int dim)
Definition: ANN.cpp:117
double computeMI_ANN(ANNpointArray dataXY, unsigned int dimX, unsigned int dimY, unsigned int k, unsigned int N, double eps)
QUESO::for ( )

Definition at line 123 of file StatisticalForwardProblemOptions.C.

123  {
124  // We default to empty set, so the default values are actually never
125  // used here
126  unsigned int allowed = env->input()(m_option_dataOutputAllowedSet, i, i);
127  m_dataOutputAllowedSet.insert(allowed);
128  }
m_parser QUESO::getOption< bool > ( m_option_computeSolution  ,
m_computeSolution   
)
m_parser QUESO::getOption< bool > ( m_option_computeCovariances  ,
m_computeCovariances   
)
m_parser QUESO::getOption< bool > ( m_option_computeCorrelations  ,
m_computeCorrelations   
)
m_parser QUESO::getOption< std::set< unsigned int > > ( m_option_dataOutputAllowedSet  ,
m_dataOutputAllowedSet   
)
m_parser QUESO::getOption< std::string > ( m_option_help  ,
m_help   
)
m_parser QUESO::getOption< std::string > ( m_option_dataOutputFileName  ,
m_dataOutputFileName   
)
m_parser QUESO::getOption< std::string > ( m_option_solver  ,
m_solver   
)
int QUESO::GRVY_CheckDir ( const char *  dirname)

Definition at line 456 of file Miscellaneous.C.

Referenced by CheckFilePath().

457 {
458  struct stat st;
459 
460  if(stat(dirname,&st) != 0)
461  {
462  if( mkdir(dirname,0700) != 0 )
463  {
464  std::cerr << __func__ << ": error - unable to create directory " << dirname << std::endl;
465  return -1;
466  }
467  }
468  else if (!S_ISDIR(st.st_mode))
469  {
470  std::cerr << __func__ << ": error - entry exists, but is not a directory " << dirname << std::endl;
471  return -1;
472  }
473 
474  return 0;
475 }
template<class T >
double QUESO::horizontalDistance ( const BaseScalarCdf< T > &  cdf1,
const BaseScalarCdf< T > &  cdf2,
double  epsilon 
)

It calculated the maximum horizontal distance between two CDFs.

Definition at line 96 of file ScalarCdf.C.

References QUESO::BaseEnvironment::displayVerbosity(), QUESO::BaseScalarCdf< T >::env(), QUESO::BaseScalarCdf< T >::inverse(), QUESO::BaseScalarCdf< T >::prefix(), QUESO::BaseEnvironment::subDisplayFile(), and QUESO::BaseScalarCdf< T >::value().

Referenced by horizontalDistances().

99 {
100  double maxDistance = 0.;
101  double xForMaxDistance = 0.;
102 
103  double x1 = cdf1.inverse(epsilon*.5);
104  double x2 = cdf1.inverse(1.-epsilon*.5);
105  if (cdf1.env().subDisplayFile()) {
106  *cdf1.env().subDisplayFile() << "In horizontalDistance()"
107  << ", cdf1.prefix() = " << cdf1.prefix()
108  << ", cdf2.prefix() = " << cdf2.prefix()
109  << ", epsilon = " << epsilon
110  << ": x1 = " << x1
111  << ", x2 = " << x2
112  << std::endl;
113  }
114 
115  //if (cdf1.env().subDisplayFile()) {
116  // *cdf1.env().subDisplayFile() << "In horizontalDistance: x1 = " << x1
117  // << ", x2 = " << x2
118  // << std::endl;
119  //}
120 
121  double numEvaluationPoints = 1001.;
122  for (double i = 0.; i < numEvaluationPoints; ++i) {
123  double ratio = i/(numEvaluationPoints-1.); // IMPORTANT: Yes, '-1.'
124  double x = (1.-ratio)*x1 + ratio*x2;
125  double y = cdf2.inverse(cdf1.value(x));
126  double d = fabs(x-y);
127  if ((cdf1.env().subDisplayFile()) && (cdf1.env().displayVerbosity() >= 3)) {
128  *cdf1.env().subDisplayFile() << "In horizontalDistance"
129  << ": i = " << i
130  << ", x = " << x
131  << ", cdf1.value(x) = " << cdf1.value(x)
132  << ", y = " << y
133  << ", d = " << d
134  << ", currentMaxDistance = " << maxDistance
135  << std::endl;
136  }
137  if (maxDistance < d) {
138  maxDistance = d;
139  xForMaxDistance = x;
140  if ((cdf1.env().subDisplayFile()) && (cdf1.env().displayVerbosity() >= 3)) {
141  *cdf1.env().subDisplayFile() << "In horizontalDistance"
142  << ": i = " << i
143  << ", NOW maxDistance = " << maxDistance
144  << ", xForMaxDistance = " << xForMaxDistance
145  << std::endl;
146  }
147  }
148  }
149 
150  if (cdf1.env().subDisplayFile()) {
151  *cdf1.env().subDisplayFile() << "In horizontalDistance()"
152  << ", cdf1.prefix() = " << cdf1.prefix()
153  << ", cdf2.prefix() = " << cdf2.prefix()
154  << ", epsilon = " << epsilon
155  << ": maxDistance = " << maxDistance
156  << ", xForMaxDistance = " << xForMaxDistance
157  << std::endl;
158  }
159 
160  return maxDistance;
161 }
double epsilon
Definition: ann_test.cpp:484
template<class V , class M >
void QUESO::horizontalDistances ( const BaseVectorCdf< V, M > &  cdf1,
const BaseVectorCdf< V, M > &  cdf2,
const V &  epsilonVec,
V &  distances 
)

It calculated the maximum horizontal distances between two vector CDFs.

Definition at line 84 of file VectorCdf.C.

References QUESO::BaseVectorCdf< V, M >::cdf(), horizontalDistance(), and QUESO::BaseVectorCdf< V, M >::pdfSupport().

88 {
89  for (unsigned int i = 0; i < cdf1.pdfSupport().vectorSpace().dimLocal(); ++i) {
90  distances[i] = horizontalDistance(cdf1.cdf(i),
91  cdf2.cdf(i),
92  epsilonVec[i]);
93  }
94 
95  return;
96 }
double horizontalDistance(const BaseScalarCdf< T > &cdf1, const BaseScalarCdf< T > &cdf2, double epsilon)
It calculated the maximum horizontal distance between two CDFs.
Definition: ScalarCdf.C:96
QUESO::if ( m_env.subDisplayFile()!  = NULL)

Definition at line 462 of file MonteCarloSGOptions.C.

References QUESO::BaseEnvironment::subDisplayFile().

462  {
463  *m_env.subDisplayFile() << "In MonteCarloSGOptions::constructor(2)"
464  << ": after setting values of options with prefix '" << m_prefix
465  << "', state of object is:"
466  << "\n" << *this
467  << std::endl;
468  }
QUESO::if ( m_ov.  m_pseqComputeStats)
template<class V , class M >
VectorSet< V, M > * QUESO::InstantiateIntersection ( const VectorSet< V, M > &  domain1,
const VectorSet< V, M > &  domain2 
)

This method calculates the intersection of domain1 and domain2.

It is used, for instance, to calculate the domain of the Posterior PDF, which is the intersection of the domain of the Prior PDF and of the likelihood function.

Definition at line 37 of file InstantiateIntersection.C.

References QUESO::VectorSpace< V, M >::dimGlobal(), QUESO::VectorSpace< V, M >::env(), QUESO::BoxSubset< V, M >::maxValues(), QUESO::BoxSubset< V, M >::minValues(), QUESO::VectorSet< V, M >::prefix(), QUESO::VectorSubset< V, M >::vectorSpace(), and QUESO::VectorSet< V, M >::vectorSpace().

Referenced by QUESO::StatisticalInverseProblem< P_V, P_M >::solveWithBayesMetropolisHastings(), and QUESO::StatisticalInverseProblem< P_V, P_M >::solveWithBayesMLSampling().

38 {
39  VectorSet<V,M>* result = NULL;
40 
41  unsigned int dim1 = domain1.vectorSpace().dimGlobal();
42  unsigned int dim2 = domain2.vectorSpace().dimGlobal();
43 
44  if (result == NULL) {
45  const VectorSpace<V,M>* tmp1 = dynamic_cast<const VectorSpace<V,M>* >(&domain1);
46  const VectorSpace<V,M>* tmp2 = dynamic_cast<const VectorSpace<V,M>* >(&domain2);
47 
48  if ((tmp1 != NULL) && (tmp2 != NULL)) {
49  if (dim1 < dim2) {
50  result = new VectorSpace<V,M>(tmp1->env(),
51  tmp1->prefix().c_str(),
52  tmp1->dimGlobal(),
53  NULL);//tmp1->componentsNames());
54  }
55  else if (dim1 == dim2) {
56  result = new VectorSpace<V,M>(tmp1->env(),
57  tmp1->prefix().c_str(),
58  tmp1->dimGlobal(),
59  NULL);//tmp1->componentsNames());
60  }
61  else {
62  result = new VectorSpace<V,M>(tmp2->env(),
63  tmp2->prefix().c_str(),
64  tmp2->dimGlobal(),
65  NULL);//tmp2->componentsNames());
66  }
67  }
68  }
69 
70  if (result == NULL) {
71  const VectorSubset<V,M>* tmp1 = dynamic_cast<const VectorSubset<V,M>* >(&domain1);
72  const VectorSubset<V,M>* tmp2 = dynamic_cast<const VectorSubset<V,M>* >(&domain2);
73 
74  if ((tmp1 != NULL) && (tmp2 != NULL)) {
75  if (dim1 == dim2) {
76  const BoxSubset<V,M>* box1 = dynamic_cast<const BoxSubset<V,M>* >(&domain1);
77  const BoxSubset<V,M>* box2 = dynamic_cast<const BoxSubset<V,M>* >(&domain2);
78 
79  if ((box1 != NULL) && (box2 != NULL)) {
80  V minV(box1->minValues());
81  V maxV(box1->maxValues());
82  for (unsigned int i = 0; i < dim1; ++i) {
83  minV[i] = std::max(box1->minValues()[i],
84  box2->minValues()[i]);
85  }
86  for (unsigned int i = 0; i < dim1; ++i) {
87  maxV[i] = std::min(box1->maxValues()[i],
88  box2->maxValues()[i]);
89  }
90  result = new BoxSubset<V,M>(box1->prefix().c_str(),
91  box1->vectorSpace(),
92  minV,
93  maxV);
94  }
95  else {
96  result = new IntersectionSubset<V,M>(tmp1->prefix().c_str(),
97  tmp1->vectorSpace(),
98  0., // FIX ME
99  domain1,
100  domain2);
101  }
102  }
103  else {
104  queso_error_msg("situation 001");
105  }
106  }
107  }
108 
109  if (result == NULL) {
110  const VectorSubset<V,M>* tmp1 = dynamic_cast<const VectorSubset<V,M>* >(&domain1);
111  const VectorSpace <V,M>* tmp2 = dynamic_cast<const VectorSpace <V,M>* >(&domain2);
112 
113  if ((tmp1 != NULL) && (tmp2 != NULL)) {
114  if (dim1 == dim2) {
115  const BoxSubset<V,M>* box1 = dynamic_cast<const BoxSubset<V,M>* >(&domain1);
116  if (box1 != NULL) {
117  result = new BoxSubset<V,M>(box1->prefix().c_str(),
118  box1->vectorSpace(),
119  box1->minValues(),
120  box1->maxValues());
121  }
122  else {
123  queso_error_msg("situation 002");
124  }
125  }
126  else {
127  queso_error_msg("situation 003");
128  }
129  }
130  }
131 
132  if (result == NULL) {
133  const VectorSpace <V,M>* tmp1 = dynamic_cast<const VectorSpace <V,M>* >(&domain1);
134  const VectorSubset<V,M>* tmp2 = dynamic_cast<const VectorSubset<V,M>* >(&domain2);
135 
136  if ((tmp1 != NULL) && (tmp2 != NULL)) {
137  if (dim1 == dim2) {
138  const BoxSubset<V,M>* box2 = dynamic_cast<const BoxSubset<V,M>* >(&domain2);
139  if (box2 != NULL) {
140  result = new BoxSubset<V,M>(box2->prefix().c_str(),
141  box2->vectorSpace(),
142  box2->minValues(),
143  box2->maxValues());
144  }
145  else {
146  queso_error_msg("situation 004");
147  }
148  }
149  else {
150  queso_error_msg("situation 005");
151  }
152  }
153  }
154 
155  if (result == NULL) {
156  queso_error_msg("situation 006");
157  }
158 
159  return result;
160 }
TeuchosMatrix QUESO::leftDiagScaling ( const TeuchosVector &  vec,
const TeuchosMatrix &  mat 
)

Definition at line 2137 of file TeuchosMatrix.C.

References QUESO::TeuchosMatrix::numCols(), QUESO::TeuchosMatrix::numRowsLocal(), queso_require_equal_to_msg, and QUESO::TeuchosVector::sizeLocal().

2138 {
2139  unsigned int vSize = vec.sizeLocal();
2140  unsigned int mRows = mat.numRowsLocal();
2141  unsigned int mCols = mat.numCols();
2142 
2143  queso_require_equal_to_msg(vSize, mRows, "size of vector is different from the number of rows in matrix");
2144 
2145  queso_require_equal_to_msg(mCols, mRows, "routine currently works for square matrices only");
2146 
2147  TeuchosMatrix answer(mat);
2148  for (unsigned int i = 0; i < mRows; ++i) {
2149  double vecValue = vec[i];
2150  for (unsigned int j = 0; j < mCols; ++j) {
2151  answer(i,j) *= vecValue;
2152  }
2153  }
2154 
2155  return answer;
2156 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
GslMatrix QUESO::leftDiagScaling ( const GslVector &  vec,
const GslMatrix &  mat 
)

Definition at line 2052 of file GslMatrix.C.

References QUESO::GslMatrix::numCols(), QUESO::GslMatrix::numRowsLocal(), queso_require_equal_to_msg, and QUESO::GslVector::sizeLocal().

Referenced by CovCond().

2053 {
2054  unsigned int vSize = vec.sizeLocal();
2055  unsigned int mRows = mat.numRowsLocal();
2056  unsigned int mCols = mat.numCols();
2057 
2058  queso_require_equal_to_msg(vSize, mRows, "size of vector is different from the number of rows in matrix");
2059 
2060  queso_require_equal_to_msg(mCols, mRows, "routine currently works for square matrices only");
2061 
2062  GslMatrix answer(mat);
2063  for (unsigned int i = 0; i < mRows; ++i) {
2064  double vecValue = vec[i];
2065  for (unsigned int j = 0; j < mCols; ++j) {
2066  answer(i,j) *= vecValue;
2067  }
2068  }
2069 
2070  return answer;
2071 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
TeuchosMatrix QUESO::matrixProduct ( const TeuchosVector &  v1,
const TeuchosVector &  v2 
)

Definition at line 2120 of file TeuchosMatrix.C.

References QUESO::Vector::env(), QUESO::Vector::map(), and QUESO::TeuchosVector::sizeLocal().

2121 {
2122  unsigned int nRows = v1.sizeLocal();
2123  unsigned int nCols = v2.sizeLocal();
2124  TeuchosMatrix answer(v1.env(),v1.map(),nCols);
2125 
2126  for (unsigned int i = 0; i < nRows; ++i) {
2127  double value1 = v1[i];
2128  for (unsigned int j = 0; j < nCols; ++j) {
2129  answer(i,j) = value1*v2[j];
2130  }
2131  }
2132 
2133  return answer;
2134 }
GslMatrix QUESO::matrixProduct ( const GslVector &  v1,
const GslVector &  v2 
)

Definition at line 2036 of file GslMatrix.C.

References QUESO::Vector::env(), QUESO::Vector::map(), and QUESO::GslVector::sizeLocal().

Referenced by CovCond(), QUESO::SequenceOfVectors< V, M >::estimateConvBrooksGelman(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step04_inter0(), and QUESO::MetropolisHastingsSG< P_V, P_M >::updateAdaptedCovMatrix().

2037 {
2038  unsigned int nRows = v1.sizeLocal();
2039  unsigned int nCols = v2.sizeLocal();
2040  GslMatrix answer(v1.env(),v1.map(),nCols);
2041 
2042  for (unsigned int i = 0; i < nRows; ++i) {
2043  double value1 = v1[i];
2044  for (unsigned int j = 0; j < nCols; ++j) {
2045  answer(i,j) = value1*v2[j];
2046  }
2047  }
2048 
2049  return answer;
2050 }
template<class T >
bool QUESO::MiscCheckForSameValueInAllNodes ( T &  inputValue,
double  acceptableTreshold,
const MpiComm &  comm,
const char *  whereString 
)

Definition at line 479 of file Miscellaneous.C.

References QUESO::MpiComm::Allreduce(), QUESO::MpiComm::Barrier(), QUESO::MpiComm::Bcast(), QUESO::MpiComm::MyPID(), and QUESO::MpiComm::NumProc().

Referenced by QUESO::MLSampling< P_V, P_M >::generateSequence_Step03_inter0(), and QUESO::MLSampling< P_V, P_M >::generateSequence_Step09_all().

483 {
484  // Filter out those nodes that should not participate
485  if (comm.MyPID() < 0) return true;
486 
487  double localValue = (double) inputValue;
488  double sumValue = 0.;
489  comm.Allreduce<double>(&localValue, &sumValue, (int) 1, RawValue_MPI_SUM,
490  whereString,
491  "failed MPI on 'sumValue' inside MiscCheckForSameValueInAllNodes()");
492 
493  double totalNumNodes = (double) comm.NumProc();
494  double testValue = fabs(1. - localValue/(sumValue/totalNumNodes));
495  unsigned int boolSum = 0;
496 #if 1
497  unsigned int boolResult = 0;
498  if (testValue > acceptableTreshold) boolResult = 1;
499  comm.Allreduce<unsigned int>(&boolResult, &boolSum, (int) 1, RawValue_MPI_SUM,
500  whereString,
501  "failed MPI on 'boolSum' inside MiscCheckForSameValueInAllNodes()");
502 
503  if (boolSum > 0) {
504  comm.Barrier();
505  for (int i = 0; i < comm.NumProc(); ++i) {
506  if (i == comm.MyPID()) {
507  std::cerr << "WARNING, "
508  << whereString
509  << ", inside MiscCheckForSameValueInAllNodes()"
510  << ", rank (in this communicator) = " << i
511  << ": boolSum = " << boolSum
512  << ", localValue = " << localValue
513  << ", sumValue = " << sumValue
514  << ", totalNumNodes = " << totalNumNodes
515  << ", avgValue = " << (sumValue/totalNumNodes)
516  << ", relativeTest = " << testValue
517  << std::endl;
518  }
519  comm.Barrier();
520  }
521  comm.Barrier();
522 
523  comm.Bcast((void *) &localValue, (int) 1, RawValue_MPI_DOUBLE, 0,
524  whereString,
525  "failed MPI on 'boolSum' inside MiscCheckForSameValueInAllNodes()");
526  inputValue = localValue; // IMPORTANT
527  }
528 #else
529  queso_require_less_equal_msg(testValue, acceptableTreshold, "not all nodes have the same value inside MiscCheckForSameValueInAllNodes()");
530 #endif
531 
532  return (boolSum == 0);
533 }
template<class V1 , class V2 >
void QUESO::MiscCheckTheParallelEnvironment ( const V1 &  vec1,
const V2 &  vec2 
)

Definition at line 564 of file Miscellaneous.C.

References QUESO::BaseEnvironment::fullComm(), QUESO::MpiComm::NumProc(), QUESO::BaseEnvironment::numSubEnvironments(), queso_require_equal_to_msg, QUESO::BaseEnvironment::subComm(), and QUESO::BaseEnvironment::subRank().

565 {
566  const BaseEnvironment& env = vec1.env();
567 
568  if (env.numSubEnvironments() == (unsigned int) env.fullComm().NumProc()) {
569  queso_require_equal_to_msg(env.subRank(), 0, "there should exist only one processor per sub environment");
570  queso_require_equal_to_msg(vec1.numOfProcsForStorage(), 1,
571  "only 1 processor (per sub environment) should be necessary for the storage of a parameter vector");
572  queso_require_equal_to_msg(vec2.numOfProcsForStorage(), 1,
573  "only 1 processor (per sub environment) should be necessary for the storage of a parameter vector");
574  }
575  else if (env.numSubEnvironments() < (unsigned int) env.fullComm().NumProc()) {
576  queso_require_equal_to_msg(env.fullComm().NumProc()%env.numSubEnvironments(), 0, "total number of processors should be a multiple of the number of sub environments");
577  unsigned int numProcsPerSubEnvironment = env.fullComm().NumProc()/env.numSubEnvironments();
578  queso_require_equal_to_msg(env.subComm().NumProc(), (int) numProcsPerSubEnvironment, "inconsistent number of processors per sub environment");
579  if ((vec1.numOfProcsForStorage() == 1) &&
580  (vec2.numOfProcsForStorage() == 1)) {
581  // Ok
582  }
583  else if ((vec1.numOfProcsForStorage() == numProcsPerSubEnvironment) &&
584  (vec2.numOfProcsForStorage() == numProcsPerSubEnvironment)) {
585  queso_error_msg("parallel vectors are not supported yet");
586  }
587  else {
588  queso_error_msg("number of processors required for a vector storage should be equal to either 1 or to the number of processors in the sub environment");
589  }
590  }
591  else {
592  queso_error_msg("number of processors per sub environment is less than 1!");
593  }
594 
595  return;
596 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
int NumProc() const
Returns total number of processes.
Definition: MpiComm.C:133
const MpiComm & fullComm() const
Access function for the communicator that was passed to QUESO&#39;s environment.
Definition: Environment.C:274
template<class V >
void QUESO::MiscComputePositionsBetweenMinMax ( minValues,
maxValues,
std::vector< V * > &  positions 
)

Definition at line 537 of file Miscellaneous.C.

Referenced by QUESO::BaseVectorSequence< V, M >::computeHistCdfstaccKde().

540 {
541  double factor = 0.5;
542  switch (positions.size()) {
543  case 0:
544  // Do nothing
545  break;
546 
547  case 1:
548  positions[0] = new V((1. - factor) * minValues + factor * maxValues);
549  break;
550 
551  default:
552  for (unsigned int i = 0; i < positions.size(); ++i) {
553  factor = ((double) i)/(((double) positions.size()) - 1.);
554  positions[i] = new V((1. - factor) * minValues + factor * maxValues);
555  }
556  break;
557  }
558 
559  return;
560 }
double QUESO::MiscDoubleDebugMessage ( double  value,
const char *  message 
)

Definition at line 334 of file Miscellaneous.C.

337 {
338  if (message) {
339  std::cout << "Passing in MiscDoubleDebugMessage(), value = " << value << ", message = " << message << std::endl;
340  }
341  return value;
342 }
void QUESO::MiscExtractDoubleFromString ( std::string &  inputString,
double &  outputDouble 
)
void QUESO::MiscExtractWordFromString ( std::string &  inputString,
std::string &  outputWord 
)
double QUESO::MiscGammar ( double  a,
double  b,
const RngBase *  rngObject 
)

Definition at line 248 of file Miscellaneous.C.

References QUESO::RngBase::gaussianSample(), and QUESO::RngBase::uniformSample().

252 {
253  double result = 0.;
254  if (a < 1.) {
255  result = MiscGammar(1.+a,b,rngObject)*std::pow( rngObject->uniformSample(),1./a );
256  }
257  else {
258  double d = a-1./3.;
259  double c = 1./std::sqrt(9.*d);
260  double x = 0.;
261  double w = 0.;
262  while (1) {
263  while (1) {
264  x = rngObject->gaussianSample(1.);
265  w = 1.+c*x;
266  if (w > 0.) break;
267  }
268  w = std::pow(w,3.);
269  double u = rngObject->uniformSample();
270  double compValue = 1.-0.0331*std::pow(x,4.);
271  if (u < compValue) break;
272  compValue = 0.5*std::pow(x,2.)+d*(1.-w+log(w));
273  if (log(u) < compValue) break;
274  }
275  result = b*d*w;
276  }
277 
278  return result;
279 }
double MiscGammar(double a, double b, const RngBase *rngObject)
double QUESO::MiscGaussianDensity ( double  x,
double  mu,
double  sigma 
)

Definition at line 306 of file Miscellaneous.C.

Referenced by QUESO::ArrayOfSequences< V, M >::gaussianKDE(), QUESO::ScalarSequence< T >::subGaussian1dKde(), and QUESO::ScalarSequence< T >::unifiedGaussian1dKde().

307 {
308  double sigma2 = sigma*sigma;
309  double diff = x-mu;
310 
311  return (1./std::sqrt(2*M_PI*sigma2))*std::exp(-.5*diff*diff/sigma2);
312 }
double QUESO::MiscGetEllapsedSeconds ( struct timeval *  timeval0)

Definition at line 282 of file Miscellaneous.C.

Referenced by QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::actualGenerateSequence(), QUESO::MetropolisHastingsSG< P_V, P_M >::adapt(), QUESO::BaseVectorSequence< V, M >::computeAutoCorrViaDef(), QUESO::BaseVectorSequence< V, M >::computeAutoCorrViaFFT(), QUESO::BaseVectorSequence< V, M >::computeBMM(), QUESO::BaseVectorSequence< V, M >::computeFFT(), QUESO::BaseVectorSequence< V, M >::computeGeweke(), QUESO::BaseVectorSequence< V, M >::computeHistCdfstaccKde(), QUESO::BaseVectorSequence< V, M >::computeMeanEvolution(), QUESO::BaseVectorSequence< V, M >::computeMeanStacc(), QUESO::BaseVectorSequence< V, M >::computeMeanVars(), QUESO::BaseVectorSequence< V, M >::computePSD(), QUESO::BaseVectorSequence< V, M >::computePSDAtZero(), QUESO::BaseVectorSequence< V, M >::computeStatistics(), QUESO::MetropolisHastingsSG< P_V, P_M >::delayedRejection(), QUESO::MLSampling< P_V, P_M >::generateBalLinkedChains_all(), QUESO::MetropolisHastingsSG< P_V, P_M >::generateFullChain(), QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::MLSampling< P_V, P_M >::generateSequence_Level0_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step01_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step02_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step03_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step04_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step05_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step06_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step07_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step08_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step09_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step10_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step11_inter0(), QUESO::MLSampling< P_V, P_M >::generateUnbLinkedChains_all(), QUESO::MLSampling< P_V, P_M >::justBalance_proc0(), QUESO::MLSampling< P_V, P_M >::solveBIP_proc0(), QUESO::SequenceOfVectors< V, M >::unifiedReadContents(), QUESO::ScalarSequence< T >::unifiedReadContents(), QUESO::SequenceOfVectors< V, M >::unifiedWriteContents(), and QUESO::ScalarSequence< T >::unifiedWriteContents().

283 {
284  double result = 0.;
285 
286  struct timeval timevalNow;
287  /*int iRC;*/
288  /*iRC = */gettimeofday(&timevalNow, NULL);
289 
290  result = (double) (timevalNow.tv_sec - timeval0->tv_sec );
291  result *= 1.e+6;
292  result += (double) (timevalNow.tv_usec - timeval0->tv_usec);
293  result *= 1.e-6;
294 
295  return result;
296 }
double QUESO::MiscHammingWindow ( unsigned int  N,
unsigned int  j 
)

Definition at line 298 of file Miscellaneous.C.

Referenced by QUESO::ScalarSequence< T >::psd().

299 {
300  double angle = 2.*M_PI*((double) j)/((double) N);
301  double result = 0.53836 - 0.46164*cos(angle);
302 
303  return result;
304 }
int QUESO::MiscIntDebugMessage ( int  value,
const char *  message 
)

Definition at line 324 of file Miscellaneous.C.

327 {
328  if (message) {
329  std::cout << "Passing in MiscIntDebugMessage(), value = " << value << ", message = " << message << std::endl;
330  }
331  return value;
332 }
int QUESO::MiscReadCharsAndDoubleFromFile ( std::ifstream &  ifs,
std::string &  termString,
double *  termValue,
bool &  endOfLineAchieved 
)

Definition at line 191 of file Miscellaneous.C.

References UQ_FAILED_READING_FILE_RC, and UQ_OK_RC.

Referenced by QUESO::AsciiTable< V, M >::readColumnsFromFile().

196 {
197  int iRC = UQ_OK_RC;
198  endOfLineAchieved = false;
199 
200  char c = ' ';
201  while (c == ' ') {
202  ifs.get(c);
203  if ((ifs.rdstate() & std::ifstream::failbit)) {
205  break;
206  }
207  };
208 
209  char term[512];
210  unsigned int pos = 0;
211 
212  if (!iRC) {
213  while ((pos < 512) && (c != '\n') && (c != '\0') && (c != ' ')) {
214  term[pos++] = c;
215  if ((ifs.rdstate() & std::ifstream::failbit)) {
217  break;
218  }
219  ifs.get(c);
220  };
221  }
222 
223  if (!iRC) {
224  if (c == '\n') endOfLineAchieved = true;
225  term[pos] = '\0';
226  termString = term;
227  //std::cout << "Read chars = " << termString << std::endl;
228  if (termValue) {
229  if (termString == std::string("inf")) {
230  *termValue = INFINITY;
231  }
232  else if (termString == std::string("-inf")) {
233  *termValue = -INFINITY;
234  }
235  else if (termString == std::string("nan")) {
236  *termValue = nan("");
237  }
238  else {
239  *termValue = strtod(termString.c_str(),NULL);
240  }
241  }
242  }
243 
244  return iRC;
245 }
const int UQ_OK_RC
Definition: Defines.h:92
const int UQ_FAILED_READING_FILE_RC
Definition: Defines.h:101
void QUESO::MiscReadDoublesFromString ( const std::string &  inputString,
std::vector< double > &  outputDoubles 
)

Definition at line 40 of file Miscellaneous.C.

References queso_require_not_equal_to_msg.

Referenced by BoostInputOptionsParser::getOption< std::vector< double, std::allocator< double > > >(), QUESO::StatisticalForwardProblemOptions::getMyOptionValues(), QUESO::StatisticalInverseProblemOptions::getMyOptionValues(), QUESO::MonteCarloSGOptions::getMyOptionValues(), QUESO::EnvironmentOptions::getMyOptionValues(), SequenceStatisticalOptions::getMyOptionValues(), QUESO::MetropolisHastingsSGOptions::getMyOptionValues(), and QUESO::BoostInputOptionsParser::getOption().

43 {
44  //std::cout << "In MiscReadDoublesFromString()"
45  // << ": inputString = " << inputString
46  // << std::endl;
47  outputDoubles.clear();
48  bool aDoubleIsBeingRead = false;
49  std::string::size_type positionOfFirstChar = 0;
50  std::string::size_type numberOfChars = 0;
51  for (std::string::size_type i = 0; i < inputString.size(); ++i) {
52  queso_require_not_equal_to_msg(inputString[i], '\0', "character '\0' should not be found!");
53  if (inputString[i] == ' ') {
54  if (aDoubleIsBeingRead == true) {
55  // We just finished reading the current string/double. Convert string to double now.
56  char tmpVar[numberOfChars+1];
57  for (std::string::size_type j = 0; j < numberOfChars; ++j) {
58  tmpVar[j] = inputString[positionOfFirstChar+j];
59  }
60  tmpVar[numberOfChars] = '\0';
61  outputDoubles.push_back(strtod(tmpVar,NULL));
62 
63  // Continue loop
64  aDoubleIsBeingRead = false;
65  positionOfFirstChar = 0;
66  numberOfChars = 0;
67  }
68  }
69  else {
70  if (aDoubleIsBeingRead == false) {
71  aDoubleIsBeingRead = true;
72  positionOfFirstChar = i;
73  }
74  numberOfChars++;
75  }
76  } // for
77  if (aDoubleIsBeingRead == true) {
78  // We just finished reading the current string/double. Convert string to double now.
79  char tmpVar[numberOfChars+1];
80  for (std::string::size_type j = 0; j < numberOfChars; ++j) {
81  tmpVar[j] = inputString[positionOfFirstChar+j];
82  }
83  tmpVar[numberOfChars] = '\0';
84  outputDoubles.push_back(strtod(tmpVar,NULL));
85  }
86  std::vector<double>(outputDoubles).swap(outputDoubles);
87 
88  return;
89 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix queso_require_not_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
int QUESO::MiscReadStringAndDoubleFromFile ( std::ifstream &  ifs,
std::string &  termString,
double *  termValue 
)

Definition at line 160 of file Miscellaneous.C.

References UQ_FAILED_READING_FILE_RC, and UQ_OK_RC.

Referenced by QUESO::AsciiTable< V, M >::readColumnsFromFile().

164 {
165  int iRC = UQ_OK_RC;
166 
167  ifs >> termString;
168  if ((ifs.rdstate() & std::ifstream::failbit)) {
170  }
171  else if (termValue) {
172  if (termString == std::string("inf")) {
173  *termValue = INFINITY;
174  }
175  else if (termString == std::string("-inf")) {
176  *termValue = -INFINITY;
177  }
178  else if (termString == std::string("nan")) {
179  *termValue = nan("");
180  }
181  else {
182  *termValue = strtod(termString.c_str(),NULL);
183  }
184  }
185  //if (!iRC) std::cout << "Read termString = " << termString << std::endl;
186 
187  return iRC;
188 }
const int UQ_OK_RC
Definition: Defines.h:92
const int UQ_FAILED_READING_FILE_RC
Definition: Defines.h:101
void QUESO::MiscReadWordsFromString ( const std::string &  inputString,
std::vector< std::string > &  outputWords 
)

Definition at line 92 of file Miscellaneous.C.

References queso_require_not_equal_to_msg.

95 {
96  //std::cout << "In MiscReadWordsFromString()"
97  // << ": inputString = " << inputString
98  // << std::endl;
99  outputWords.clear();
100  bool aWordIsBeingRead = false;
101  std::string::size_type positionOfFirstChar = 0;
102  std::string::size_type numberOfChars = 0;
103  for (std::string::size_type i = 0; i < inputString.size(); ++i) {
104  queso_require_not_equal_to_msg(inputString[i], '\0', "character '\0' should not be found!");
105  if (inputString[i] == ' ') {
106  if (aWordIsBeingRead == true) {
107  // We just finished reading the current string/word.
108  char tmpVar[numberOfChars+1];
109  for (std::string::size_type j = 0; j < numberOfChars; ++j) {
110  tmpVar[j] = inputString[positionOfFirstChar+j];
111  }
112  tmpVar[numberOfChars] = '\0';
113  outputWords.push_back(tmpVar);
114 
115  // Continue loop
116  aWordIsBeingRead = false;
117  positionOfFirstChar = 0;
118  numberOfChars = 0;
119  }
120  }
121  else {
122  if (aWordIsBeingRead == false) {
123  aWordIsBeingRead = true;
124  positionOfFirstChar = i;
125  }
126  numberOfChars++;
127  }
128  } // for
129  if (aWordIsBeingRead == true) {
130  // We just finished reading the current string/word.
131  char tmpVar[numberOfChars+1];
132  for (std::string::size_type j = 0; j < numberOfChars; ++j) {
133  tmpVar[j] = inputString[positionOfFirstChar+j];
134  }
135  tmpVar[numberOfChars] = '\0';
136  outputWords.push_back(tmpVar);
137  }
138  std::vector<std::string>(outputWords).swap(outputWords);
139 
140  return;
141 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix queso_require_not_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
unsigned int QUESO::MiscUintDebugMessage ( unsigned int  value,
const char *  message 
)

Definition at line 314 of file Miscellaneous.C.

317 {
318  if (message) {
319  std::cout << "Passing in MiscUintDebugMessage(), value = " << value << ", message = " << message << std::endl;
320  }
321  return value;
322 }
int QUESO::MyWorldfullRank ( )

Returns the rank of the calling process in the communicator.

Definition at line 33 of file Defines.C.

33  {
34  int result = 0;
35 #ifdef QUESO_HAS_MPI
36  int iRC;
37  iRC = MPI_Comm_rank(MPI_COMM_WORLD,&result);
38  if (iRC) {}; // just to remove compiler warning
39 #endif
40  return result;
41 }
void QUESO::normalizeANN_XY ( ANNpointArray  dataXY,
unsigned int  dimXY,
ANNpointArray  dataX,
unsigned int  dimX,
ANNpointArray  dataY,
unsigned int  dimY,
unsigned int  N 
)

Normalises dataXY by its sample mean and covariance. dataX and dataY are populated with the marginals of dataXY.

Definition at line 98 of file InfoTheory_impl.h.

References annAllocPt().

Referenced by computeMI_ANN().

102 {
103 
104  ANNpoint meanXY, stdXY;
105 
106  meanXY = annAllocPt(dimXY); // is init with 0
107  stdXY = annAllocPt(dimXY); // is init with 0
108 
109  // get mean
110  for( unsigned int i = 0; i < N; i++ ) {
111  for( unsigned int j = 0; j < dimX; j++ ) {
112  meanXY[ j ] += dataXY[ i ][ j ];
113  }
114  for( unsigned int j = 0; j < dimY; j++ ) {
115  meanXY[ dimX + j ] += dataXY[ i ][ dimX + j ];
116  }
117  }
118  for( unsigned int j = 0; j < dimXY; j++ ) {
119  meanXY[ j ] = meanXY[ j ] / (double)N;
120  }
121 
122  // get standard deviation
123  for( unsigned int i = 0; i < N; i++ ) {
124  for( unsigned int j = 0; j < dimXY; j++ ) {
125  stdXY[ j ] += pow( dataXY[ i ][ j ] - meanXY[ j ], 2.0 );
126  }
127  }
128  for( unsigned int j = 0; j < dimXY; j++ ) {
129  stdXY[ j ] = sqrt( stdXY[ j ] / ((double)N-1.0) );
130  }
131 
132  /*
133  std::cout << "Mean RV - ";
134  annPrintPt( meanXY, dimXY, std::cout );
135  std::cout << std::endl << "Std RV - ";
136  annPrintPt( stdXY, dimXY, std::cout );
137  std::cout << std::endl;
138  */
139 
140  // get normalized points and populate marginals
141  for( unsigned int i = 0; i < N; i++ ) {
142  // normalize joint
143  for( unsigned int j = 0; j < dimXY; j++ ) {
144  dataXY[ i ][ j ] = ( dataXY[ i ][ j ] - meanXY[ j ] ) / stdXY[ j ];
145  }
146 
147  // populate marginals
148  for( unsigned int j = 0; j < dimX; j++ ) {
149  dataX[ i ][ j ] = dataXY[ i ][ j ];
150  }
151  for( unsigned int j = 0; j < dimY; j++ ) {
152  dataY[ i ][ j ] = dataXY[ i ][ dimX + j ];
153  }
154  }
155 
156 }
ANNcoord * ANNpoint
Definition: ANN.h:375
DLL_API ANNpoint annAllocPt(int dim, ANNcoord c=0)
Definition: ANN.cpp:110
GslVector QUESO::operator* ( double  a,
const GslVector &  x 
)

Definition at line 1121 of file GslVector.C.

1122 {
1123  GslVector answer(x);
1124  answer *= a;
1125 
1126  return answer;
1127 }
GslVector QUESO::operator* ( const GslVector &  x,
const GslVector &  y 
)

Definition at line 1129 of file GslVector.C.

1130 {
1131  GslVector answer(x);
1132  answer *= y;
1133 
1134  return answer;
1135 }
TeuchosVector QUESO::operator* ( double  a,
const TeuchosVector &  x 
)

Definition at line 1187 of file TeuchosVector.C.

1188 {
1189  TeuchosVector answer(x);
1190  answer *= a;
1191  return answer;
1192 }
TeuchosVector QUESO::operator* ( const TeuchosVector &  x,
const TeuchosVector &  y 
)

Definition at line 1195 of file TeuchosVector.C.

1196 {
1197  TeuchosVector answer(x);
1198  answer *= y;
1199  return answer;
1200 }
TeuchosMatrix QUESO::operator* ( double  a,
const TeuchosMatrix &  mat 
)

Definition at line 2064 of file TeuchosMatrix.C.

2065 {
2066  TeuchosMatrix answer(mat);
2067  answer *= a;
2068  return answer;
2069 }
TeuchosVector QUESO::operator* ( const TeuchosMatrix &  mat,
const TeuchosVector &  vec 
)

Definition at line 2072 of file TeuchosMatrix.C.

References QUESO::TeuchosMatrix::multiply().

2073 {
2074  return mat.multiply(vec);
2075 }
TeuchosMatrix QUESO::operator* ( const TeuchosMatrix &  m1,
const TeuchosMatrix &  m2 
)

Definition at line 2078 of file TeuchosMatrix.C.

References QUESO::Matrix::env(), QUESO::Matrix::map(), QUESO::TeuchosMatrix::numCols(), QUESO::TeuchosMatrix::numRowsLocal(), and queso_require_equal_to_msg.

2079 {
2080  unsigned int m1Rows = m1.numRowsLocal();
2081  unsigned int m1Cols = m1.numCols();
2082  unsigned int m2Rows = m2.numRowsLocal();
2083  unsigned int m2Cols = m2.numCols();
2084 
2085  queso_require_equal_to_msg(m1Cols, m2Rows, "different sizes m1Cols and m2Rows");
2086 
2087  TeuchosMatrix mat(m1.env(),m1.map(),m2Cols);
2088  unsigned int commonSize = m1Cols;
2089 
2090  for (unsigned int row1 = 0; row1 < m1Rows; ++row1) {
2091  for (unsigned int col2 = 0; col2 < m2Cols; ++col2) {
2092  double result = 0.;
2093  for (unsigned int k = 0; k < commonSize; ++k) {
2094  result += m1(row1,k)*m2(k,col2);
2095  }
2096  mat(row1,col2) = result;
2097  }
2098  }
2099 
2100  return mat;
2101 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
GslMatrix QUESO::operator* ( double  a,
const GslMatrix &  mat 
)

Definition at line 1982 of file GslMatrix.C.

1983 {
1984  GslMatrix answer(mat);
1985  answer *= a;
1986  return answer;
1987 }
GslVector QUESO::operator* ( const GslMatrix &  mat,
const GslVector &  vec 
)

Definition at line 1989 of file GslMatrix.C.

References QUESO::GslMatrix::multiply().

1990 {
1991  return mat.multiply(vec);
1992 }
GslMatrix QUESO::operator* ( const GslMatrix &  m1,
const GslMatrix &  m2 
)

Definition at line 1994 of file GslMatrix.C.

References QUESO::Matrix::env(), QUESO::Matrix::map(), QUESO::GslMatrix::numCols(), QUESO::GslMatrix::numRowsLocal(), and queso_require_equal_to_msg.

1995 {
1996  unsigned int m1Rows = m1.numRowsLocal();
1997  unsigned int m1Cols = m1.numCols();
1998  unsigned int m2Rows = m2.numRowsLocal();
1999  unsigned int m2Cols = m2.numCols();
2000 
2001  queso_require_equal_to_msg(m1Cols, m2Rows, "different sizes m1Cols and m2Rows");
2002 
2003  GslMatrix mat(m1.env(),m1.map(),m2Cols);
2004 
2005  //std::cout << "In GslMatrix(mat * mat): m1Cols = " << m1Cols << std::endl;
2006 
2007  unsigned int commonSize = m1Cols;
2008  for (unsigned int row1 = 0; row1 < m1Rows; ++row1) {
2009  for (unsigned int col2 = 0; col2 < m2Cols; ++col2) {
2010  double result = 0.;
2011  for (unsigned int k = 0; k < commonSize; ++k) {
2012  result += m1(row1,k)*m2(k,col2);
2013  }
2014  mat(row1,col2) = result;
2015  }
2016  //std::cout << "In GslMatrix(mat * mat): ended row " << row1 << std::endl;
2017  }
2018 
2019  return mat;
2020 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
GslVector QUESO::operator+ ( const GslVector &  x,
const GslVector &  y 
)

Definition at line 1151 of file GslVector.C.

1152 {
1153  GslVector answer(x);
1154  answer += y;
1155 
1156  return answer;
1157 }
TeuchosVector QUESO::operator+ ( const TeuchosVector &  x,
const TeuchosVector &  y 
)

Definition at line 1218 of file TeuchosVector.C.

1219 {
1220  TeuchosVector answer(x);
1221  answer += y;
1222  return answer;
1223 }
TeuchosMatrix QUESO::operator+ ( const TeuchosMatrix &  m1,
const TeuchosMatrix &  m2 
)

Definition at line 2104 of file TeuchosMatrix.C.

2105 {
2106  TeuchosMatrix answer(m1);
2107  answer += m2;
2108  return answer;
2109 }
GslMatrix QUESO::operator+ ( const GslMatrix &  m1,
const GslMatrix &  m2 
)

Definition at line 2022 of file GslMatrix.C.

2023 {
2024  GslMatrix answer(m1);
2025  answer += m2;
2026  return answer;
2027 }
GslVector QUESO::operator- ( const GslVector &  x,
const GslVector &  y 
)

Definition at line 1159 of file GslVector.C.

1160 {
1161  GslVector answer(x);
1162  answer -= y;
1163 
1164  return answer;
1165 }
TeuchosVector QUESO::operator- ( const TeuchosVector &  x,
const TeuchosVector &  y 
)

Definition at line 1226 of file TeuchosVector.C.

1227 {
1228  TeuchosVector answer(x);
1229  answer -= y;
1230  return answer;
1231 }
TeuchosMatrix QUESO::operator- ( const TeuchosMatrix &  m1,
const TeuchosMatrix &  m2 
)

Definition at line 2112 of file TeuchosMatrix.C.

2113 {
2114  TeuchosMatrix answer(m1);
2115  answer -= m2;
2116  return answer;
2117 }
GslMatrix QUESO::operator- ( const GslMatrix &  m1,
const GslMatrix &  m2 
)

Definition at line 2029 of file GslMatrix.C.

2030 {
2031  GslMatrix answer(m1);
2032  answer -= m2;
2033  return answer;
2034 }
GslVector QUESO::operator/ ( double  a,
const GslVector &  x 
)

Definition at line 1104 of file GslVector.C.

References QUESO::GslVector::cwInvert().

1105 {
1106  GslVector answer(x);
1107  answer.cwInvert();
1108  answer *= a;
1109 
1110  return answer;
1111 }
GslVector QUESO::operator/ ( const GslVector &  x,
const GslVector &  y 
)

Definition at line 1113 of file GslVector.C.

1114 {
1115  GslVector answer(x);
1116  answer /= y;
1117 
1118  return answer;
1119 }
TeuchosVector QUESO::operator/ ( double  a,
const TeuchosVector &  x 
)

Definition at line 1170 of file TeuchosVector.C.

References QUESO::TeuchosVector::cwInvert().

1171 {
1172  TeuchosVector answer(x); //copy x to answer
1173  answer.cwInvert();
1174  answer *= a;
1175  return answer;
1176 }
TeuchosVector QUESO::operator/ ( const TeuchosVector &  x,
const TeuchosVector &  y 
)

Definition at line 1179 of file TeuchosVector.C.

1180 {
1181  TeuchosVector answer(x);
1182  answer /= y;
1183  return answer;
1184 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const InfiniteDimensionalMCMCSamplerOptions &  obj 
)

Definition at line 106 of file InfiniteDimensionalMCMCSamplerOptions.C.

References QUESO::InfiniteDimensionalMCMCSamplerOptions::m_parser, and QUESO::InfiniteDimensionalMCMCSamplerOptions::print().

108 {
109 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
110  os << (*(obj.m_parser)) << std::endl;
111 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
112  obj.print(os);
113  return os;
114 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const GslBlockMatrix &  obj 
)

Definition at line 156 of file GslBlockMatrix.C.

References QUESO::GslBlockMatrix::print().

157 {
158  obj.print(os);
159 
160  return os;
161 }
template<class V , class M >
std::ostream& QUESO::operator<< ( std::ostream &  os,
const ArrayOfOneDTables< V, M > &  obj 
)

Definition at line 112 of file ArrayOfOneDTables.C.

References QUESO::ArrayOfOneDTables< V, M >::print().

113 {
114  obj.print(os);
115  return os;
116 }
template<class V , class M >
std::ostream& QUESO::operator<< ( std::ostream &  os,
const BaseJointPdf< V, M > &  obj 
)

Definition at line 129 of file JointPdf.h.

130 {
131  obj.print(os);
132  return os;
133 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const BoostInputOptionsParser &  parser 
)

Definition at line 157 of file BoostInputOptionsParser.C.

References QUESO::BoostInputOptionsParser::m_optionsDescription.

158 {
159  queso_deprecated();
160  os << *(parser.m_optionsDescription);
161  return os;
162 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const OptimizerOptions &  obj 
)

Definition at line 172 of file OptimizerOptions.C.

References QUESO::OptimizerOptions::m_fdfstepSize, QUESO::OptimizerOptions::m_finiteDifferenceStepSize, QUESO::OptimizerOptions::m_fstepSize, QUESO::OptimizerOptions::m_lineTolerance, QUESO::OptimizerOptions::m_maxIterations, QUESO::OptimizerOptions::m_option_fdfstepSize, QUESO::OptimizerOptions::m_option_finiteDifferenceStepSize, QUESO::OptimizerOptions::m_option_fstepSize, QUESO::OptimizerOptions::m_option_lineTolerance, QUESO::OptimizerOptions::m_option_maxIterations, QUESO::OptimizerOptions::m_option_solverType, QUESO::OptimizerOptions::m_option_tolerance, QUESO::OptimizerOptions::m_solverType, and QUESO::OptimizerOptions::m_tolerance.

173 {
174  os << "\n" << obj.m_option_maxIterations << " = " << obj.m_maxIterations
175  << "\n" << obj.m_option_tolerance << " = " << obj.m_tolerance;
176  os << "\n" << obj.m_option_finiteDifferenceStepSize << " = "
177  << obj.m_finiteDifferenceStepSize;
178  os << "\n" << obj.m_option_solverType << " = " << obj.m_solverType;
179  os << "\n" << obj.m_option_fstepSize << " = " << obj.m_fstepSize;
180  os << "\n" << obj.m_option_fdfstepSize << " = " << obj.m_fdfstepSize;
181  os << "\n" << obj.m_option_lineTolerance << " = " << obj.m_lineTolerance;
182  os << std::endl;
183  return os;
184 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const MLSamplingOptions &  obj 
)

Definition at line 173 of file MLSamplingOptions.C.

References QUESO::MLSamplingOptions::m_parser, and QUESO::MLSamplingOptions::print().

174 {
175 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
176  os << (*(obj.m_parser)) << std::endl;
177 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
178 
179  obj.print(os);
180  return os;
181 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const SipOptionsValues &  obj 
)

Definition at line 175 of file StatisticalInverseProblemOptions.C.

References QUESO::SipOptionsValues::m_computeSolution, QUESO::SipOptionsValues::m_dataOutputAllowedSet, QUESO::SipOptionsValues::m_dataOutputFileName, QUESO::SipOptionsValues::m_option_computeSolution, QUESO::SipOptionsValues::m_option_dataOutputAllowedSet, QUESO::SipOptionsValues::m_option_dataOutputFileName, QUESO::SipOptionsValues::m_option_solver, and QUESO::SipOptionsValues::m_solverString.

176 {
177  os << "\n" << obj.m_option_computeSolution << " = " << obj.m_computeSolution
178  << "\n" << obj.m_option_dataOutputFileName << " = " << obj.m_dataOutputFileName;
179  os << "\n" << obj.m_option_dataOutputAllowedSet << " = ";
180  for (std::set<unsigned int>::iterator setIt = obj.m_dataOutputAllowedSet.begin(); setIt != obj.m_dataOutputAllowedSet.end(); ++setIt) {
181  os << *setIt << " ";
182  }
183 #ifdef UQ_SIP_READS_SOLVER_OPTION
184  << "\n" << obj.m_option_solver << " = " << obj.m_solverString
185 #endif
186  os << std::endl;
187  return os;
188 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const SfpOptionsValues &  obj 
)

Definition at line 180 of file StatisticalForwardProblemOptions.C.

References QUESO::SfpOptionsValues::m_computeCorrelations, QUESO::SfpOptionsValues::m_computeCovariances, QUESO::SfpOptionsValues::m_computeSolution, QUESO::SfpOptionsValues::m_dataOutputAllowedSet, QUESO::SfpOptionsValues::m_dataOutputFileName, QUESO::SfpOptionsValues::m_option_computeCorrelations, QUESO::SfpOptionsValues::m_option_computeCovariances, QUESO::SfpOptionsValues::m_option_computeSolution, QUESO::SfpOptionsValues::m_option_dataOutputAllowedSet, QUESO::SfpOptionsValues::m_option_dataOutputFileName, QUESO::SfpOptionsValues::m_option_solver, QUESO::SfpOptionsValues::m_parser, and QUESO::SfpOptionsValues::m_solverString.

181 {
182 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
183  os << (*(obj.m_parser)) << std::endl;
184 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
185 
186  os << obj.m_option_computeSolution << " = " << obj.m_computeSolution
187  << "\n" << obj.m_option_computeCovariances << " = " << obj.m_computeCovariances
188  << "\n" << obj.m_option_computeCorrelations << " = " << obj.m_computeCorrelations
189  << "\n" << obj.m_option_dataOutputFileName << " = " << obj.m_dataOutputFileName;
190  os << "\n" << obj.m_option_dataOutputAllowedSet << " = ";
191  for (std::set<unsigned int>::iterator setIt = obj.m_dataOutputAllowedSet.begin(); setIt != obj.m_dataOutputAllowedSet.end(); ++setIt) {
192  os << *setIt << " ";
193  }
194 #ifdef UQ_SFP_READS_SOLVER_OPTION
195  << "\n" << obj.m_option_solver << " = " << obj.m_solverString
196 #endif
197  os << std::endl;
198  return os;
199 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const StatisticalForwardProblemOptions &  obj 
)

Prints the object obj, overloading an operator.

Definition at line 400 of file StatisticalForwardProblemOptions.C.

References QUESO::StatisticalForwardProblemOptions::print().

401 {
402  queso_deprecated();
403 
404  obj.print(os);
405 
406  return os;
407 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const StatisticalInverseProblemOptions &  obj 
)

Prints the object obj, overloading an operator.

Definition at line 379 of file StatisticalInverseProblemOptions.C.

References QUESO::StatisticalInverseProblemOptions::print().

380 {
381  queso_deprecated();
382  obj.print(os);
383 
384  return os;
385 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const EnvOptionsValues &  obj 
)

Definition at line 235 of file EnvironmentOptions.C.

References QUESO::BaseEnvironment::input(), QUESO::EnvOptionsValues::m_checkingLevel, QUESO::EnvOptionsValues::m_displayVerbosity, QUESO::EnvOptionsValues::m_env, QUESO::EnvOptionsValues::m_identifyingString, QUESO::EnvOptionsValues::m_numSubEnvironments, QUESO::EnvOptionsValues::m_option_checkingLevel, QUESO::EnvOptionsValues::m_option_displayVerbosity, QUESO::EnvOptionsValues::m_option_identifyingString, QUESO::EnvOptionsValues::m_option_numSubEnvironments, QUESO::EnvOptionsValues::m_option_platformName, QUESO::EnvOptionsValues::m_option_rngType, QUESO::EnvOptionsValues::m_option_seed, QUESO::EnvOptionsValues::m_option_subDisplayAllowAll, QUESO::EnvOptionsValues::m_option_subDisplayAllowedSet, QUESO::EnvOptionsValues::m_option_subDisplayFileName, QUESO::EnvOptionsValues::m_option_syncVerbosity, QUESO::EnvOptionsValues::m_parser, QUESO::EnvOptionsValues::m_platformName, QUESO::EnvOptionsValues::m_rngType, QUESO::EnvOptionsValues::m_seed, QUESO::EnvOptionsValues::m_subDisplayAllowAll, QUESO::EnvOptionsValues::m_subDisplayAllowedSet, QUESO::EnvOptionsValues::m_subDisplayFileName, and QUESO::EnvOptionsValues::m_syncVerbosity.

236 {
237  // Print the parser
238 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
239  os << (*(obj.m_parser)) << std::endl;
240 #else
241  obj.m_env->input().print(os);
242 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
243 
244  // Print the option names and current values
245  os << obj.m_option_numSubEnvironments << " = " << obj.m_numSubEnvironments
246  << "\n" << obj.m_option_subDisplayFileName << " = " << obj.m_subDisplayFileName
247  << "\n" << obj.m_option_subDisplayAllowAll << " = " << obj.m_subDisplayAllowAll
248  //<< "\n" << obj.m_option_subDisplayAllowInter0 << " = " << obj.m_subDisplayAllowInter0
249  << "\n" << obj.m_option_subDisplayAllowedSet << " = ";
250  for (std::set<unsigned int>::iterator setIt = obj.m_subDisplayAllowedSet.begin(); setIt != obj.m_subDisplayAllowedSet.end(); ++setIt) {
251  os << *setIt << " ";
252  }
253  os << "\n" << obj.m_option_displayVerbosity << " = " << obj.m_displayVerbosity
254  << "\n" << obj.m_option_syncVerbosity << " = " << obj.m_syncVerbosity
255  << "\n" << obj.m_option_checkingLevel << " = " << obj.m_checkingLevel
256  << "\n" << obj.m_option_rngType << " = " << obj.m_rngType
257  << "\n" << obj.m_option_seed << " = " << obj.m_seed
258  << "\n" << obj.m_option_platformName << " = " << obj.m_platformName
259  << "\n" << obj.m_option_identifyingString << " = " << obj.m_identifyingString
260  //<< "\n" << obj.m_option_numDebugParams << " = " << obj.m_numDebugParams
261  << std::endl;
262  return os;
263 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const GslVector &  obj 
)

Definition at line 1097 of file GslVector.C.

References QUESO::GslVector::print().

1098 {
1099  obj.print(os);
1100 
1101  return os;
1102 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const MonteCarloSGOptions &  obj 
)

Prints the object obj, overloading an operator.

Definition at line 710 of file MonteCarloSGOptions.C.

References QUESO::MonteCarloSGOptions::print().

711 {
712  queso_deprecated();
713 
714  obj.print(os);
715 
716  return os;
717 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const TeuchosVector &  obj 
)

Definition at line 1255 of file TeuchosVector.C.

References QUESO::TeuchosVector::print().

1256 {
1257  obj.print(os);
1258 
1259  return os;
1260 }
template<class V , class M >
std::ostream& QUESO::operator<< ( std::ostream &  os,
const AsciiTable< V, M > &  obj 
)

Definition at line 301 of file AsciiTable.C.

302 {
303  obj.print(os);
304 
305  return os;
306 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const McOptionsValues &  obj 
)

Definition at line 330 of file MonteCarloSGOptions.C.

References QUESO::McOptionsValues::m_dataOutputAllowedSet, QUESO::McOptionsValues::m_dataOutputFileName, QUESO::McOptionsValues::m_option_dataOutputAllowedSet, QUESO::McOptionsValues::m_option_dataOutputFileName, QUESO::McOptionsValues::m_option_pseq_computeStats, QUESO::McOptionsValues::m_option_pseq_dataOutputAllowedSet, QUESO::McOptionsValues::m_option_pseq_dataOutputFileName, QUESO::McOptionsValues::m_option_pseq_dataOutputFileType, QUESO::McOptionsValues::m_option_pseq_dataOutputPeriod, QUESO::McOptionsValues::m_option_qseq_computeStats, QUESO::McOptionsValues::m_option_qseq_dataInputFileName, QUESO::McOptionsValues::m_option_qseq_dataInputFileType, QUESO::McOptionsValues::m_option_qseq_dataOutputAllowedSet, QUESO::McOptionsValues::m_option_qseq_dataOutputFileName, QUESO::McOptionsValues::m_option_qseq_dataOutputFileType, QUESO::McOptionsValues::m_option_qseq_dataOutputPeriod, QUESO::McOptionsValues::m_option_qseq_displayPeriod, QUESO::McOptionsValues::m_option_qseq_measureRunTimes, QUESO::McOptionsValues::m_option_qseq_size, QUESO::McOptionsValues::m_parser, QUESO::McOptionsValues::m_pseqComputeStats, QUESO::McOptionsValues::m_pseqDataOutputAllowedSet, QUESO::McOptionsValues::m_pseqDataOutputFileName, QUESO::McOptionsValues::m_pseqDataOutputFileType, QUESO::McOptionsValues::m_pseqDataOutputPeriod, QUESO::McOptionsValues::m_qseqComputeStats, QUESO::McOptionsValues::m_qseqDataInputFileName, QUESO::McOptionsValues::m_qseqDataInputFileType, QUESO::McOptionsValues::m_qseqDataOutputAllowedSet, QUESO::McOptionsValues::m_qseqDataOutputFileName, QUESO::McOptionsValues::m_qseqDataOutputFileType, QUESO::McOptionsValues::m_qseqDataOutputPeriod, QUESO::McOptionsValues::m_qseqDisplayPeriod, QUESO::McOptionsValues::m_qseqMeasureRunTimes, and QUESO::McOptionsValues::m_qseqSize.

331 {
332 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
333  os << (*(obj.m_parser)) << std::endl;
334 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
335 
336  os << obj.m_option_dataOutputFileName << " = " << obj.m_dataOutputFileName
337  << "\n" << obj.m_option_dataOutputAllowedSet << " = ";
338  for (std::set<unsigned int>::iterator setIt = obj.m_dataOutputAllowedSet.begin(); setIt != obj.m_dataOutputAllowedSet.end(); ++setIt) {
339  os << *setIt << " ";
340  }
341  os << "\n" << obj.m_option_pseq_dataOutputPeriod << " = " << obj.m_pseqDataOutputPeriod
342  << "\n" << obj.m_option_pseq_dataOutputFileName << " = " << obj.m_pseqDataOutputFileName
343  << "\n" << obj.m_option_pseq_dataOutputFileType << " = " << obj.m_pseqDataOutputFileType
344  << "\n" << obj.m_option_pseq_dataOutputAllowedSet << " = ";
345  for (std::set<unsigned int>::iterator setIt = obj.m_pseqDataOutputAllowedSet.begin(); setIt != obj.m_pseqDataOutputAllowedSet.end(); ++setIt) {
346  os << *setIt << " ";
347  }
348  os
349 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
350  << "\n" << obj.m_option_pseq_computeStats << " = " << obj.m_pseqComputeStats
351 #endif
352  << "\n" << obj.m_option_qseq_dataInputFileName << " = " << obj.m_qseqDataInputFileName
353  << "\n" << obj.m_option_qseq_dataInputFileType << " = " << obj.m_qseqDataInputFileType
354  << "\n" << obj.m_option_qseq_size << " = " << obj.m_qseqSize
355  << "\n" << obj.m_option_qseq_displayPeriod << " = " << obj.m_qseqDisplayPeriod
356  << "\n" << obj.m_option_qseq_measureRunTimes << " = " << obj.m_qseqMeasureRunTimes
357  << "\n" << obj.m_option_qseq_dataOutputPeriod << " = " << obj.m_qseqDataOutputPeriod
358  << "\n" << obj.m_option_qseq_dataOutputFileName << " = " << obj.m_qseqDataOutputFileName
359  << "\n" << obj.m_option_qseq_dataOutputFileType << " = " << obj.m_qseqDataOutputFileType
360  << "\n" << obj.m_option_qseq_dataOutputAllowedSet << " = ";
361  for (std::set<unsigned int>::iterator setIt = obj.m_qseqDataOutputAllowedSet.begin(); setIt != obj.m_qseqDataOutputAllowedSet.end(); ++setIt) {
362  os << *setIt << " ";
363  }
364 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
365  os << "\n" << obj.m_option_qseq_computeStats << " = " << obj.m_qseqComputeStats;
366 #endif
367 
368  return os;
369 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const EnvironmentOptions &  obj 
)

Print values of the options chosen.

Definition at line 533 of file EnvironmentOptions.C.

References QUESO::EnvironmentOptions::print().

534 {
535  queso_deprecated();
536 
537  obj.print(os);
538 
539  return os;
540 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const TeuchosMatrix &  obj 
)

Definition at line 2182 of file TeuchosMatrix.C.

References QUESO::TeuchosMatrix::print().

2183 {
2184  obj.print(os);
2185 
2186  return os;
2187 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const GslMatrix &  obj 
)

Definition at line 1975 of file GslMatrix.C.

References QUESO::GslMatrix::print().

1976 {
1977  obj.print(os);
1978 
1979  return os;
1980 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const BaseEnvironment &  obj 
)
std::ostream& QUESO::operator<< ( std::ostream &  os,
const GPMSAOptions &  obj 
)

Definition at line 611 of file GPMSAOptions.C.

References QUESO::GPMSAOptions::m_parser, and QUESO::GPMSAOptions::print().

612 {
613 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
614  os << (*(obj.m_parser)) << std::endl;
615 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
616  obj.print(os);
617  return os;
618 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const MhOptionsValues &  obj 
)

Definition at line 743 of file MetropolisHastingsSGOptions.C.

References QUESO::MhOptionsValues::m_algorithm, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowAll, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowedSet, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileName, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileType, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputPeriod, QUESO::MhOptionsValues::m_amAdaptInterval, QUESO::MhOptionsValues::m_amEpsilon, QUESO::MhOptionsValues::m_amEta, QUESO::MhOptionsValues::m_amInitialNonAdaptInterval, QUESO::MhOptionsValues::m_amKeepInitialMatrix, QUESO::MhOptionsValues::m_BrooksGelmanLag, QUESO::MhOptionsValues::m_dataOutputAllowAll, QUESO::MhOptionsValues::m_dataOutputAllowedSet, QUESO::MhOptionsValues::m_dataOutputFileName, QUESO::MhOptionsValues::m_displayCandidates, QUESO::MhOptionsValues::m_doLogitTransform, QUESO::MhOptionsValues::m_drDuringAmNonAdaptiveInt, QUESO::MhOptionsValues::m_drMaxNumExtraStages, QUESO::MhOptionsValues::m_drScalesForExtraStages, QUESO::MhOptionsValues::m_enableBrooksGelmanConvMonitor, QUESO::MhOptionsValues::m_filteredChainComputeStats, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowAll, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_filteredChainDataOutputFileName, QUESO::MhOptionsValues::m_filteredChainDataOutputFileType, QUESO::MhOptionsValues::m_filteredChainDiscardedPortion, QUESO::MhOptionsValues::m_filteredChainGenerate, QUESO::MhOptionsValues::m_filteredChainLag, QUESO::MhOptionsValues::m_initialPositionDataInputFileName, QUESO::MhOptionsValues::m_initialPositionDataInputFileType, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileName, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileType, QUESO::MhOptionsValues::m_option_algorithm, QUESO::MhOptionsValues::m_option_am_adaptedMatrices_dataOutputAllowAll, QUESO::MhOptionsValues::m_option_am_adaptedMatrices_dataOutputAllowedSet, QUESO::MhOptionsValues::m_option_am_adaptedMatrices_dataOutputFileName, QUESO::MhOptionsValues::m_option_am_adaptedMatrices_dataOutputFileType, QUESO::MhOptionsValues::m_option_am_adaptedMatrices_dataOutputPeriod, QUESO::MhOptionsValues::m_option_am_adaptInterval, QUESO::MhOptionsValues::m_option_am_epsilon, QUESO::MhOptionsValues::m_option_am_eta, QUESO::MhOptionsValues::m_option_am_initialNonAdaptInterval, QUESO::MhOptionsValues::m_option_am_keepInitialMatrix, QUESO::MhOptionsValues::m_option_BrooksGelmanLag, QUESO::MhOptionsValues::m_option_dataOutputAllowAll, QUESO::MhOptionsValues::m_option_dataOutputAllowedSet, QUESO::MhOptionsValues::m_option_dataOutputFileName, QUESO::MhOptionsValues::m_option_displayCandidates, QUESO::MhOptionsValues::m_option_doLogitTransform, QUESO::MhOptionsValues::m_option_dr_duringAmNonAdaptiveInt, QUESO::MhOptionsValues::m_option_dr_listOfScalesForExtraStages, QUESO::MhOptionsValues::m_option_dr_maxNumExtraStages, QUESO::MhOptionsValues::m_option_enableBrooksGelmanConvMonitor, QUESO::MhOptionsValues::m_option_filteredChain_computeStats, QUESO::MhOptionsValues::m_option_filteredChain_dataOutputAllowAll, QUESO::MhOptionsValues::m_option_filteredChain_dataOutputAllowedSet, QUESO::MhOptionsValues::m_option_filteredChain_dataOutputFileName, QUESO::MhOptionsValues::m_option_filteredChain_dataOutputFileType, QUESO::MhOptionsValues::m_option_filteredChain_discardedPortion, QUESO::MhOptionsValues::m_option_filteredChain_generate, QUESO::MhOptionsValues::m_option_filteredChain_lag, QUESO::MhOptionsValues::m_option_initialPosition_dataInputFileName, QUESO::MhOptionsValues::m_option_initialPosition_dataInputFileType, QUESO::MhOptionsValues::m_option_initialProposalCovMatrix_dataInputFileName, QUESO::MhOptionsValues::m_option_initialProposalCovMatrix_dataInputFileType, QUESO::MhOptionsValues::m_option_listOfDisabledParameters, QUESO::MhOptionsValues::m_option_outputLogLikelihood, QUESO::MhOptionsValues::m_option_outputLogTarget, QUESO::MhOptionsValues::m_option_putOutOfBoundsInChain, QUESO::MhOptionsValues::m_option_rawChain_computeStats, QUESO::MhOptionsValues::m_option_rawChain_dataInputFileName, QUESO::MhOptionsValues::m_option_rawChain_dataInputFileType, QUESO::MhOptionsValues::m_option_rawChain_dataOutputAllowAll, QUESO::MhOptionsValues::m_option_rawChain_dataOutputAllowedSet, QUESO::MhOptionsValues::m_option_rawChain_dataOutputFileName, QUESO::MhOptionsValues::m_option_rawChain_dataOutputFileType, QUESO::MhOptionsValues::m_option_rawChain_dataOutputPeriod, QUESO::MhOptionsValues::m_option_rawChain_displayPeriod, QUESO::MhOptionsValues::m_option_rawChain_generateExtra, QUESO::MhOptionsValues::m_option_rawChain_measureRunTimes, QUESO::MhOptionsValues::m_option_rawChain_size, QUESO::MhOptionsValues::m_option_tk, QUESO::MhOptionsValues::m_option_tk_useLocalHessian, QUESO::MhOptionsValues::m_option_tk_useNewtonComponent, QUESO::MhOptionsValues::m_option_totallyMute, QUESO::MhOptionsValues::m_option_updateInterval, QUESO::MhOptionsValues::m_outputLogLikelihood, QUESO::MhOptionsValues::m_outputLogTarget, QUESO::MhOptionsValues::m_parameterDisabledSet, QUESO::MhOptionsValues::m_parser, QUESO::MhOptionsValues::m_putOutOfBoundsInChain, QUESO::MhOptionsValues::m_rawChainComputeStats, QUESO::MhOptionsValues::m_rawChainDataInputFileName, QUESO::MhOptionsValues::m_rawChainDataInputFileType, QUESO::MhOptionsValues::m_rawChainDataOutputAllowAll, QUESO::MhOptionsValues::m_rawChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_rawChainDataOutputFileName, QUESO::MhOptionsValues::m_rawChainDataOutputFileType, QUESO::MhOptionsValues::m_rawChainDataOutputPeriod, QUESO::MhOptionsValues::m_rawChainDisplayPeriod, QUESO::MhOptionsValues::m_rawChainGenerateExtra, QUESO::MhOptionsValues::m_rawChainMeasureRunTimes, QUESO::MhOptionsValues::m_rawChainSize, QUESO::MhOptionsValues::m_tk, QUESO::MhOptionsValues::m_tkUseLocalHessian, QUESO::MhOptionsValues::m_tkUseNewtonComponent, QUESO::MhOptionsValues::m_totallyMute, and QUESO::MhOptionsValues::m_updateInterval.

744 {
745 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
746  os << (*(obj.m_parser)) << std::endl;
747 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
748 
749  os << obj.m_option_dataOutputFileName << " = " << obj.m_dataOutputFileName
750  << "\n" << obj.m_option_dataOutputAllowAll << " = " << obj.m_dataOutputAllowAll
751  << "\n" << obj.m_option_dataOutputAllowedSet << " = ";
752  for (std::set<unsigned int>::iterator setIt = obj.m_dataOutputAllowedSet.begin(); setIt != obj.m_dataOutputAllowedSet.end(); ++setIt) {
753  os << *setIt << " ";
754  }
755  os << "\n" << obj.m_option_totallyMute << " = " << obj.m_totallyMute
756  << "\n" << obj.m_option_initialPosition_dataInputFileName << " = " << obj.m_initialPositionDataInputFileName
757  << "\n" << obj.m_option_initialPosition_dataInputFileType << " = " << obj.m_initialPositionDataInputFileType
758  << "\n" << obj.m_option_initialProposalCovMatrix_dataInputFileName << " = " << obj.m_initialProposalCovMatrixDataInputFileName
759  << "\n" << obj.m_option_initialProposalCovMatrix_dataInputFileType << " = " << obj.m_initialProposalCovMatrixDataInputFileType
760  << "\n" << obj.m_option_listOfDisabledParameters << " = ";
761  for (std::set<unsigned int>::iterator setIt = obj.m_parameterDisabledSet.begin(); setIt != obj.m_parameterDisabledSet.end(); ++setIt) {
762  os << *setIt << " ";
763  }
764  os << "\n" << obj.m_option_rawChain_dataInputFileName << " = " << obj.m_rawChainDataInputFileName
765  << "\n" << obj.m_option_rawChain_dataInputFileType << " = " << obj.m_rawChainDataInputFileType
766  << "\n" << obj.m_option_rawChain_size << " = " << obj.m_rawChainSize
767  << "\n" << obj.m_option_rawChain_generateExtra << " = " << obj.m_rawChainGenerateExtra
768  << "\n" << obj.m_option_rawChain_displayPeriod << " = " << obj.m_rawChainDisplayPeriod
769  << "\n" << obj.m_option_rawChain_measureRunTimes << " = " << obj.m_rawChainMeasureRunTimes
770  << "\n" << obj.m_option_rawChain_dataOutputPeriod << " = " << obj.m_rawChainDataOutputPeriod
771  << "\n" << obj.m_option_rawChain_dataOutputFileName << " = " << obj.m_rawChainDataOutputFileName
772  << "\n" << obj.m_option_rawChain_dataOutputFileType << " = " << obj.m_rawChainDataOutputFileType
773  << "\n" << obj.m_option_rawChain_dataOutputAllowAll << " = " << obj.m_rawChainDataOutputAllowAll
774  << "\n" << obj.m_option_rawChain_dataOutputAllowedSet << " = ";
775  for (std::set<unsigned int>::iterator setIt = obj.m_rawChainDataOutputAllowedSet.begin(); setIt != obj.m_rawChainDataOutputAllowedSet.end(); ++setIt) {
776  os << *setIt << " ";
777  }
778  os
779 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
780  << "\n" << obj.m_option_rawChain_computeStats << " = " << obj.m_rawChainComputeStats
781 #endif
782  << "\n" << obj.m_option_filteredChain_generate << " = " << obj.m_filteredChainGenerate
783  << "\n" << obj.m_option_filteredChain_discardedPortion << " = " << obj.m_filteredChainDiscardedPortion
784  << "\n" << obj.m_option_filteredChain_lag << " = " << obj.m_filteredChainLag
785  << "\n" << obj.m_option_filteredChain_dataOutputFileName << " = " << obj.m_filteredChainDataOutputFileName
786  << "\n" << obj.m_option_filteredChain_dataOutputFileType << " = " << obj.m_filteredChainDataOutputFileType
787  << "\n" << obj.m_option_filteredChain_dataOutputAllowAll << " = " << obj.m_filteredChainDataOutputAllowAll
788  << "\n" << obj.m_option_filteredChain_dataOutputAllowedSet << " = ";
789  for (std::set<unsigned int>::iterator setIt = obj.m_filteredChainDataOutputAllowedSet.begin(); setIt != obj.m_filteredChainDataOutputAllowedSet.end(); ++setIt) {
790  os << *setIt << " ";
791  }
792  os
793 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
794  << "\n" << obj.m_option_filteredChain_computeStats << " = " << obj.m_filteredChainComputeStats
795 #endif
796  << "\n" << obj.m_option_displayCandidates << " = " << obj.m_displayCandidates
797  << "\n" << obj.m_option_putOutOfBoundsInChain << " = " << obj.m_putOutOfBoundsInChain
798  << "\n" << obj.m_option_tk_useLocalHessian << " = " << obj.m_tkUseLocalHessian
799  << "\n" << obj.m_option_tk_useNewtonComponent << " = " << obj.m_tkUseNewtonComponent
800  << "\n" << obj.m_option_dr_maxNumExtraStages << " = " << obj.m_drMaxNumExtraStages
801  << "\n" << obj.m_option_dr_listOfScalesForExtraStages << " = ";
802  for (unsigned int i = 0; i < obj.m_drScalesForExtraStages.size(); ++i) {
803  os << obj.m_drScalesForExtraStages[i] << " ";
804  }
805  os << "\n" << obj.m_option_dr_duringAmNonAdaptiveInt << " = " << obj.m_drDuringAmNonAdaptiveInt
806  << "\n" << obj.m_option_am_keepInitialMatrix << " = " << obj.m_amKeepInitialMatrix
807  << "\n" << obj.m_option_am_initialNonAdaptInterval << " = " << obj.m_amInitialNonAdaptInterval
808  << "\n" << obj.m_option_am_adaptInterval << " = " << obj.m_amAdaptInterval
809  << "\n" << obj.m_option_am_adaptedMatrices_dataOutputPeriod << " = " << obj.m_amAdaptedMatricesDataOutputPeriod
810  << "\n" << obj.m_option_am_adaptedMatrices_dataOutputFileName << " = " << obj.m_amAdaptedMatricesDataOutputFileName
811  << "\n" << obj.m_option_am_adaptedMatrices_dataOutputFileType << " = " << obj.m_amAdaptedMatricesDataOutputFileType
812  << "\n" << obj.m_option_am_adaptedMatrices_dataOutputAllowAll << " = " << obj.m_amAdaptedMatricesDataOutputAllowAll
813  << "\n" << obj.m_option_am_adaptedMatrices_dataOutputAllowedSet << " = ";
814  for (std::set<unsigned int>::iterator setIt = obj.m_amAdaptedMatricesDataOutputAllowedSet.begin(); setIt != obj.m_amAdaptedMatricesDataOutputAllowedSet.end(); ++setIt) {
815  os << *setIt << " ";
816  }
817  os << "\n" << obj.m_option_am_eta << " = " << obj.m_amEta
818  << "\n" << obj.m_option_am_epsilon << " = " << obj.m_amEpsilon
819  << "\n" << obj.m_option_enableBrooksGelmanConvMonitor << " = " << obj.m_enableBrooksGelmanConvMonitor
820  << "\n" << obj.m_option_BrooksGelmanLag << " = " << obj.m_BrooksGelmanLag
821  << "\n" << obj.m_option_outputLogLikelihood << " = " << obj.m_outputLogLikelihood
822  << "\n" << obj.m_option_outputLogTarget << " = " << obj.m_outputLogTarget
823  << "\n" << obj.m_option_doLogitTransform << " = " << obj.m_doLogitTransform
824  << "\n" << obj.m_option_algorithm << " = " << obj.m_algorithm
825  << "\n" << obj.m_option_tk << " = " << obj.m_tk
826  << "\n" << obj.m_option_updateInterval << " = " << obj.m_updateInterval
827  << std::endl;
828 
829  return os;
830 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const MLSamplingLevelOptions &  obj 
)

Definition at line 842 of file MLSamplingLevelOptions.C.

References QUESO::MLSamplingLevelOptions::m_parser, and QUESO::MLSamplingLevelOptions::print().

843 {
844 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
845  os << (*(obj.m_parser)) << std::endl;
846 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
847  obj.print(os);
848  return os;
849 }
std::ostream & QUESO::operator<< ( std::ostream &  os,
const MetropolisHastingsSGOptions &  obj 
)

Definition at line 1720 of file MetropolisHastingsSGOptions.C.

References QUESO::MetropolisHastingsSGOptions::print().

1721 {
1722  queso_deprecated();
1723 
1724  obj.print(os);
1725 
1726  return os;
1727 }
std::ostream& QUESO::operator<< ( std::ostream &  os,
const SequenceStatisticalOptions obj 
)

Definition at line 1457 of file SequenceStatisticalOptions.C.

References SequenceStatisticalOptions::print().

1458 {
1459  queso_deprecated();
1460 
1461  obj.print(os);
1462 
1463  return os;
1464 }
void print(std::ostream &os) const
Prints the initial discarded portion of the chain; and, optionally, other attributes of the chain...
template<class P_V , class P_M >
std::ostream& QUESO::operator<< ( std::ostream &  os,
const MLSampling< P_V, P_M > &  obj 
)

Definition at line 4822 of file MLSampling.C.

4823 {
4824  obj.print(os);
4825 
4826  return os;
4827 }
bool QUESO::operator== ( const GslVector &  lhs,
const GslVector &  rhs 
)

Definition at line 1168 of file GslVector.C.

References queso_require_equal_to_msg, and QUESO::GslVector::sizeLocal().

1169 {
1170  bool answer = true;
1171 
1172  unsigned int size1 = lhs.sizeLocal();
1173  unsigned int size2 = rhs.sizeLocal();
1174  queso_require_equal_to_msg(size1, size2, "different sizes of lhs and rhs");
1175 
1176  for (unsigned int i = 0; i < size1; ++i) {
1177  if (lhs[i] != rhs[i]) {
1178  answer = false;
1179  break;
1180  }
1181  }
1182 
1183  return answer;
1184 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
bool QUESO::operator== ( const TeuchosVector &  lhs,
const TeuchosVector &  rhs 
)

Definition at line 1235 of file TeuchosVector.C.

References queso_require_equal_to_msg, and QUESO::TeuchosVector::sizeLocal().

1236 {
1237  bool answer = true;
1238  unsigned int size1 = lhs.sizeLocal();
1239  unsigned int size2 = rhs.sizeLocal();
1240 
1241  queso_require_equal_to_msg(size1, size2, "different sizes of lhs and rhs");
1242 
1243  for (unsigned int i = 0; i < size1; ++i) {
1244  if (lhs[i] != rhs[i]) {
1245  answer = false;
1246  break;
1247  }
1248  }
1249 
1250  return answer;
1251 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
int QUESO::QUESO_get_numeric_version ( )

Definition at line 86 of file Environment.C.

Referenced by QUESO_version_print().

87  {
88  // Note: return format follows the versioning convention xx.yy.z where
89  //
90  // xx = major version number
91  // yy = minor version number
92  // zz = micro version number
93  //
94  // For example:
95  // v. 0.23 -> 002300 = 2300
96  // v. 0.23.1 -> 002301 = 2301
97  // v. 10.23.2 -> 102302
98 
99  int major_version = 0;
100  int minor_version = 0;
101  int micro_version = 0;
102 
103 #ifdef QUESO_MAJOR_VERSION
104  major_version = QUESO_MAJOR_VERSION;
105 #endif
106 
107 #ifdef QUESO_MINOR_VERSION
108  minor_version = QUESO_MINOR_VERSION;
109 #endif
110 
111 #ifdef QUESO_MICRO_VERSION
112  micro_version = QUESO_MICRO_VERSION;
113 #endif
114 
115  return(major_version*10000 + minor_version*100 + micro_version);
116  }
template<typename T >
bool QUESO::queso_isfinite ( arg)

Definition at line 51 of file math_macros.h.

Referenced by QUESO::InterpolationSurrogateData< V, M >::check_domain_bounds(), QUESO::InvLogitGaussianJointPdf< V, M >::lnValue(), QUESO::UniformVectorRealizer< V, M >::realization(), QUESO::InvLogitGaussianVectorRealizer< V, M >::realization(), QUESO::MetropolisHastingsSG< P_V, P_M >::transformInitialCovMatrixToGaussianSpace(), and QUESO::TransformedScaledCovMatrixTKGroup< V, M >::transformToGaussianSpace().

52  {
53 #ifdef QUESO_HAVE_CXX11_ISFINITE
54  return std::isfinite(arg);
55 #elif QUESO_HAVE_BOOST_MATH_SPECIAL_FUNCTIONS_HPP
56  return (boost::math::isfinite)(arg);
57 #else
58 # error "No valid definition for isfinite found!"
59 #endif
60  }
template<typename T >
bool QUESO::queso_isnan ( arg)
QUESO::QUESO_STANDARD_TYPE ( char  ,
MPI_CHAR   
)
QUESO::QUESO_STANDARD_TYPE ( int  ,
MPI_INT   
)
QUESO::QUESO_STANDARD_TYPE ( unsigned  int,
MPI_UNSIGNED   
)
QUESO::QUESO_STANDARD_TYPE ( double  ,
MPI_DOUBLE   
)
void QUESO::queso_terminate_handler ( )

Function for unhandled exceptions in Queso.

queso_terminate_handler This function deals with unhandled exceptions encountered in Queso. It provides a call to MPI_abort using the global communicator.

Definition at line 1731 of file Environment.C.

References old_terminate_handler.

Referenced by QUESO::FullEnvironment::construct().

1732 {
1733 #ifdef QUESO_HAS_MPI
1734  int mpi_initialized;
1735  MPI_Initialized (&mpi_initialized);
1736 
1737  if (mpi_initialized)
1738  {
1739  //MPI_Abort(m_fullComm->Comm(), 1);
1740  MPI_Abort(MPI_COMM_WORLD, 1);
1741  }
1742  else
1743  {
1744  // The system terminate_handler may do useful things like printing
1745  // uncaught exception information, or the user may have created
1746  // their own terminate handler that we want to call.
1748  }
1749 #else
1751 #endif
1752  exit(1);
1753 }
std::terminate_handler old_terminate_handler
Definition: Environment.C:139
void QUESO::QUESO_version_print ( std::ostream &  os)

Definition at line 56 of file Environment.C.

References QUESO_get_numeric_version().

Referenced by QUESO::FullEnvironment::construct(), and main().

57  {
58  {
59  os << "------------------------------------------------------------------------------------------" ;
60  os << "--------------------" << std::endl;
61  os << "QUESO Library: Version = " << QUESO_VERSION;
62  os << " (" << QUESO_get_numeric_version() << ")" << std::endl << std::endl;
63 
64  os << QUESO_BUILD_DEVSTATUS << std::endl << std::endl;
65 
66  os << "Build Date = " << QUESO_BUILD_DATE << std::endl;
67  os << "Build Host = " << QUESO_BUILD_HOST << std::endl;
68  os << "Build User = " << QUESO_BUILD_USER << std::endl;
69  os << "Build Arch = " << QUESO_BUILD_ARCH << std::endl;
70  os << "Build Rev = " << QUESO_BUILD_VERSION << std::endl << std::endl;
71 
72  os << "C++ Config = " << QUESO_CXX << " " << QUESO_CXXFLAGS << std::endl;
73  os << std::endl;
74  os << "Trilinos DIR = " << QUESO_TRILINOS_DIR << std::endl;
75  os << "GSL Libs = " << QUESO_GSL_DIR << std::endl;
76  os << "GRVY DIR = " << QUESO_GRVY_DIR << std::endl;
77  os << "GLPK DIR = " << QUESO_GLPK_DIR << std::endl;
78  os << "HDF5 DIR = " << QUESO_HDF5_DIR << std::endl;
79  os << "------------------------------------------------------------------------------------------" ;
80  os << "--------------------" << std::endl;
81  }
82 
83  return;
84  }
int QUESO_get_numeric_version()
Definition: Environment.C:86
SfpOptionsValues::SfpOptionsValues () m_parser QUESO::registerOption< bool > ( m_option_computeSolution  ,
UQ_SFP_COMPUTE_SOLUTION_ODV  ,
"compute solution process"   
)
m_parser QUESO::registerOption< bool > ( m_option_computeCovariances  ,
UQ_SFP_COMPUTE_COVARIANCES_ODV  ,
"compute pq covariances"   
)
m_parser QUESO::registerOption< bool > ( m_option_computeCorrelations  ,
UQ_SFP_COMPUTE_CORRELATIONS_ODV  ,
"compute pq correlations"   
)
m_parser QUESO::registerOption< std::string > ( m_option_dataOutputFileName  ,
UQ_SFP_DATA_OUTPUT_FILE_NAME_ODV  ,
"name of data output file"   
)
m_parser QUESO::registerOption< std::string > ( m_option_dataOutputAllowedSet  ,
UQ_SFP_DATA_OUTPUT_ALLOWED_SET_ODV  ,
"subEnvs that will write to data output file"   
)
m_parser QUESO::registerOption< std::string > ( m_option_solver  ,
UQ_SFP_SOLVER_ODV  ,
"algorithm for propagation"   
)
TeuchosMatrix QUESO::rightDiagScaling ( const TeuchosMatrix &  mat,
const TeuchosVector &  vec 
)

Definition at line 2159 of file TeuchosMatrix.C.

References QUESO::TeuchosMatrix::numCols(), QUESO::TeuchosMatrix::numRowsLocal(), queso_require_equal_to_msg, and QUESO::TeuchosVector::sizeLocal().

2160 {
2161  unsigned int vSize = vec.sizeLocal();
2162  unsigned int mRows = mat.numRowsLocal();
2163  unsigned int mCols = mat.numCols();
2164 
2165  queso_require_equal_to_msg(vSize, mCols, "size of vector is different from the number of cols in matrix");
2166 
2167  queso_require_equal_to_msg(mCols, mRows, "routine currently works for square matrices only");
2168 
2169  TeuchosMatrix answer(mat);
2170  for (unsigned int j = 0; j < mCols; ++j) {
2171  double vecValue = vec[j];
2172  for (unsigned int i = 0; i < mRows; ++i) {
2173  answer(i,j) *= vecValue;
2174  }
2175  }
2176 
2177  return answer;
2178 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
GslMatrix QUESO::rightDiagScaling ( const GslMatrix &  mat,
const GslVector &  vec 
)

Definition at line 2073 of file GslMatrix.C.

References QUESO::GslMatrix::numCols(), QUESO::GslMatrix::numRowsLocal(), queso_require_equal_to_msg, and QUESO::GslVector::sizeLocal().

2074 {
2075  unsigned int vSize = vec.sizeLocal();
2076  unsigned int mRows = mat.numRowsLocal();
2077  unsigned int mCols = mat.numCols();
2078 
2079  queso_require_equal_to_msg(vSize, mCols, "size of vector is different from the number of cols in matrix");
2080 
2081  queso_require_equal_to_msg(mCols, mRows, "routine currently works for square matrices only");
2082 
2083  GslMatrix answer(mat);
2084  for (unsigned int j = 0; j < mCols; ++j) {
2085  double vecValue = vec[j];
2086  for (unsigned int i = 0; i < mRows; ++i) {
2087  answer(i,j) *= vecValue;
2088  }
2089  }
2090 
2091  return answer;
2092 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
double QUESO::scalarProduct ( const GslVector &  x,
const GslVector &  y 
)

Definition at line 1137 of file GslVector.C.

References queso_require_equal_to_msg, and QUESO::GslVector::sizeLocal().

Referenced by QUESO::GslVector::norm2Sq(), and QUESO::GPMSAFactory< V, M >::setUpHyperpriors().

1138 {
1139  unsigned int size1 = x.sizeLocal();
1140  unsigned int size2 = y.sizeLocal();
1141  queso_require_equal_to_msg(size1, size2, "different sizes of x and y");
1142 
1143  double result = 0.;
1144  for (unsigned int i = 0; i < size1; ++i) {
1145  result += x[i]*y[i];
1146  }
1147 
1148  return result;
1149 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
double QUESO::scalarProduct ( const TeuchosVector &  x,
const TeuchosVector &  y 
)

Definition at line 1203 of file TeuchosVector.C.

References queso_require_equal_to_msg, and QUESO::TeuchosVector::sizeLocal().

1204 {
1205  unsigned int size1 = x.sizeLocal();
1206  unsigned int size2 = y.sizeLocal();
1207 
1208  queso_require_equal_to_msg(size1, size2, "different sizes of x and y");
1209  double result = 0.;
1210  for (unsigned int i = 0; i < size1; ++i) {
1211  result += x[i]*y[i];
1212  }
1213 
1214  return result;
1215 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
m_parser QUESO::scanInputFile ( )
template<class T >
double QUESO::SubF1F2Gaussian2dKdeIntegral ( const ScalarSequence< T > &  scalarSeq1,
const ScalarSequence< T > &  scalarSeq2,
unsigned int  initialPos,
double  scaleValue1,
double  scaleValue2,
const Base1D1DFunction &  func1,
const Base1D1DFunction &  func2,
unsigned int  quadratureOrder 
)

Calculates the integral of a 2D Gaussian KDE.

This function performs numerical integration (via Hermite-Gauss quadrature, see GaussianHermite1DQuadrature), of a bi-variate Gaussian KDE (refer to ScalarSequence::subGaussian1dKde(), ArrayOfSequences::gaussianKDE(), or SequenceOfVectors::subGaussian1dKde().

Definition at line 875 of file 1D1DFunction.C.

References queso_require_equal_to_msg, QUESO::ScalarSequence< T >::subSequenceSize(), and QUESO::Base1D1DFunction::value().

883 {
884  double resultValue = 0.;
885 
886  queso_require_equal_to_msg(initialPos, 0, "not implemented yet for initialPos != 0");
887  queso_require_equal_to_msg(scalarSeq1.subSequenceSize(), scalarSeq2.subSequenceSize(), "different sizes");
888 
889  GaussianHermite1DQuadrature quadObj(0.,1.,quadratureOrder);
890  const std::vector<double>& quadPositions = quadObj.positions();
891  const std::vector<double>& quadWeights = quadObj.weights ();
892  queso_require_equal_to_msg(quadPositions.size(), quadWeights.size(), "quadObj has invalid state");
893 
894  unsigned int numQuadraturePositions = quadPositions.size();
895  unsigned int dataSize = scalarSeq1.subSequenceSize();
896  for (unsigned int k = 0; k < dataSize; ++k) {
897  double value1 = 0.;
898  double value2 = 0.;
899  double x1k = scalarSeq1[k];
900  double x2k = scalarSeq2[k];
901  for (unsigned int j = 0; j < numQuadraturePositions; ++j) {
902  value1 += func1.value(scaleValue1*quadPositions[j]+x1k)*quadWeights[j];
903  value2 += func2.value(scaleValue2*quadPositions[j]+x2k)*quadWeights[j];
904  }
905  resultValue += value1*value2;
906  }
907  resultValue *= 1./(2.*M_PI)/((double) dataSize);
908 
909  return resultValue;
910 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
void QUESO::whiteningANN_X_Y ( ANNpointArray  dataX1,
ANNpointArray  dataX2,
unsigned int  dimX,
unsigned int  N1,
unsigned int  N2 
)

Not defined anywhere!

Variable Documentation

template<typename T >
DistArray<T>::DistArray (const Map& inputMap, const int inputRowSize) QUESO::for(int i=0;i< m_Map.NumGlobalElements();++i)

Definition at line 53 of file DistArray.C.

53  {
54  m_elements[i].resize(m_rowSize);
55  }
QUESO::if
Initial value:
=
new SequenceStatisticalOptions(m_env,m_prefix + "qseq_",m_ov.m_alternativeQSsOptionsValues)
A templated class that stores statistical options (optionally read from an input file) ...

Definition at line 104 of file MonteCarloSGOptions.C.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::delayedRejection(), and QUESO::MetropolisHastingsSG< P_V, P_M >::generateFullChain().

115  :
116  m_prefix ((std::string)(prefix) + "mc_"),
117  m_help (UQ_MOC_SG_HELP),
118  m_dataOutputFileName (UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV ),
119  //m_dataOutputAllowedSet (),
120  m_pseqDataOutputPeriod (UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV ),
121  m_pseqDataOutputFileName (UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV),
122  m_pseqDataOutputFileType (UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV),
123  //m_pseqDataOutputAllowedSet (),
124 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
125  m_pseqComputeStats (UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV ),
126 #endif
127  m_qseqDataInputFileName (UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV ),
128  m_qseqDataInputFileType (UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV ),
129  m_qseqSize (UQ_MOC_SG_QSEQ_SIZE_ODV ),
130  m_qseqDisplayPeriod (UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV ),
131  m_qseqMeasureRunTimes (UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV ),
132  m_qseqDataOutputPeriod (UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV ),
133  m_qseqDataOutputFileName (UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV),
134  m_qseqDataOutputFileType (UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV),
135  //m_qseqDataOutputAllowedSet (),
136 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
137  m_qseqComputeStats (UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV ),
138  m_alternativePSsOptionsValues(),
139  m_alternativeQSsOptionsValues(),
140 #endif
141 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
142  m_parser(new BoostInputOptionsParser(env->optionsInputFileName())),
143 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
144  m_option_help (m_prefix + "help" ),
145  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
146  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
147  m_option_pseq_dataOutputPeriod (m_prefix + "pseq_dataOutputPeriod" ),
148  m_option_pseq_dataOutputFileName (m_prefix + "pseq_dataOutputFileName" ),
149  m_option_pseq_dataOutputFileType (m_prefix + "pseq_dataOutputFileType" ),
150  m_option_pseq_dataOutputAllowedSet(m_prefix + "pseq_dataOutputAllowedSet" ),
151 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
152  m_option_pseq_computeStats (m_prefix + "pseq_computeStats" ),
153 #endif
154  m_option_qseq_dataInputFileName (m_prefix + "qseq_dataInputFileName" ),
155  m_option_qseq_dataInputFileType (m_prefix + "qseq_dataInputFileType" ),
156  m_option_qseq_size (m_prefix + "qseq_size" ),
157  m_option_qseq_displayPeriod (m_prefix + "qseq_displayPeriod" ),
158  m_option_qseq_measureRunTimes (m_prefix + "qseq_measureRunTimes" ),
159  m_option_qseq_dataOutputPeriod (m_prefix + "qseq_dataOutputPeriod" ),
160  m_option_qseq_dataOutputFileName (m_prefix + "qseq_dataOutputFileName" ),
161  m_option_qseq_dataOutputFileType (m_prefix + "qseq_dataOutputFileType" ),
162  m_option_qseq_dataOutputAllowedSet(m_prefix + "qseq_dataOutputAllowedSet" )
163 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
164  ,
165  m_option_qseq_computeStats (m_prefix + "qseq_computeStats" )
166 #endif
167 {
168 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
169  if (alternativePSsOptionsValues) m_alternativePSsOptionsValues = *alternativePSsOptionsValues;
170  if (alternativeQSsOptionsValues) m_alternativeQSsOptionsValues = *alternativeQSsOptionsValues;
171 #endif
172 
173 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
174  m_parser->registerOption<std::string >(m_option_help, UQ_MOC_SG_HELP , "produce help message for Monte Carlo distribution calculator");
175  m_parser->registerOption<std::string >(m_option_dataOutputFileName, UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV , "name of generic data output file" );
176  m_parser->registerOption<std::string >(m_option_dataOutputAllowedSet, UQ_MOC_SG_DATA_OUTPUT_ALLOWED_SET_ODV , "subEnvs that will write to generic data output file" );
177  m_parser->registerOption<unsigned int>(m_option_pseq_dataOutputPeriod, UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV , "period of message display during param sequence generation" );
178  m_parser->registerOption<std::string >(m_option_pseq_dataOutputFileName, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV , "name of data output file for parameters" );
179  m_parser->registerOption<std::string >(m_option_pseq_dataOutputFileType, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV , "type of data output file for parameters" );
180  m_parser->registerOption<std::string >(m_option_pseq_dataOutputAllowedSet, UQ_MOC_SG_PSEQ_DATA_OUTPUT_ALLOWED_SET_ODV, "subEnvs that will write to data output file for parameters" );
181 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
182  m_parser->registerOption<bool >(m_option_pseq_computeStats, UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV , "compute statistics on sequence of parameter" );
183 #endif
184  m_parser->registerOption<std::string >(m_option_qseq_dataInputFileName, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV , "name of data input file for qois" );
185  m_parser->registerOption<std::string >(m_option_qseq_dataInputFileType, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV , "type of data input file for qois" );
186  m_parser->registerOption<unsigned int>(m_option_qseq_size, UQ_MOC_SG_QSEQ_SIZE_ODV , "size of qoi sequence" );
187  m_parser->registerOption<unsigned int>(m_option_qseq_displayPeriod, UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV , "period of message display during qoi sequence generation" );
188  m_parser->registerOption<bool >(m_option_qseq_measureRunTimes, UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV , "measure run times" );
189  m_parser->registerOption<unsigned int>(m_option_qseq_dataOutputPeriod, UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV , "period of message display during qoi sequence generation" );
190  m_parser->registerOption<std::string >(m_option_qseq_dataOutputFileName, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV , "name of data output file for qois" );
191  m_parser->registerOption<std::string >(m_option_qseq_dataOutputFileType, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV , "type of data output file for qois" );
192  m_parser->registerOption<std::string >(m_option_qseq_dataOutputAllowedSet, UQ_MOC_SG_QSEQ_DATA_OUTPUT_ALLOWED_SET_ODV, "subEnvs that will write to data output file for qois" );
193 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
194  m_parser->registerOption<bool >(m_option_qseq_computeStats, UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV , "compute statistics on sequence of qoi" );
195 #endif
196 
197  m_parser->scanInputFile();
198 
199  m_parser->getOption<std::string >(m_option_help, m_help);
200  m_parser->getOption<std::string >(m_option_dataOutputFileName, m_dataOutputFileName);
201  m_parser->getOption<std::set<unsigned int> >(m_option_dataOutputAllowedSet, m_dataOutputAllowedSet);
202  m_parser->getOption<unsigned int>(m_option_pseq_dataOutputPeriod, m_pseqDataOutputPeriod);
203  m_parser->getOption<std::string >(m_option_pseq_dataOutputFileName, m_pseqDataOutputFileName);
204  m_parser->getOption<std::string >(m_option_pseq_dataOutputFileType, m_pseqDataOutputFileType);
205  m_parser->getOption<std::set<unsigned int> >(m_option_pseq_dataOutputAllowedSet, m_pseqDataOutputAllowedSet);
206 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
207  m_parser->getOption<bool >(m_option_pseq_computeStats, m_pseq_computeStats);
208 #endif
209  m_parser->getOption<std::string >(m_option_qseq_dataInputFileName, m_qseqDataInputFileName);
210  m_parser->getOption<std::string >(m_option_qseq_dataInputFileType, m_qseqDataInputFileType);
211  m_parser->getOption<unsigned int>(m_option_qseq_size, m_qseqSize);
212  m_parser->getOption<unsigned int>(m_option_qseq_displayPeriod, m_qseqDisplayPeriod);
213  m_parser->getOption<bool >(m_option_qseq_measureRunTimes, m_qseqMeasureRunTimes);
214  m_parser->getOption<unsigned int>(m_option_qseq_dataOutputPeriod, m_qseqDataOutputPeriod);
215  m_parser->getOption<std::string >(m_option_qseq_dataOutputFileName, m_qseqDataOutputFileName);
216  m_parser->getOption<std::string >(m_option_qseq_dataOutputFileType, m_qseqDataOutputFileType);
217  m_parser->getOption<std::set<unsigned int> >(m_option_qseq_dataOutputAllowedSet, m_qseqDataOutputAllowedSet);
218 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
219  m_parser->getOption<bool >(m_option_qseq_computeStats, m_qseq_computeStats);
220 #endif
221 #else
222  m_help = env->input()(m_option_help, UQ_MOC_SG_HELP);
223  m_dataOutputFileName = env->input()(m_option_dataOutputFileName, UQ_MOC_SG_DATA_OUTPUT_FILE_NAME_ODV);
224 
225  // UQ_MOC_SG_DATA_OUTPUT_ALLOWED_SET_ODV is the empty set (string) by default
226  unsigned int size = env->input().vector_variable_size(m_option_dataOutputAllowedSet);
227  for (unsigned int i = 0; i < size; i++) {
228  // We default to empty set, so the default values are actually never
229  // used here
230  unsigned int allowed = env->input()(m_option_dataOutputAllowedSet, i, i);
231  m_dataOutputAllowedSet.insert(allowed);
232  }
233 
234  m_pseqDataOutputPeriod = env->input()(m_option_pseq_dataOutputPeriod, UQ_MOC_SG_PSEQ_DATA_OUTPUT_PERIOD_ODV);
235  m_pseqDataOutputFileName = env->input()(m_option_pseq_dataOutputFileName, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_NAME_ODV);
236  m_pseqDataOutputFileType = env->input()(m_option_pseq_dataOutputFileType, UQ_MOC_SG_PSEQ_DATA_OUTPUT_FILE_TYPE_ODV);
237 
238  // UQ_MOC_SG_PSEQ_DATA_OUTPUT_ALLOWED_SET_ODV is the empty set (string) by default
239  size = env->input().vector_variable_size(m_option_pseq_dataOutputAllowedSet);
240  for (unsigned int i = 0; i < size; i++) {
241  // We default to empty set, so the default values are actually never
242  // used here
243  unsigned int allowed = env->input()(m_option_pseq_dataOutputAllowedSet, i, i);
244  m_pseqDataOutputAllowedSet.insert(allowed);
245  }
246 
247 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
248  m_pseq_computeStats = env->input()(m_option_pseq_computeStats, UQ_MOC_SG_PSEQ_COMPUTE_STATS_ODV);
249 #endif
250  m_qseqDataInputFileName = env->input()(m_option_qseq_dataInputFileName, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_NAME_ODV);
251  m_qseqDataInputFileType = env->input()(m_option_qseq_dataInputFileType, UQ_MOC_SG_QSEQ_DATA_INPUT_FILE_TYPE_ODV);
252  m_qseqSize = env->input()(m_option_qseq_size, UQ_MOC_SG_QSEQ_SIZE_ODV);
253  m_qseqDisplayPeriod = env->input()(m_option_qseq_displayPeriod, UQ_MOC_SG_QSEQ_DISPLAY_PERIOD_ODV);
254  m_qseqMeasureRunTimes = env->input()(m_option_qseq_measureRunTimes, UQ_MOC_SG_QSEQ_MEASURE_RUN_TIMES_ODV);
255  m_qseqDataOutputPeriod = env->input()(m_option_qseq_dataOutputPeriod, UQ_MOC_SG_QSEQ_DATA_OUTPUT_PERIOD_ODV);
256  m_qseqDataOutputFileName = env->input()(m_option_qseq_dataOutputFileName, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_NAME_ODV);
257  m_qseqDataOutputFileType = env->input()(m_option_qseq_dataOutputFileType, UQ_MOC_SG_QSEQ_DATA_OUTPUT_FILE_TYPE_ODV);
258 
259  // UQ_MOC_SG_QSEQ_DATA_OUTPUT_ALLOWED_SET_ODV is the empty set (string) by default
260  size = env->input().vector_variable_size(m_option_qseq_dataOutputAllowedSet);
261  for (unsigned int i = 0; i < size; i++) {
262  // We default to empty set, so the default values are actually never
263  // used here
264  unsigned int allowed = env->input()(m_option_qseq_dataOutputAllowedSet, i, i);
265  m_qseqDataOutputAllowedSet.insert(allowed);
266  }
267 
268 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
269  m_qseq_computeStats = env->input()(m_option_qseq_computeStats, UQ_MOC_SG_QSEQ_COMPUTE_STATS_ODV);
270 #endif
271 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
272 }
QUESO::m_computeCorrelations = env->input()(m_option_computeCorrelations, UQ_SFP_COMPUTE_CORRELATIONS_ODV)

Definition at line 118 of file StatisticalForwardProblemOptions.C.

QUESO::m_computeCovariances = env->input()(m_option_computeCovariances, UQ_SFP_COMPUTE_COVARIANCES_ODV)

Definition at line 117 of file StatisticalForwardProblemOptions.C.

QUESO::m_computeSolution = env->input()(m_option_computeSolution, UQ_SFP_COMPUTE_SOLUTION_ODV)

Definition at line 116 of file StatisticalForwardProblemOptions.C.

QUESO::m_dataOutputFileName = env->input()(m_option_dataOutputFileName, UQ_SFP_DATA_OUTPUT_FILE_NAME_ODV)

Definition at line 119 of file StatisticalForwardProblemOptions.C.

Referenced by QUESO::McOptionsValues::copy().

QUESO::m_help = env->input()(m_option_help, UQ_SFP_HELP)

Definition at line 115 of file StatisticalForwardProblemOptions.C.

QUESO::m_solver = env->input()(m_option_solver, UQ_SFP_SOLVER_ODV)
std::terminate_handler QUESO::old_terminate_handler

Definition at line 139 of file Environment.C.

Referenced by QUESO::FullEnvironment::construct(), and queso_terminate_handler().

StatisticalForwardProblemOptions::StatisticalForwardProblemOptions ( const BaseEnvironment& env, const char* prefix, const SfpOptionsValues& alternativeOptionsValues QUESO::queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))

Definition at line 460 of file MonteCarloSGOptions.C.

Referenced by QUESO::UniformJointPdf< V, M >::actualValue(), QUESO::BetaJointPdf< V, M >::actualValue(), QUESO::WignerJointPdf< V, M >::actualValue(), QUESO::InverseGammaJointPdf< V, M >::actualValue(), QUESO::BayesianJointPdf< V, M >::actualValue(), QUESO::PoweredJointPdf< V, M >::actualValue(), QUESO::LogNormalJointPdf< V, M >::actualValue(), QUESO::GaussianJointPdf< V, M >::actualValue(), QUESO::ConcatenatedJointPdf< V, M >::actualValue(), QUESO::GammaJointPdf< V, M >::actualValue(), QUESO::MetropolisHastingsSG< P_V, P_M >::adapt(), QUESO::MpiComm::Allreduce(), QUESO::MetropolisHastingsSG< P_V, P_M >::alpha(), QUESO::TeuchosVector::atLeastOneComponentBiggerOrEqualThan(), QUESO::GslVector::atLeastOneComponentBiggerOrEqualThan(), QUESO::TeuchosVector::atLeastOneComponentBiggerThan(), QUESO::GslVector::atLeastOneComponentBiggerThan(), QUESO::TeuchosVector::atLeastOneComponentSmallerOrEqualThan(), QUESO::GslVector::atLeastOneComponentSmallerOrEqualThan(), QUESO::TeuchosVector::atLeastOneComponentSmallerThan(), QUESO::GslVector::atLeastOneComponentSmallerThan(), QUESO::MpiComm::Barrier(), QUESO::MpiComm::Bcast(), QUESO::BoxSubset< V, M >::BoxSubset(), QUESO::VectorFunctionSynchronizer< P_V, P_M, Q_V, Q_M >::callFunction(), QUESO::ConcatenationSubset< V, M >::centroid(), QUESO::InfiniteDimensionalMCMCSamplerOptions::checkOptions(), QUESO::MhOptionsValues::checkOptions(), QUESO::MLSampling< P_V, P_M >::checkpointML(), QUESO::HessianCovMatricesTKGroup< V, M >::clearPreComputingPositions(), ComputeConditionalGaussianVectorRV(), ComputeSubGaussian2dKde(), QUESO::ConcatenatedJointPdf< V, M >::ConcatenatedJointPdf(), QUESO::FullEnvironment::construct(), QUESO::ConcatenationSubset< V, M >::contains(), QUESO::BaseVectorSequence< V, M >::copy(), QUESO::TeuchosVector::copy_from_std_vector(), QUESO::GenericMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::covMatrix(), QUESO::ExponentialMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::covMatrix(), QUESO::GslVector::cwSetBeta(), QUESO::TeuchosVector::cwSetBeta(), QUESO::GslVector::cwSetConcatenated(), QUESO::TeuchosVector::cwSetConcatenated(), QUESO::GslVector::cwSetGamma(), QUESO::TeuchosVector::cwSetGamma(), QUESO::GslVector::cwSetInverseGamma(), QUESO::TeuchosVector::cwSetInverseGamma(), QUESO::MLSampling< P_V, P_M >::decideOnBalancedChains_all(), QUESO::MetropolisHastingsSG< P_V, P_M >::delayedRejection(), QUESO::TeuchosMatrix::eigen(), QUESO::GslMatrix::eigen(), QUESO::EnvironmentOptions::EnvironmentOptions(), QUESO::SequenceOfVectors< V, M >::erasePositions(), QUESO::ScalarSequence< T >::erasePositions(), QUESO::ExponentialMatrixCovarianceFunction< P_V, P_M, Q_V, Q_M >::ExponentialMatrixCovarianceFunction(), QUESO::TeuchosMatrix::fillWithBlocksDiagonally(), QUESO::GslMatrix::fillWithBlocksDiagonally(), QUESO::TeuchosMatrix::fillWithBlocksHorizontally(), QUESO::GslMatrix::fillWithBlocksHorizontally(), QUESO::TeuchosMatrix::fillWithBlocksVertically(), QUESO::GslMatrix::fillWithBlocksVertically(), QUESO::TeuchosMatrix::fillWithTensorProduct(), QUESO::GslMatrix::fillWithTensorProduct(), QUESO::TeuchosMatrix::fillWithTranspose(), QUESO::GslMatrix::fillWithTranspose(), QUESO::FiniteDistribution::FiniteDistribution(), QUESO::MpiComm::Gather(), QUESO::MpiComm::Gatherv(), QUESO::MetropolisHastingsSG< P_V, P_M >::generateFullChain(), QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::generateSequence(), QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::MLSampling< P_V, P_M >::generateSequence_Level0_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step02_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step05_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step09_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step11_inter0(), QUESO::Generic1DQuadrature::Generic1DQuadrature(), QUESO::GslMatrix::getColumn(), QUESO::TeuchosMatrix::getColumn(), QUESO::EnvironmentOptions::getMyOptionValues(), QUESO::GslMatrix::getRow(), QUESO::TeuchosMatrix::getRow(), QUESO::SampledScalarCdf< T >::getSupport(), QUESO::ScalarSequence< T >::getUnifiedContentsAtProc0Only(), QUESO::GslVector::GslVector(), QUESO::ArrayOfSequences< V, M >::histogram(), QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::internGenerateSequence(), QUESO::TeuchosMatrix::inverse(), QUESO::GslMatrix::inverse(), QUESO::TeuchosMatrix::invertMultiply(), QUESO::GslMatrix::invertMultiply(), QUESO::TeuchosMatrix::invertMultiplyForceLU(), QUESO::GslMatrix::invertMultiplyForceLU(), QUESO::MLSampling< P_V, P_M >::justBalance_proc0(), QUESO::LagrangePolynomial1D1DFunction::LagrangePolynomial1D1DFunction(), leftDiagScaling(), QUESO::GslVector::matlabDiff(), QUESO::TeuchosVector::matlabDiff(), QUESO::GslVector::matlabLinearInterpExtrap(), QUESO::TeuchosVector::matlabLinearInterpExtrap(), QUESO::TeuchosMatrix::matlabLinearInterpExtrap(), QUESO::GslMatrix::matlabLinearInterpExtrap(), QUESO::MetropolisHastingsSG< P_V, P_M >::MetropolisHastingsSG(), QUESO::MetropolisHastingsSGOptions::MetropolisHastingsSGOptions(), MiscCheckTheParallelEnvironment(), QUESO::ConcatenationSubset< V, M >::moments(), QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::MonteCarloSG(), QUESO::GslVector::mpiAllQuantile(), QUESO::TeuchosVector::mpiAllQuantile(), QUESO::GslVector::mpiAllReduce(), QUESO::TeuchosVector::mpiAllReduce(), QUESO::GslVector::mpiBcast(), QUESO::TeuchosVector::mpiBcast(), QUESO::MpiComm::MpiComm(), QUESO::MLSampling< P_V, P_M >::mpiExchangePositions_inter0(), QUESO::TeuchosMatrix::mpiSum(), QUESO::TeuchosMatrix::multiply(), QUESO::GslMatrix::multiply(), operator*(), QUESO::GslVector::operator*=(), QUESO::TeuchosVector::operator*=(), QUESO::TeuchosVector::operator+=(), QUESO::TeuchosVector::operator-=(), QUESO::GslVector::operator/=(), QUESO::TeuchosVector::operator/=(), QUESO::GslVector::operator=(), QUESO::TeuchosVector::operator=(), operator==(), QUESO::PiecewiseLinear1D1DFunction::PiecewiseLinear1D1DFunction(), QUESO::MLSampling< P_V, P_M >::prepareBalLinkedChains_inter0(), QUESO::MLSampling< P_V, P_M >::prepareUnbLinkedChains_inter0(), QUESO::AsciiTable< V, M >::readColumnsFromFile(), QUESO::MpiComm::Recv(), QUESO::MLSampling< P_V, P_M >::restartML(), rightDiagScaling(), QUESO::ScalarGaussianRandomField< V, M >::sampleFunction(), QUESO::VectorGaussianRandomField< P_V, P_M, Q_V, Q_M >::sampleFunction(), scalarProduct(), QUESO::MpiComm::Send(), SequenceStatisticalOptions::SequenceStatisticalOptions(), QUESO::TeuchosMatrix::setColumn(), QUESO::GslMatrix::setColumn(), QUESO::SequenceOfVectors< V, M >::setPositionValues(), QUESO::HessianCovMatricesTKGroup< V, M >::setPreComputingPosition(), QUESO::TeuchosMatrix::setRow(), QUESO::GslMatrix::setRow(), QUESO::ScaledCovMatrixTKGroup< V, M >::setRVsWithZeroMean(), QUESO::TransformedScaledCovMatrixTKGroup< V, M >::setRVsWithZeroMean(), QUESO::GslVector::sizeGlobal(), QUESO::TeuchosVector::sizeGlobal(), QUESO::GslVector::sizeLocal(), QUESO::TeuchosVector::sizeLocal(), QUESO::MLSampling< P_V, P_M >::solveBIP_proc0(), QUESO::StatisticalInverseProblem< P_V, P_M >::solveWithBayesMetropolisHastings(), QUESO::StatisticalForwardProblem< P_V, P_M, Q_V, Q_M >::StatisticalForwardProblem(), QUESO::StatisticalInverseProblem< P_V, P_M >::StatisticalInverseProblem(), QUESO::StatisticalInverseProblemOptions::StatisticalInverseProblemOptions(), SubF1F2Gaussian2dKdeIntegral(), QUESO::ScalarSequence< T >::subHistogram(), QUESO::ScalarSequence< T >::subInterQuantileRange(), QUESO::BaseVectorSequence< V, M >::subPositionsOfMaximum(), QUESO::ScalarSequence< T >::subPositionsOfMaximum(), QUESO::GslVector::subReadContents(), QUESO::TeuchosVector::subReadContents(), QUESO::TeuchosMatrix::subReadContents(), QUESO::GslMatrix::subReadContents(), QUESO::TeuchosMatrix::svd(), QUESO::GslMatrix::svd(), QUESO::TeuchosMatrix::svdSolve(), QUESO::GslMatrix::svdSolve(), QUESO::TensorProductQuadrature< V, M >::TensorProductQuadrature(), QUESO::TeuchosVector::TeuchosVector(), QUESO::TeuchosMatrix::transpose(), QUESO::ScalarSequence< T >::unifiedHistogram(), QUESO::ScalarSequence< T >::unifiedInterQuantileRange(), QUESO::BaseVectorSequence< V, M >::unifiedPositionsOfMaximum(), QUESO::ScalarSequence< T >::unifiedPositionsOfMaximum(), QUESO::SequenceOfVectors< V, M >::unifiedReadContents(), QUESO::ScalarSequence< T >::unifiedReadContents(), QUESO::ScalarSequence< T >::unifiedSort(), QUESO::VectorSpace< V, M >::VectorSpace(), QUESO::TeuchosMatrix::zeroLower(), QUESO::GslMatrix::zeroLower(), QUESO::TeuchosMatrix::zeroUpper(), and QUESO::GslMatrix::zeroUpper().

StatisticalForwardProblemOptions::StatisticalForwardProblemOptions ( const BaseEnvironment& env, const char* prefix QUESO::queso_require_not_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
unsigned int QUESO::size = env->input().vector_variable_size(m_option_dataOutputAllowedSet)

Definition at line 122 of file StatisticalForwardProblemOptions.C.

Referenced by QUESO::TeuchosVector::abs(), QUESO::GslVector::abs(), QUESO::TeuchosVector::atLeastOneComponentBiggerOrEqualThan(), QUESO::GslVector::atLeastOneComponentBiggerOrEqualThan(), QUESO::TeuchosVector::atLeastOneComponentBiggerThan(), QUESO::GslVector::atLeastOneComponentBiggerThan(), QUESO::TeuchosVector::atLeastOneComponentSmallerOrEqualThan(), QUESO::GslVector::atLeastOneComponentSmallerOrEqualThan(), QUESO::TeuchosVector::atLeastOneComponentSmallerThan(), QUESO::GslVector::atLeastOneComponentSmallerThan(), QUESO::BaseScalarFunction< V, M >::BaseScalarFunction(), QUESO::MLSamplingLevelOptions::checkOptions(), QUESO::ConcatenatedJointPdf< V, M >::ConcatenatedJointPdf(), QUESO::TeuchosVector::copy_to_std_vector(), QUESO::GslVector::cwInvert(), QUESO::TeuchosVector::cwInvert(), QUESO::GslVector::cwSet(), QUESO::GslVector::cwSqrt(), QUESO::TeuchosVector::cwSqrt(), QUESO::EnvOptionsValues::EnvOptionsValues(), QUESO::GPMSAFactory< V, M >::experimentOutput(), QUESO::GPMSAFactory< V, M >::experimentScenario(), QUESO::MLSamplingLevelOptions::getAllOptions(), QUESO::TeuchosVector::getMaxValue(), QUESO::TeuchosVector::getMaxValueAndIndex(), QUESO::TeuchosVector::getMaxValueIndex(), QUESO::TeuchosVector::getMinValue(), QUESO::TeuchosVector::getMinValueAndIndex(), QUESO::TeuchosVector::getMinValueIndex(), QUESO::MLSampling< P_V, P_M >::justBalance_proc0(), lookUp(), QUESO::GslVector::matlabDiff(), QUESO::TeuchosVector::matlabDiff(), QUESO::GslOptimizer::minimize_no_gradient(), QUESO::MLSamplingOptions::MLSamplingOptions(), QUESO::GslVector::mpiAllQuantile(), QUESO::TeuchosVector::mpiAllQuantile(), QUESO::GslVector::mpiAllReduce(), QUESO::TeuchosVector::mpiAllReduce(), QUESO::TeuchosMatrix::mpiSum(), QUESO::GslMatrix::mpiSum(), QUESO::GslVector::norm1(), QUESO::TeuchosVector::norm1(), QUESO::GslVector::normInf(), QUESO::TeuchosVector::normInf(), QUESO::OptimizerMonitor::print(), QUESO::BaseOneDGrid< T >::print(), QUESO::GslVector::print(), QUESO::TeuchosVector::print(), QUESO::OptimizerMonitor::print_header(), QUESO::BaseScalarFunction< V, M >::setFiniteDifferenceStepSize(), QUESO::SipOptionsValues::SipOptionsValues(), QUESO::GslVector::sumOfComponents(), and QUESO::TeuchosVector::sumOfComponents().

const int QUESO::UQ_FAILED_READING_FILE_RC = -9

Definition at line 101 of file Defines.h.

Referenced by MiscReadCharsAndDoubleFromFile(), and MiscReadStringAndDoubleFromFile().

const int QUESO::UQ_FAILED_TO_OPEN_FILE_RC = -7

Definition at line 99 of file Defines.h.

const int QUESO::UQ_INCOMPLETE_IMPLEMENTATION_RC = -1

Definition at line 93 of file Defines.h.

Referenced by QUESO::MetropolisHastingsSG< P_V, P_M >::adapt().

const int QUESO::UQ_INVALID_INTERNAL_RESULT_RC = -5

Definition at line 97 of file Defines.h.

const int QUESO::UQ_INVALID_INTERNAL_STATE_RC = -6

Definition at line 98 of file Defines.h.

const int QUESO::UQ_INVALID_OBSERVABLE_SPEC_RC = -3

Definition at line 95 of file Defines.h.

const int QUESO::UQ_INVALID_PARAMETER_SPEC_RC = -2

Definition at line 94 of file Defines.h.

const int QUESO::UQ_INVALID_QOI_SPEC_RC = -4

Definition at line 96 of file Defines.h.

const int QUESO::UQ_INVALID_SPACE_COMPONENT_ID_RC = -10

Definition at line 102 of file Defines.h.

const int QUESO::UQ_MATRIX_IS_NOT_POS_DEFINITE_RC = -8
const int QUESO::UQ_MATRIX_SVD_FAILED_RC = -11

Definition at line 103 of file Defines.h.

Referenced by QUESO::GslMatrix::internalSvd().

const int QUESO::UQ_OK_RC = 0

Definition at line 92 of file Defines.h.

Referenced by QUESO::MonteCarloSG< P_V, P_M, Q_V, Q_M >::actualGenerateSequence(), QUESO::MetropolisHastingsSG< P_V, P_M >::adapt(), QUESO::BaseVectorSequence< V, M >::computeAutoCorrViaDef(), QUESO::BaseVectorSequence< V, M >::computeAutoCorrViaFFT(), QUESO::BaseVectorSequence< V, M >::computeBMM(), QUESO::BaseVectorSequence< V, M >::computeFFT(), QUESO::BaseVectorSequence< V, M >::computeGeweke(), QUESO::BaseVectorSequence< V, M >::computeHistCdfstaccKde(), QUESO::BaseVectorSequence< V, M >::computeMeanEvolution(), QUESO::BaseVectorSequence< V, M >::computeMeanStacc(), QUESO::BaseVectorSequence< V, M >::computeMeanVars(), QUESO::BaseVectorSequence< V, M >::computePSD(), QUESO::BaseVectorSequence< V, M >::computePSDAtZero(), QUESO::BaseVectorSequence< V, M >::computeStatistics(), QUESO::MetropolisHastingsSG< P_V, P_M >::delayedRejection(), QUESO::MetropolisHastingsSG< P_V, P_M >::generateFullChain(), QUESO::MLSampling< P_V, P_M >::generateSequence(), QUESO::MetropolisHastingsSG< P_V, P_M >::generateSequence(), QUESO::MLSampling< P_V, P_M >::generateSequence_Level0_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step01_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step02_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step03_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step04_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step05_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step06_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step07_inter0(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step08_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step09_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step10_all(), QUESO::MLSampling< P_V, P_M >::generateSequence_Step11_inter0(), QUESO::MLSampling< P_V, P_M >::justBalance_proc0(), MiscReadCharsAndDoubleFromFile(), MiscReadStringAndDoubleFromFile(), QUESO::MLSampling< P_V, P_M >::solveBIP_proc0(), QUESO::SequenceOfVectors< V, M >::unifiedReadContents(), QUESO::ScalarSequence< T >::unifiedReadContents(), QUESO::SequenceOfVectors< V, M >::unifiedWriteContents(), QUESO::ScalarSequence< T >::unifiedWriteContents(), and QUESO::MetropolisHastingsSG< P_V, P_M >::writeInfo().

const int QUESO::UQ_UNAVAILABLE_RANK = -1

Definition at line 90 of file Defines.h.


Generated on Tue Jun 5 2018 19:48:58 for queso-0.57.1 by  doxygen 1.8.5