mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 13:56:03 +08:00

* 1. Remove all global include_directories. * 2. Move 3d party dependencies from src to budled deps if possible. * Unify and enforce one way of including headers: e.g. #include "libslic3r/GCode.hpp" vs #include "GCode.hpp" (always use the "libslic3r/GCode.hpp" option). * Make all dependencies (also header only) a cmake target.
30 lines
789 B
C++
30 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
|