Struct rustml::sliding::DimensionParameters [] [src]

pub struct DimensionParameters {
    pub area_width: usize,
    pub window_width: usize,
    pub delta: usize,
}

Contains the parameters for one dimensions of a sliding window.

Usually the function param is used to create a set of parameters but a set of parameters can be created with the method new as well.

A sliding window with a width w on an area with width a and a delta d returns the following set of numbers:
{0, d, 2d, ..., w - d + 1}

Example

use rustml::sliding::*;
assert_eq!(
    DimensionParameters::new(100, 10, 5),
    param(100, 10, 5)
);

Fields

area_width

The size of the area on which the sliding window is moved.

window_width

The size of the sliding window.

delta

The increment that is used to move the sliding window.

Methods

impl DimensionParameters

fn new(area_width: usize, window_width: usize, delta: usize) -> DimensionParameters

Trait Implementations

impl PartialEq<DimensionParameters> for DimensionParameters

fn eq(&self, other: &DimensionParameters) -> bool

fn ne(&self, other: &Rhs) -> bool

Derived Implementations

impl Debug for DimensionParameters

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for DimensionParameters

fn clone(&self) -> DimensionParameters

fn clone_from(&mut self, source: &Self)

impl Copy for DimensionParameters