OrcaSlicer/src/libigl/igl/pinv.h
tamasmeszaros 2ae2672ee9 Building igl statically and moving to the dep scripts
Fixing dep build script on Windows and removing some warnings.

Use bundled igl by default.

Not building with the dependency scripts if not explicitly stated. This way, it will stay in
Fix the libigl patch to include C source files in header only mode.
2019-06-19 14:52:55 +02:00

29 lines
789 B
C++

#ifndef IGL_PINV_H
#define IGL_PINV_H
#include "igl_inline.h"
#include <Eigen/Core>
namespace igl
{
// Compute the Moore-Penrose pseudoinverse
//
// Inputs:
// A m by n matrix
// tol tolerance (if negative then default is used)
// Outputs:
// X n by m matrix so that A*X*A = A and X*A*X = X and A*X = (A*X)' and
// (X*A) = (X*A)'
template <typename DerivedA, typename DerivedX>
void pinv(
const Eigen::MatrixBase<DerivedA> & A,
typename DerivedA::Scalar tol,
Eigen::PlainObjectBase<DerivedX> & X);
// Wrapper using default tol
template <typename DerivedA, typename DerivedX>
void pinv(
const Eigen::MatrixBase<DerivedA> & A,
Eigen::PlainObjectBase<DerivedX> & X);
}
#ifndef IGL_STATIC_LIBRARY
# include "pinv.cpp"
#endif
#endif