pub struct HyperfiniteSet {
pub cardinality: usize,
pub label: String,
}Expand description
A hyperfinite set represented by a hypernatural cardinality N (as usize for computability).
Fields§
§cardinality: usizeThe (hyper)natural cardinality of the set (as an ordinary usize for computational purposes).
label: StringAn optional label for the set.
Implementations§
Source§impl HyperfiniteSet
impl HyperfiniteSet
Sourcepub fn new(cardinality: usize, label: &str) -> Self
pub fn new(cardinality: usize, label: &str) -> Self
Create a hyperfinite set with given cardinality.
Sourcepub fn hyperfinite_sum<F: Fn(usize) -> f64>(&self, f: F) -> f64
pub fn hyperfinite_sum<F: Fn(usize) -> f64>(&self, f: F) -> f64
Compute the sum of a function over this hyperfinite set (approximation).
Sourcepub fn hyperfinite_product<F: Fn(usize) -> f64>(&self, f: F) -> f64
pub fn hyperfinite_product<F: Fn(usize) -> f64>(&self, f: F) -> f64
Compute the product of a function over this hyperfinite set (approximation).
Sourcepub fn loeb_integral<F: Fn(usize) -> f64>(&self, f: F) -> f64
pub fn loeb_integral<F: Fn(usize) -> f64>(&self, f: F) -> f64
Compute the normalized sum (Loeb-measure approximation).
Sourcepub fn is_nonempty(&self) -> bool
pub fn is_nonempty(&self) -> bool
Check whether the set is nonempty.
Auto Trait Implementations§
impl Freeze for HyperfiniteSet
impl RefUnwindSafe for HyperfiniteSet
impl Send for HyperfiniteSet
impl Sync for HyperfiniteSet
impl Unpin for HyperfiniteSet
impl UnsafeUnpin for HyperfiniteSet
impl UnwindSafe for HyperfiniteSet
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