queso-0.57.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
GslBlockMatrix.h
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 #ifndef UQ_GSL_BLOCK_MATRIX_H
26 #define UQ_GSL_BLOCK_MATRIX_H
27 
33 #include <vector>
34 #include <queso/Environment.h>
35 #include <queso/Matrix.h>
36 #include <queso/GslVector.h>
37 #include <queso/GslMatrix.h>
38 #include <queso/VectorSpace.h>
39 
40 namespace QUESO {
41 
51 {
52 public:
54 
55 
59  GslBlockMatrix(const std::vector<unsigned int> & blockSizes,
60  const GslVector & v, double diagValue);
61 
65 
67  virtual unsigned int numRowsLocal() const;
68 
70  virtual unsigned int numRowsGlobal() const;
71 
73  virtual unsigned int numCols() const;
74 
76  virtual int chol();
77 
79  virtual void zeroLower(bool includeDiagonal=false);
80 
82  virtual void zeroUpper(bool includeDiagonal=false);
83 
85  GslMatrix & getBlock(unsigned int i) const;
86 
88  unsigned int numBlocks() const;
89 
91 
95  void invertMultiply(const GslVector & b, GslVector & x) const;
96 
98 
99  virtual void print (std::ostream & os) const;
102 
103 private:
104  std::vector<VectorSpace<GslVector, GslMatrix> *> m_vectorSpaces;
105  std::vector<GslMatrix *> m_blocks;
106 };
107 
108 std::ostream & operator<<(std::ostream & os, const GslBlockMatrix & obj);
109 
110 } // End namespace QUESO
111 
112 #endif // UQ_GSL_BLOCK_MATRIX_H
virtual unsigned int numCols() const
Not implemented yet.
void invertMultiply(const GslVector &b, GslVector &x) const
This function calculates the inverse of this matrix, multiplies it with vector b and stores the resul...
virtual unsigned int numRowsGlobal() const
Not implemented yet.
virtual unsigned int numRowsLocal() const
Not implemented yet.
std::ostream & operator<<(std::ostream &os, const SequenceStatisticalOptions &obj)
virtual void print(std::ostream &os) const
Print method. Defines the behavior of operator&lt;&lt; inherited from the Object class. ...
std::vector< VectorSpace< GslVector, GslMatrix > * > m_vectorSpaces
Class for matrix operations using GSL library.
Definition: GslMatrix.h:49
GslBlockMatrix(const std::vector< unsigned int > &blockSizes, const GslVector &v, double diagValue)
Creates a square matrix with size defined by v and diagonal values all equal to diagValue.
virtual void zeroLower(bool includeDiagonal=false)
Not implemented yet.
unsigned int numBlocks() const
Return the number of blocks in the block diagonal matrix.
Class for matrix operations (virtual).
Definition: Matrix.h:46
~GslBlockMatrix()
Destructor.
Class for representing block matrices using GSL library.
GslMatrix & getBlock(unsigned int i) const
Return block i in the block diagonal matrix.
Class for vector operations using GSL library.
Definition: GslVector.h:49
std::vector< GslMatrix * > m_blocks
virtual int chol()
Not implemented yet.
virtual void zeroUpper(bool includeDiagonal=false)
Not implemented yet.

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