MCPcopy Create free account
hub / github.com/Open-Quant/openquant / dot

Function dot

crates/openquant/src/portfolio_optimization.rs:191–193  ·  view source on GitHub ↗
(a: &[f64], b: &[f64])

Source from the content-addressed store, hash-verified

189}
190
191fn dot(a: &[f64], b: &[f64]) -> f64 {
192 a.iter().zip(b.iter()).map(|(x, y)| x * y).sum()
193}
194
195fn quad_risk(cov: &DMatrix<f64>, w: &[f64]) -> f64 {
196 let wv = DVector::from_vec(w.to_vec());

Callers 5

allocate_min_vol_withFunction · 0.70
allocate_max_sharpe_withFunction · 0.70
allocate_from_inputsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected