libigl v2.5.0
Loading...
Searching...
No Matches
matlab_format.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8#ifndef IGL_MATLAB_FORMAT_H
9#define IGL_MATLAB_FORMAT_H
10
11#include "igl_inline.h"
12
13#include <Eigen/Core>
14#include <Eigen/Sparse>
15#include <string>
16#include <vector>
17
18namespace igl
19{
44 template <typename DerivedM>
45 IGL_INLINE const Eigen::WithFormat< DerivedM > matlab_format(
46 const Eigen::DenseBase<DerivedM> & M,
47 const std::string name = "");
51 template <typename DerivedM>
53 const Eigen::MatrixBase<DerivedM> & M,
54 const std::string name = "");
55 template <typename T>
57 const std::vector<T> & Mvec,
58 const std::string name = "");
76 template <typename DerivedS>
77 IGL_INLINE const std::string matlab_format(
78 const Eigen::SparseMatrix<DerivedS> & S,
79 const std::string name = "");
82 IGL_INLINE const std::string matlab_format(
83 const double v,
84 const std::string name = "");
86 IGL_INLINE const std::string matlab_format(
87 const float v,
88 const std::string name = "");
102 IGL_INLINE Eigen::IOFormat matlab_format();
103}
104
105#ifndef IGL_STATIC_LIBRARY
106# include "matlab_format.cpp"
107#endif
108
109#endif
110
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:18
Eigen::IOFormat matlab_format()
Just build and return the format.
std::string matlab_format_index(const Eigen::MatrixBase< DerivedM > &M, const std::string name="")
This is an overloaded member function, provided for convenience. It differs from the above function o...