# Trait rustml::vectors::Linspace
[−]
[src]

pub trait Linspace<T> { fn linspace(&self, limit: T, n: usize) -> Vec<T>; }

Linearly spaced elements.

## Required Methods

`fn linspace(&self, limit: T, n: usize) -> Vec<T>`

Returns a vector with `n`

linearly separated elements
between `self`

and `limit`

(including `self`

and
`limit`

).

# Example

use rustml::vectors::*; assert_eq!(1.0.linspace(5.0, 3), vec![1.0, 3.0, 5.0]);