queso-0.56.1
AlgorithmFactory.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/AlgorithmFactory.h>
28 
29 namespace QUESO
30 {
31 
32 template <>
33 std::map<std::string, Factory<Algorithm<GslVector, GslMatrix> > *> &
35 {
36  static std::map<std::string, Factory<Algorithm<GslVector, GslMatrix> > *> _factory_map;
37 
38  return _factory_map;
39 }
40 
41 // AlgorithmFactoryImp implementation
42 template <class DerivedAlgorithm>
43 SharedPtr<Algorithm<GslVector, GslMatrix> >::Type
45 {
46  SharedPtr<Algorithm<GslVector, GslMatrix> >::Type new_alg;
47  new_alg.reset(new DerivedAlgorithm(*(this->m_env), *(this->m_tk)));
48  return new_alg;
49 }
50 
53 
54 // Register with the factory
57 
58 } // namespace QUESO
AlgorithmFactoryImp< Algorithm< GslVector, GslMatrix > > random_walk_alg("random_walk")
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:197
static const BaseTKGroup< GslVector, GslMatrix > * m_tk
AlgorithmFactoryImp< Algorithm< GslVector, GslMatrix > > logit_random_walk_alg("logit_random_walk")
This base class allows the representation of a transition kernel.
Definition: Algorithm.h:32
virtual SharedPtr< Algorithm< GslVector, GslMatrix > >::Type build_algorithm()
static const BaseEnvironment * m_env

Generated on Thu Dec 15 2016 13:23:10 for queso-0.56.1 by  doxygen 1.8.5