pub struct FractionF64(/* private fields */);Expand description
A finite f64 value in the half-open interval (0.0, 1.0].
Used for parameters libcugraph requires to be positive and at most one,
such as the ECG convergence threshold and resolution.
§Construction
use cugraph::params::FractionF64;
assert_eq!(FractionF64::new(1.0).unwrap().get(), 1.0);
// Zero and values above one are rejected:
assert!(FractionF64::new(0.0).is_err());
assert!(FractionF64::new(1.5).is_err());Implementations§
Trait Implementations§
Source§impl Clone for FractionF64
impl Clone for FractionF64
impl Copy for FractionF64
Source§impl Debug for FractionF64
impl Debug for FractionF64
Source§impl Display for FractionF64
impl Display for FractionF64
Source§impl From<FractionF64> for f64
impl From<FractionF64> for f64
Source§fn from(val: FractionF64) -> f64
fn from(val: FractionF64) -> f64
Converts to this type from the input type.
Source§impl PartialEq for FractionF64
impl PartialEq for FractionF64
Source§impl PartialOrd for FractionF64
impl PartialOrd for FractionF64
impl StructuralPartialEq for FractionF64
Auto Trait Implementations§
impl Freeze for FractionF64
impl RefUnwindSafe for FractionF64
impl Send for FractionF64
impl Sync for FractionF64
impl Unpin for FractionF64
impl UnsafeUnpin for FractionF64
impl UnwindSafe for FractionF64
Blanket Implementations§
impl<T> Allocation for T
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