queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
GslVectorSpace.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-2017 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/VectorSpace.h>
26 #include <queso/GslMatrix.h>
27 
28 namespace QUESO {
29 
30 template <>
31 Map*
33 {
34  return new Map(m_dimGlobal,0,m_env.selfComm());
35 }
36 
37 template<>
38 GslVector*
40 {
41  return new GslVector(m_env,*m_map);
42 }
43 
44 template<>
45 GslVector*
47 {
48  return new GslVector(m_env,*m_map,value);
49 }
50 
51 template<>
52 GslMatrix*
54 {
55  return new GslMatrix(m_env,*m_map,this->dimGlobal());
56 }
57 
58 template<>
59 GslMatrix*
61 {
62  return new GslMatrix(m_env,*m_map,diagValue);
63 }
64 
65 } // End namespace QUESO
A class for partitioning vectors and matrices.
Definition: Map.h:49
M * newMatrix() const
Creates an empty matrix of size given by Map&amp; map. See template specialization.
Class for matrix operations using GSL library.
Definition: GslMatrix.h:49
Map * newMap()
Creates a new map. See template specialization.
V * newVector() const
Creates an empty vector of size given by Map&amp; map. See template specialization.
Class for vector operations using GSL library.
Definition: GslVector.h:49
M * newDiagMatrix(const V &v) const
Creates a diagonal matrix with the elements and size of vector v.
Definition: VectorSpace.C:190

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