NumCpp
2.16.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
pinv.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include <string>
31
32
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
33
#include "
NumCpp/Core/Types.hpp
"
34
#include "
NumCpp/Linalg/svd/SVD.hpp
"
35
#include "
NumCpp/NdArray.hpp
"
36
37
namespace
nc::linalg
38
{
39
//============================================================================
40
// Method Description:
48
template
<
typename
dtype>
49
NdArray<double>
pinv
(
const
NdArray<dtype>
& inArray)
50
{
51
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
(dtype);
52
53
return
SVD
{ inArray }.pinv();
54
}
55
}
// namespace nc::linalg
NdArray.hpp
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition:
StaticAsserts.hpp:56
Types.hpp
nc::NdArray< double >
nc::linalg::SVD
Performs the singular value decomposition of a general matrix.
Definition:
svd/SVD.hpp:50
nc::linalg
Definition:
cholesky.hpp:41
nc::linalg::pinv
NdArray< double > pinv(const NdArray< dtype > &inArray)
Definition:
pinv.hpp:49
SVD.hpp
include
NumCpp
Linalg
pinv.hpp
Generated by
1.9.4