MCPcopy Create free account
hub / github.com/Derious/cuMPC / inv_cond

Function inv_cond

dependence/eigen-3.4.0/doc/examples/function_taking_ref.cpp:6–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace std;
5
6float inv_cond(const Ref<const MatrixXf>& a)
7{
8 const VectorXf sing_vals = a.jacobiSvd().singularValues();
9 return sing_vals(sing_vals.size()-1) / sing_vals(0);
10}
11
12int main()
13{

Callers 1

mainFunction · 0.85

Calls 2

jacobiSvdMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected