pub struct KernelDensity2D {
pub x: Vec<f64>,
pub y: Vec<f64>,
pub z: Array2<f64>,
}Expand description
2D Kernel Density Estimation result
Fields§
§x: Vec<f64>X grid points
y: Vec<f64>Y grid points
z: Array2<f64>Density values (2D grid: x.len() × y.len())
Implementations§
Source§impl KernelDensity2D
impl KernelDensity2D
Sourcepub fn estimate(
data_x: &[f64],
data_y: &[f64],
adjust: f64,
n_points: usize,
) -> KdeResult<Self>
pub fn estimate( data_x: &[f64], data_y: &[f64], adjust: f64, n_points: usize, ) -> KdeResult<Self>
Compute 2D kernel density estimate using FFT-based convolution
§Arguments
data_x- X coordinates of data pointsdata_y- Y coordinates of data pointsadjust- Bandwidth adjustment factor (default: 1.0)n_points- Number of grid points per dimension (default: 128)
§Returns
KernelDensity2D with 2D density grid
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelDensity2D
impl RefUnwindSafe for KernelDensity2D
impl Send for KernelDensity2D
impl Sync for KernelDensity2D
impl Unpin for KernelDensity2D
impl UnsafeUnpin for KernelDensity2D
impl UnwindSafe for KernelDensity2D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more