[][src]Struct ndhistogram::axis::UniformNoFlow

pub struct UniformNoFlow<T> { /* fields omitted */ }

An axis with equal sized bins and no under/overflow bins.

An axis with N equally spaced, equal sized, bins between (low, high]. Similar to Uniform but this axis has no over/underflow bins. Hence it has N+2 bins.

Example

Create a 1D histogram with uniform 10 uniform bins between -5.0 and 5.0.

   use ndhistogram::{ndhistogram, Histogram};
   use ndhistogram::axis::{Axis, UniformNoFlow, BinInterval};
   let hist = ndhistogram!(UniformNoFlow::new(10, -5.0, 5.0));
   let axis = &hist.axes().0;
   assert_eq!(axis.bin(0), Some(BinInterval::new(-5.0, -4.0)));
   assert_eq!(axis.bin(10), None);

Implementations

impl<T: Float> UniformNoFlow<T>[src]

pub fn new(num: usize, low: T, high: T) -> Self[src]

Factory method to create an axis with num uniformly spaced bins in the range [low, high) with no under/overflow bins.

pub fn low(&self) -> &T[src]

Return the lowest bin edge.

pub fn high(&self) -> &T[src]

Return the highest bin edge.

Trait Implementations

impl<T: Float> Axis for UniformNoFlow<T>[src]

type Coordinate = T

The type representing a location on this axis.

type BinInterval = BinInterval<T>

The type of an interval representing the set of Coordinates that correspond to a histogram bin

impl<T: Clone> Clone for UniformNoFlow<T>[src]

impl<T: Debug> Debug for UniformNoFlow<T>[src]

impl<T: Float + Display> Display for UniformNoFlow<T>[src]

impl<'a, T: Float> IntoIterator for &'a UniformNoFlow<T>[src]

type Item = (usize, <Uniform<T> as Axis>::BinInterval)

The type of the elements being iterated over.

type IntoIter = Box<dyn Iterator<Item = Self::Item> + 'a>

Which kind of iterator are we turning this into?

impl<T: PartialEq> PartialEq<UniformNoFlow<T>> for UniformNoFlow<T>[src]

impl<T> StructuralPartialEq for UniformNoFlow<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for UniformNoFlow<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for UniformNoFlow<T> where
    T: Send
[src]

impl<T> Sync for UniformNoFlow<T> where
    T: Sync
[src]

impl<T> Unpin for UniformNoFlow<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for UniformNoFlow<T> where
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.