61 template<
typename dtype>
66 const auto wkShape = wk.
shape();
67 if (wkShape.cols != 3)
72 const auto vkShape = vk.
shape();
73 if (vkShape.cols != 3)
78 if (wkShape.rows != vkShape.rows)
83 if (ak.
size() != wkShape.rows)
89 const auto cSlice = wk.
cSlice();
90 for (
uint32 row = 0; row < wkShape.rows; ++row)
92 const auto wkVec = wk(row, cSlice);
93 const auto vkVec = vk(row, cSlice);
94 b += ak[row] *
dot(wkVec.transpose(), vkVec);
108 return dot(u,
dot(m, vt));
124 template<
typename dtype>
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition Error.hpp:37
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
size_type size() const noexcept
Definition NdArrayCore.hpp:4604
self_type transpose() const
Definition NdArrayCore.hpp:4963
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4591
Slice cSlice(index_type inStartIdx=0, size_type inStepSize=1) const
Definition NdArrayCore.hpp:1008
uint32 rows
Definition Core/shape.hpp:44
void svd(const NdArray< dtype > &inArray, NdArray< double > &outU, NdArray< double > &outS, NdArray< double > &outVT)
Definition svd.hpp:51
auto det(const NdArray< dtype > &inArray)
Definition det.hpp:131
NdArray< double > wahbasProblem(const NdArray< dtype > &wk, const NdArray< dtype > &vk, const NdArray< dtype > &ak)
Definition wahbasProblem.hpp:62
NdArray< dtype > ones(uint32 inSquareSize)
Definition ones.hpp:48
NdArray< dtype > dot(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition dot.hpp:48
NdArray< dtype > eye(uint32 inN, uint32 inM, int32 inK=0)
Definition eye.hpp:51
NdArray< dtype > zeros(uint32 inSquareSize)
Definition zeros.hpp:48
std::uint32_t uint32
Definition Types.hpp:40