BrushFamily.InputModel.SlidingWindowModel


public final class BrushFamily.InputModel.SlidingWindowModel extends BrushFamily.InputModel


An InputModel that averages nearby inputs together within a sliding time window.

Summary

Public constructors

Constructs a SlidingWindowModel with default parameters.

SlidingWindowModel(
    long windowDurationMillis,
    int upsamplingFrequencyHz
)

Constructs a SlidingWindowModel with the given parameters.

Public methods

boolean
equals(Object other)
final int

The minimum frequency at which modeled inputs should occur, or zero to disable upsampling.

final long

The duration over which to average together nearby raw inputs.

int
@NonNull String

Public constructors

SlidingWindowModel

Added in 1.1.0-alpha03
public SlidingWindowModel()

Constructs a SlidingWindowModel with default parameters.

SlidingWindowModel

Added in 1.1.0-alpha03
public SlidingWindowModel(
    long windowDurationMillis,
    int upsamplingFrequencyHz
)

Constructs a SlidingWindowModel with the given parameters.

Public methods

equals

public boolean equals(Object other)

getUpsamplingFrequencyHz

Added in 1.1.0-alpha03
public final int getUpsamplingFrequencyHz()

The minimum frequency at which modeled inputs should occur, or zero to disable upsampling.

getWindowDurationMillis

Added in 1.1.0-alpha03
public final long getWindowDurationMillis()

The duration over which to average together nearby raw inputs. Typically this should be somewhere in the 1 ms to 100 ms range.

hashCode

public int hashCode()

toString

public @NonNull String toString()