pub struct HeatFlow { /* private fields */ }Expand description
A w × h × z tensor which stores the frequency on each grid.
§Complexity Analysis
Requires $O(whz)$ space to store the data.
Each time step takes $O(mn)$ time to erase the previous layer.
Implementations§
Source§impl HeatFlow
impl HeatFlow
Sourcepub fn view_z(&self) -> HeatFlowViewZ<'_> ⓘ
pub fn view_z(&self) -> HeatFlowViewZ<'_> ⓘ
View values on z-index
pub fn view_xy(&self) -> HeatFlowViewXY<'_> ⓘ
pub fn view_xyz(&self) -> HeatFlowViewXYZ<'_>
Source§impl HeatFlow
impl HeatFlow
pub fn new(area: Rectangle<f32>, resolution: f32, z_index: usize) -> Self
pub fn get_area(&self) -> Rectangle<f32>
pub fn get_w(&self) -> usize
pub fn get_h(&self) -> usize
pub fn get_z(&self) -> usize
pub fn get_time(&self) -> usize
pub fn sampling(&mut self, point: Point<f32>, weight: f32)
pub fn time_fly(&mut self)
pub fn as_heatmap(&self) -> HeatMap
Auto Trait Implementations§
impl Freeze for HeatFlow
impl RefUnwindSafe for HeatFlow
impl Send for HeatFlow
impl Sync for HeatFlow
impl Unpin for HeatFlow
impl UnwindSafe for HeatFlow
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