SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
FileFunctions.hpp
1 /* This file is free software; you can redistribute it and/or
2 modify it under the terms of the GNU Lesser General Public
3 License as published by the Free Software Foundation; either
4 version 3 of the License, or (at your option) any later version.
5 
6 Alternatively, you can redistribute it and/or
7 modify it under the terms of the GNU General Public License as
8 published by the Free Software Foundation; either version 2 of
9 the License, or (at your option) any later version.
10 
11 This file is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU Lesser General Public
17 License and a copy of the GNU General Public License along with
18 this file. If not, see <http://www.gnu.org/licenses/>.
19 */
20 /* \file FileFunctions.hpp
21  *
22  * Created on: May 18, 2010
23  *
24  * Copyright (C) 2010, Samir Menon <smenon@stanford.edu>
25  */
26 
27 #ifndef FILEFUNCTIONS_HPP_
28 #define FILEFUNCTIONS_HPP_
29 
30 #include <string>
31 
32 #include <Eigen/Core>
33 
34 namespace scl_util
35 {
36 
43 bool readEigenVecFromFile(Eigen::VectorXd & arg_vec,
44  const std::string & arg_file);
45 
52 bool readEigenVecFromFile(Eigen::VectorXd & arg_vec,
53  const long len, const std::string & arg_file);
54 
59 bool writeEigenVecToFile(const Eigen::VectorXd & arg_vec,
60  const std::string & arg_file);
61 
72 bool readEigenMatFromFile(Eigen::MatrixXd & arg_mat,
73  const std::string & arg_file);
74 
87 bool readEigenMatFromFile(Eigen::MatrixXd & arg_mat,
88  unsigned long arg_rows, unsigned long arg_cols,
89  const std::string & arg_file);
90 
91 
96 bool writeEigenMatToFile(const Eigen::MatrixXd & arg_mat,
97  const std::string & arg_file);
98 }
99 
100 #endif /* FILEFUNCTIONS_HPP_ */
bool readEigenVecFromFile(Eigen::VectorXd &arg_vec, const std::string &arg_file)
Definition: FileFunctions.cpp:43
bool writeEigenMatToFile(const Eigen::MatrixXd &arg_mat, const std::string &arg_file)
Definition: FileFunctions.cpp:236
bool writeEigenVecToFile(const Eigen::VectorXd &arg_vec, const std::string &arg_file)
Definition: FileFunctions.cpp:96
bool readEigenMatFromFile(Eigen::MatrixXd &arg_mat, const std::string &arg_file)
Definition: FileFunctions.cpp:116