pub struct VertexClusterer3 { /* private fields */ }Expand description
A simple VertexClusterer that samples a range of values into a number of bins.
Implementations§
Source§impl VertexClusterer3
impl VertexClusterer3
Sourcepub fn new(
vertices: Vec<[f64; 3]>,
weights: Option<Vec<f64>>,
bin_size: f64,
) -> Self
pub fn new( vertices: Vec<[f64; 3]>, weights: Option<Vec<f64>>, bin_size: f64, ) -> Self
Create a VertexClusterer3 from a list of vertices.
Sourcepub fn get_bin(
&self,
x_idx: usize,
y_idx: usize,
z_idx: usize,
) -> Option<&Vec<([f64; 3], f64)>>
pub fn get_bin( &self, x_idx: usize, y_idx: usize, z_idx: usize, ) -> Option<&Vec<([f64; 3], f64)>>
Get the bin at the given position.
(0, 0, 0) is the bottom left bin.
Sourcepub fn get_bin_mean(
&self,
x_idx: usize,
y_idx: usize,
z_idx: usize,
) -> Option<([f64; 3], f64)>
pub fn get_bin_mean( &self, x_idx: usize, y_idx: usize, z_idx: usize, ) -> Option<([f64; 3], f64)>
Get the mean of the bin at the given position.
Sourcepub fn num_bins_x(&self) -> usize
pub fn num_bins_x(&self) -> usize
Get the number of bins in the x-direction.
Sourcepub fn num_bins_y(&self) -> usize
pub fn num_bins_y(&self) -> usize
Get the number of bins in the y-direction.
Sourcepub fn num_bins_z(&self) -> usize
pub fn num_bins_z(&self) -> usize
Get the number of bins in the z-direction.
Trait Implementations§
Source§impl Display for VertexClusterer3
impl Display for VertexClusterer3
Source§impl PartialEq for VertexClusterer3
impl PartialEq for VertexClusterer3
impl StructuralPartialEq for VertexClusterer3
Auto Trait Implementations§
impl Freeze for VertexClusterer3
impl RefUnwindSafe for VertexClusterer3
impl Send for VertexClusterer3
impl Sync for VertexClusterer3
impl Unpin for VertexClusterer3
impl UnwindSafe for VertexClusterer3
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