6 #ifndef MATRIXTOOLS_H_INCLUDED
7 #define MATRIXTOOLS_H_INCLUDED
25 template <
class T>
void PrintMatrixFile(
const std::vector<T> &mat,
const char *name);
26 void Deriv1stChainScalar(
const Eigen::MatrixXd &dSdc,
const Eigen::MatrixXd &dcdd, Eigen::MatrixXd &dSdd);
27 void Deriv2ndChainScalar(
const Eigen::MatrixXd &dSdc,
const Eigen::MatrixXd &dcdd,
const Eigen::MatrixXd &HSc,
28 const Eigen::MatrixXd &Hcd, Eigen::MatrixXd &HSd);
29 void VecBy3DimArray(
const Eigen::MatrixXd &vec,
const Eigen::MatrixXd &arr3dim, Eigen::MatrixXd &retArray);
30 void ArrayVec2MatrixXd(
const ArrayVec<double> &arrayIn, Eigen::MatrixXd &matOut);
31 void PrintMatrix(
const Eigen::MatrixXd &mat);
32 void PrintMatrixFile(
const Eigen::MatrixXd &mat,
const char *name);
33 void PrintMatrixFile(
const Eigen::MatrixXd &mat, std::ostream &myfile);
34 void PrintMatrix(
const Eigen::RowVectorXd &mat);
35 void PrintMatrix(
const Eigen::VectorXd &mat);
36 double StreamStatistics(
const Eigen::VectorXd &&vec, std::ostream &out,
const std::string &&sep = std::string(
", "));
37 void StreamOutVector(
const Eigen::VectorXd &&vec, std::ostream &out,
const std::string &&sep = std::string(
", "));
46 template <
class T>
void PrintMatrixFile(
const std::vector<T> &mat,
const char *name)
52 myfile.open(name, std::ios::app);
54 myfile << std::scientific;
55 for (ii = 0; ii < ni; ++ii)
57 myfile << mat[ii] <<
" ";
Provides a 2D std::vector based container.