pub struct ScalarField { /* private fields */ }Implementations§
Source§impl ScalarField
impl ScalarField
pub fn new(width: usize, height: usize) -> Self
pub fn from_values(width: usize, height: usize, values: Vec<f32>) -> Self
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn values(&self) -> &[f32]
pub fn len(&self) -> usize
pub fn get(&self, x: usize, y: usize) -> f32
pub fn set(&mut self, x: usize, y: usize, value: f32)
pub fn mean(&self) -> f32
pub fn mean_over_mask(&self, mask: &[bool]) -> f32
Trait Implementations§
Source§impl Clone for ScalarField
impl Clone for ScalarField
Source§fn clone(&self) -> ScalarField
fn clone(&self) -> ScalarField
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScalarField
impl RefUnwindSafe for ScalarField
impl Send for ScalarField
impl Sync for ScalarField
impl Unpin for ScalarField
impl UnsafeUnpin for ScalarField
impl UnwindSafe for ScalarField
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