acado_csparse.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
34 #ifndef ACADO_TOOLKIT_ACADO_CSPARSE_HPP
35 #define ACADO_TOOLKIT_ACADO_CSPARSE_HPP
36 
37 
40 
41 
42 
43 
44 // FORWARD DECLARATIONS:
45 // ---------------------
46  struct cs_numeric ;
47  struct cs_symbolic;
48 
49 
50 
52 
53 
66 class ACADOcsparse : public SparseSolver{
67 
68 
69  //
70  // PUBLIC MEMBER FUNCTIONS:
71  //
72  public:
73 
75  ACADOcsparse( );
76 
78  ACADOcsparse( const ACADOcsparse &arg );
79 
81  virtual ~ACADOcsparse( );
82 
84  virtual ACADOcsparse* clone() const;
85 
86 
91  virtual returnValue setDimension( const int &n );
92 
93 
99  virtual returnValue setNumberOfEntries( const int &nDense_ );
100 
101 
102 
106  virtual returnValue setIndices( const int *rowIdx_,
107  const int *colIdx_ );
108 
109 
110 
115  virtual returnValue setMatrix( double *A_ );
116 
117 
118 
124  virtual returnValue solve( double *b );
125 
126 
127 
133  virtual returnValue solveTranspose( double *b );
134 
135 
136 
141  virtual returnValue getX( double *x_ );
142 
143 
144 
155  virtual returnValue setTolerance( double TOL_ );
156 
157 
162  virtual returnValue setPrintLevel( PrintLevel printLevel_ );
163 
164 
165 
166  //
167  // PROTECTED MEMBER FUNCTIONS:
168  //
169  protected:
170 
171 
172 
173  //
174  // DATA MEMBERS:
175  //
176  protected:
177 
178 
179  // DIMENSIONS:
180  // --------------------
181  int dim; // dimension of the matrix A
182  int nDense; // number of non-zero entries in A
183  int *index1, *index2; // and the associated indices
184 
185 
186 
187  // DATA:
188  // --------------------
189  double *x; // The result vector x
190 
191 
192  // AUXILIARY VARIABLES:
193  // --------------------
194  cs_symbolic *S; // pointer to a struct, which contains symbolic information about the matrix
195  cs_numeric *N; // pointer to a struct, which contains numeric information about the matrix
196 
197 
198  double TOL; // The required tolerance. (default 10^(-10))
199  PrintLevel printLevel; // The PrintLevel.
200 };
201 
202 
204 
205 #endif
206 
207 /*
208  * end of file
209  */
210 
PrintLevel printLevel
Allows to pass back messages to the calling function.
virtual returnValue setMatrix(double *A_)
#define CLOSE_NAMESPACE_ACADO
Definition: cs.h:62
virtual returnValue setPrintLevel(PrintLevel printLevel_)
virtual returnValue setIndices(const int *rowIdx_, const int *colIdx_)
virtual ~ACADOcsparse()
virtual ACADOcsparse * clone() const
virtual returnValue setNumberOfEntries(const int &nDense_)
virtual returnValue getX(double *x_)
cs_symbolic * S
PrintLevel
Generic interface for sparse solvers to be coupled with ACADO Toolkit.
virtual returnValue setDimension(const int &n)
#define BEGIN_NAMESPACE_ACADO
virtual returnValue setTolerance(double TOL_)
virtual returnValue solve(double *b)
Definition: cs.h:50
(not yet documented)
cs_numeric * N
virtual returnValue solveTranspose(double *b)


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:27