queso-0.56.0
TransitionKernelFactory.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #include <queso/GslVector.h>
26 #include <queso/GslMatrix.h>
27 #include <queso/TransitionKernelFactory.h>
28 #include <queso/ScaledCovMatrixTKGroup.h>
29 #include <queso/TransformedScaledCovMatrixTKGroup.h>
30 #include <queso/HessianCovMatricesTKGroup.h>
31 
32 namespace QUESO
33 {
34 
35 template <>
36 std::map<std::string, Factory<BaseTKGroup<GslVector, GslMatrix> > *> &
38 {
39  static std::map<std::string, Factory<BaseTKGroup<GslVector, GslMatrix> > *> _factory_map;
40 
41  return _factory_map;
42 }
43 
44 // SharedPtr<BaseTKGroup<GslVector, GslMatrix> >::Type
45 // TransitionKernelFactory::build_tk(
46 // const MhOptionsValues & options,
47 // const VectorSpace<GslVector, GslMatrix> & v,
48 // const std::vector<double> & dr_scales,
49 // const ScalarFunctionSynchronizer<GslVector, GslMatrix> & pdf_synchronizer,
50 // GslMatrix & initial_cov_matrix,
51 // const BaseJointPdf<GslVector, GslMatrix> & target_pdf)
52 // {
53 // SharedPtr<BaseTKGroup<GslVector, GslMatrix> >::Type new_tk;
54 //
55 // if (options.m_tkUseLocalHessian) {
56 // new_tk.reset(new HessianCovMatricesTKGroup<GslVector,GslMatrix>(
57 // options.m_prefix.c_str(),
58 // v,
59 // dr_scales,
60 // pdf_synchronizer));
61 // }
62 // else {
63 // if (options.m_initialProposalCovMatrixDataInputFileName != ".") {
64 // std::set<unsigned int> tmpSet;
65 // tmpSet.insert(v.env().subId());
66 // initial_cov_matrix.subReadContents((options.m_initialProposalCovMatrixDataInputFileName+"_sub"+v.env().subIdString()),
67 // options.m_initialProposalCovMatrixDataInputFileType,
68 // tmpSet);
69 // }
70 //
71 // // Decide whether or not to do logit transform
72 // if (options.m_doLogitTransform) {
73 // // Variable transform of initial proposal cov matrix has already been
74 // // done
75 //
76 // // We need this dynamic_cast to BoxSubset so that m_tk can inspect the
77 // // domain bounds and do the necessary transform
78 // new_tk.reset(new TransformedScaledCovMatrixTKGroup<GslVector, GslMatrix>(
79 // options.m_prefix.c_str(),
80 // dynamic_cast<const BoxSubset<GslVector, GslMatrix> & >(target_pdf.domainSet()),
81 // dr_scales, initial_cov_matrix));
82 // }
83 // else {
84 // new_tk.reset(new ScaledCovMatrixTKGroup<GslVector, GslMatrix>(
85 // options.m_prefix.c_str(), v, dr_scales,
86 // initial_cov_matrix));
87 // }
88 // }
89 //
90 // return new_tk;
91 // }
92 
94 
95 const std::vector<double> * TransitionKernelFactory::m_dr_scales = NULL;
96 
98 
100 
102 
104 
105 } // namespace QUESO
A class representing a vector space.
Definition: VectorSet.h:49
static const ScalarFunctionSynchronizer< GslVector, GslMatrix > * m_pdf_synchronizer
static const MhOptionsValues * m_options
A templated (base) class for handling joint PDFs.
Definition: JointPdf.h:55
static const BaseJointPdf< GslVector, GslMatrix > * m_target_pdf
static const std::vector< double > * m_dr_scales
This class provides options for the Metropolis-Hastings generator of samples if no input file is avai...
static const VectorSpace< GslVector, GslMatrix > * m_vectorSpace
A templated class for synchronizing the calls of scalar functions (BaseScalarFunction and derived cla...
Class for matrix operations using GSL library.
Definition: GslMatrix.h:49

Generated on Tue Nov 29 2016 10:53:10 for queso-0.56.0 by  doxygen 1.8.5