pub struct MixedVolume {
pub dim: usize,
}Expand description
Mixed volume computations for convex bodies.
Fields§
§dim: usizeDimension n.
Implementations§
Source§impl MixedVolume
impl MixedVolume
Sourcepub fn estimate_volume_monte_carlo(
&self,
vertices: &[Vec<f64>],
n_samples: usize,
seed: u64,
) -> f64
pub fn estimate_volume_monte_carlo( &self, vertices: &[Vec<f64>], n_samples: usize, seed: u64, ) -> f64
Estimate the volume of a polytope (given by vertices) via Monte Carlo sampling.
Sourcepub fn check_brunn_minkowski(
&self,
vol_a: f64,
vol_b: f64,
vol_apb: f64,
) -> bool
pub fn check_brunn_minkowski( &self, vol_a: f64, vol_b: f64, vol_apb: f64, ) -> bool
Brunn-Minkowski inequality check (numeric): verify V(A+B)^{1/n} >= V(A)^{1/n} + V(B)^{1/n}.
Sourcepub fn check_isoperimetric_2d(area: f64, perimeter: f64) -> bool
pub fn check_isoperimetric_2d(area: f64, perimeter: f64) -> bool
Check the isoperimetric inequality V^{n-1} <= c_n * S^n numerically (simplified 2D: 4πA ≤ P²).
Trait Implementations§
Source§impl Clone for MixedVolume
impl Clone for MixedVolume
Source§fn clone(&self) -> MixedVolume
fn clone(&self) -> MixedVolume
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 MixedVolume
impl RefUnwindSafe for MixedVolume
impl Send for MixedVolume
impl Sync for MixedVolume
impl Unpin for MixedVolume
impl UnsafeUnpin for MixedVolume
impl UnwindSafe for MixedVolume
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