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

Function linspace

crates/openquant/src/microstructural_features.rs:449–458  ·  view source on GitHub ↗
(start: f64, end: f64, n: usize)

Source from the content-addressed store, hash-verified

447}
448
449fn linspace(start: f64, end: f64, n: usize) -> Vec<f64> {
450 if n == 0 {
451 return vec![];
452 }
453 if n == 1 {
454 return vec![start];
455 }
456 let step = (end - start) / (n as f64 - 1.0);
457 (0..n).map(|i| start + step * i as f64).collect()
458}
459
460pub fn sigma_mapping(array: &[f64], step: f64) -> Result<Vec<(f64, char)>, String> {
461 if step <= 0.0 {

Callers 1

quantile_mappingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected