ShapeOp
 All Classes Files Functions Variables Typedefs Macros Pages
LSSolver.h
Go to the documentation of this file.
1 // This file is part of ShapeOp, a lightweight C++ library
3 // for static and dynamic geometry processing.
4 //
5 // Copyright (C) 2014 Sofien Bouaziz <sofien.bouaziz@gmail.com>
6 // Copyright (C) 2014 LGG EPFL
7 //
8 // This Source Code Form is subject to the terms of the Mozilla
9 // Public License v. 2.0. If a copy of the MPL was not distributed
10 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #ifndef LSSOLVER_H
13 #define LSSOLVER_H
14 #include "Types.h"
17 
19 namespace ShapeOp {
22 
23 class SHAPEOP_API LSSolver {
24  public:
25  virtual ~LSSolver() {};
27  virtual void initialize(const SparseMatrix &A) = 0;
29  virtual VectorX solve(const VectorX &b) const = 0;
30 };
32 
33 class SHAPEOP_API SimplicialLDLTSolver : public LSSolver {
34  public:
35  virtual ~SimplicialLDLTSolver() {};
37  virtual void initialize(const SparseMatrix &A) override final;
39  virtual VectorX solve(const VectorX &b) const override final;
40  private:
41  Eigen::SimplicialLDLT<SparseMatrix> solver_;
42 };
44 } // namespace ShapeOp
46 #ifdef SHAPEOP_HEADER_ONLY
47 #include "LSSolver.cpp"
48 #endif
49 #endif // LSSOLVER_H
51 
Base class of any sparse linear system solver. This class defines the main functionalities of the Sha...
Definition: LSSolver.h:23
Sparse linear system solver based on Cholesky. This class implements a sparse linear system solver ba...
Definition: LSSolver.h:33