pub struct Column {
pub intervals: Vec<[f64; 2]>,
}Expand description
Material of one column: sorted, disjoint, non-empty [low, high] intervals.
Fields§
§intervals: Vec<[f64; 2]>Implementations§
Source§impl Column
impl Column
pub fn full(low: f64, high: f64) -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn cut(&mut self, low: f64, high: f64) -> f64
pub fn cut(&mut self, low: f64, high: f64) -> f64
Remove material in [low, high]; returns the height removed. Raw float
compares, never snapped, so commuting cuts give identical columns.
Sourcepub fn has_material(&self, low: f64, high: f64) -> bool
pub fn has_material(&self, low: f64, high: f64) -> bool
Material present anywhere in [low, high].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Column
impl<'de> Deserialize<'de> for Column
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Forget for Column
impl Freeze for Column
impl Move for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
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