MCPcopy Create free account
hub / github.com/daniel-e/rustml / Linspace

Interface Linspace

src/vectors.rs:70–84  ·  view source on GitHub ↗

Linearly spaced elements.

Source from the content-addressed store, hash-verified

68
69/// Linearly spaced elements.
70pub trait Linspace <T> {
71
72 /// Returns a vector with `n` linearly separated elements
73 /// between `self` and `limit` (including `self` and
74 /// `limit`).
75 ///
76 /// # Example
77 ///
78 /// ```
79 /// use rustml::vectors::*;
80 ///
81 /// assert_eq!(1.0.linspace(5.0, 3), vec![1.0, 3.0, 5.0]);
82 /// ```
83 fn linspace(&self, limit: T, n: usize) -> Vec<T>;
84}
85
86impl Linspace<f64> for f64 {
87

Callers

nothing calls this directly

Implementers 1

vectors.rssrc/vectors.rs

Calls

no outgoing calls

Tested by

no test coverage detected