Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
4
using namespace std;
5
6
float 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
12
int main()
13
{
Callers
1
main
Function · 0.85
Calls
2
jacobiSvd
Method · 0.80
size
Method · 0.45
Tested by
no test coverage detected