pub enum BandExpression {
Band(usize),
Constant(f32),
Add(Box<BandExpression>, Box<BandExpression>),
Sub(Box<BandExpression>, Box<BandExpression>),
Mul(Box<BandExpression>, Box<BandExpression>),
Div(Box<BandExpression>, Box<BandExpression>),
Sqrt(Box<BandExpression>),
Abs(Box<BandExpression>),
Neg(Box<BandExpression>),
}Expand description
A composable expression tree for multi-band raster math.
Leaf nodes are either a Band index or a scalar Constant.
Interior nodes are arithmetic operators.
Variants§
Band(usize)
Reference to band at the given index.
Constant(f32)
Scalar constant.
Add(Box<BandExpression>, Box<BandExpression>)
Addition: A + B
Sub(Box<BandExpression>, Box<BandExpression>)
Subtraction: A - B
Mul(Box<BandExpression>, Box<BandExpression>)
Multiplication: A * B
Div(Box<BandExpression>, Box<BandExpression>)
Division: A / B (errors on divide-by-zero)
Sqrt(Box<BandExpression>)
Square root: sqrt(max(0, A))
Abs(Box<BandExpression>)
Absolute value: |A|
Neg(Box<BandExpression>)
Negation: -A
Implementations§
Trait Implementations§
Source§impl Clone for BandExpression
impl Clone for BandExpression
Source§fn clone(&self) -> BandExpression
fn clone(&self) -> BandExpression
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 BandExpression
impl RefUnwindSafe for BandExpression
impl Send for BandExpression
impl Sync for BandExpression
impl Unpin for BandExpression
impl UnsafeUnpin for BandExpression
impl UnwindSafe for BandExpression
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