nk
1.0.0
C++ Numerical Computing Runtime
Toggle main menu visibility
Loading...
Searching...
No Matches
misc.hpp
Go to the documentation of this file.
1
3
// toolboxes/linalg/include/nk/linalg/misc.hpp
4
//
5
// Miscellaneous linalg utilities: reduced row echelon form (rref),
6
// Givens plane rotation (planerot). Migrated from
7
// toolboxes/builtin/src/language/arrays/linalg_extras.cpp.
8
9
#pragma once
10
11
#include <memory_resource>
12
#include <utility>
13
#include <nk/value/value.hpp>
14
15
namespace
nk::linalg {
16
19
20
24
std::pair<Value, Value>
25
rref
(
const
Value
&A,
bool
have_tol,
double
tol_user,
26
std::pmr::memory_resource *mr =
nullptr
);
27
32
std::pair<Value, Value>
33
planerot
(
const
Value
&xy, std::pmr::memory_resource *mr =
nullptr
);
34
35
37
}
// namespace nk::linalg
nk::Value
Core MATLAB-compatible multidimensional array and scalar value type.
Definition
value.hpp:61
nk::linalg::planerot
std::pair< Value, Value > planerot(const Value &xy, std::pmr::memory_resource *mr=nullptr)
Givens plane rotation ([G, y_out] = planerot([x; y])).
nk::linalg::rref
std::pair< Value, Value > rref(const Value &A, bool have_tol, double tol_user, std::pmr::memory_resource *mr=nullptr)
Reduced row echelon form ([R, jb] = rref(A, have_tol, tol)).
src
toolboxes
linalg
include
nk
linalg
misc.hpp
Generated by
1.17.0