pub struct HalfOpenUnitF64(/* private fields */);Expand description
A finite f64 value in the half-open interval [0.0, 1.0).
Used for solver tolerances libcugraph requires to be non-negative and below one, such as the spectral clustering eigensolver and k-means tolerances.
§Construction
use cugraph::params::HalfOpenUnitF64;
assert_eq!(HalfOpenUnitF64::new(0.0).unwrap().get(), 0.0);
// One and values above it are rejected:
assert!(HalfOpenUnitF64::new(1.0).is_err());
assert!(HalfOpenUnitF64::new(-0.1).is_err());Implementations§
Trait Implementations§
Source§impl Clone for HalfOpenUnitF64
impl Clone for HalfOpenUnitF64
impl Copy for HalfOpenUnitF64
Source§impl Debug for HalfOpenUnitF64
impl Debug for HalfOpenUnitF64
Source§impl Display for HalfOpenUnitF64
impl Display for HalfOpenUnitF64
Source§impl From<HalfOpenUnitF64> for f64
impl From<HalfOpenUnitF64> for f64
Source§fn from(val: HalfOpenUnitF64) -> f64
fn from(val: HalfOpenUnitF64) -> f64
Converts to this type from the input type.
Source§impl PartialEq for HalfOpenUnitF64
impl PartialEq for HalfOpenUnitF64
Source§impl PartialOrd for HalfOpenUnitF64
impl PartialOrd for HalfOpenUnitF64
impl StructuralPartialEq for HalfOpenUnitF64
Auto Trait Implementations§
impl Freeze for HalfOpenUnitF64
impl RefUnwindSafe for HalfOpenUnitF64
impl Send for HalfOpenUnitF64
impl Sync for HalfOpenUnitF64
impl Unpin for HalfOpenUnitF64
impl UnsafeUnpin for HalfOpenUnitF64
impl UnwindSafe for HalfOpenUnitF64
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