.. _program_listing_file__tmp_ws_src_eigenpy_include_eigenpy_solvers_SparseSolverBase.hpp: Program Listing for File SparseSolverBase.hpp ============================================= |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/eigenpy/include/eigenpy/solvers/SparseSolverBase.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright 2017, Justin Carpentier, LAAS-CNRS * * This file is part of eigenpy. * eigenpy is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version. * eigenpy is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. You should * have received a copy of the GNU Lesser General Public License along * with eigenpy. If not, see . */ #ifndef __eigenpy_sparse_solver_base_hpp__ #define __eigenpy_sparse_solver_base_hpp__ #include "eigenpy/fwd.hpp" namespace eigenpy { template struct SparseSolverVisitor : public bp::def_visitor > { typedef Eigen::VectorXd VectorType; template void visit(PyClass& cl) const { cl.def("solve", &solve, bp::arg("b"), "Returns the solution x of Ax = b using the current decomposition " "of A."); } private: static VectorType solve(SparseSolver& self, const VectorType& b) { return self.solve(b); } }; } // namespace eigenpy #endif // ifndef __eigenpy_sparse_solver_base_hpp__