diff --git a/src/lib.rs b/src/lib.rs index 41a23ae3f..fc735c4b5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -192,7 +192,11 @@ mod iterators; mod layout; mod linalg_traits; mod linspace; +#[cfg(feature = "std")] +pub use crate::linspace::{Linspace, linspace, range}; mod logspace; +#[cfg(feature = "std")] +pub use crate::logspace::{Logspace, logspace}; mod math_cell; mod numeric_util; mod order; diff --git a/src/linspace.rs b/src/linspace.rs index 6e9b1203c..513044e00 100644 --- a/src/linspace.rs +++ b/src/linspace.rs @@ -66,8 +66,8 @@ impl ExactSizeIterator for Linspace where Linspace: Iterator {} /// /// The `Linspace` has `n` elements from `a` to `b` (inclusive). /// -/// The iterator element type is `F`, where `F` must implement `Float`, e.g. -/// `f32` or `f64`. +/// The iterator element type is `F`, where `F` must implement [`Float`], e.g. +/// [`f32`] or [`f64`]. /// /// **Panics** if converting `n - 1` to type `F` fails. #[inline] @@ -89,13 +89,13 @@ where } } -/// Return an iterator of floats from `start` to `end` (exclusive), +/// Return an iterator of floats from `a` to `b` (exclusive), /// incrementing by `step`. /// /// Numerical reasons can result in `b` being included in the result. /// -/// The iterator element type is `F`, where `F` must implement `Float`, e.g. -/// `f32` or `f64`. +/// The iterator element type is `F`, where `F` must implement [`Float`], e.g. +/// [`f32`] or [`f64`]. /// /// **Panics** if converting `((b - a) / step).ceil()` to type `F` fails. #[inline] diff --git a/src/logspace.rs b/src/logspace.rs index 4dc6e1f32..53be034b5 100644 --- a/src/logspace.rs +++ b/src/logspace.rs @@ -68,12 +68,12 @@ impl ExactSizeIterator for Logspace where Logspace: Iterator {} /// An iterator of a sequence of logarithmically spaced numbers. /// -/// The `Logspace` has `n` elements, where the first element is `base.powf(a)` +/// The [`Logspace`] has `n` elements, where the first element is `base.powf(a)` /// and the last element is `base.powf(b)`. If `base` is negative, this /// iterator will return all negative values. /// -/// The iterator element type is `F`, where `F` must implement `Float`, e.g. -/// `f32` or `f64`. +/// The iterator element type is `F`, where `F` must implement [`Float`], e.g. +/// [`f32`] or [`f64`]. /// /// **Panics** if converting `n - 1` to type `F` fails. #[inline]