csv.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2024 INRIA
3 //
4 
5 #ifndef __pinocchio_serialization_csv_hpp__
6 #define __pinocchio_serialization_csv_hpp__
7 
9 
10 #include <Eigen/Core>
11 #include <fstream>
12 
13 namespace pinocchio
14 {
15 
16  template<typename Derived>
17  void toCSVfile(const std::string & filename, const Eigen::MatrixBase<Derived> & matrix)
18  {
19  const Eigen::IOFormat CSVFormat(Eigen::StreamPrecision, Eigen::DontAlignCols, ", ", "\n");
20  std::ofstream file(filename.c_str());
21  file << matrix.format(CSVFormat);
22  }
23 } // namespace pinocchio
24 
25 #endif // ifndef __pinocchio_serialization_csv_hpp__
filename
filename
pinocchio::toCSVfile
void toCSVfile(const std::string &filename, const Eigen::MatrixBase< Derived > &matrix)
Definition: csv.hpp:17
fwd.hpp
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:43