pub fn rational(num: u32, den: u32, pos: usize) -> CdResult<Self> {
        if num > 1 && den != 0 && den < num {
            Ok(Self { num, den })
        } else {
            Err(CdError::InvalidEdge { num, den, pos })
        }
    }
/// Initializes a new edge from a given numerator and denominator. If these
/// are invalid, returns a [`CdError::InvalidEdge`].
Initializes a new edge from a given numerator and denominator. If these
are invalid, returns a [`CdError::InvalidEdge`].
Initializes a new edge from a given numerator and denominator . If these are invalid returns a [ ` CdError :: InvalidEdge ` ] .
pub fn rational(num: u32, den: u32, pos: usize) -> CdResult<Self> {
        if num > 1 && den != 0 && den < num {
            Ok(Self { num, den })
        } else {
            Err(CdError::InvalidEdge { num, den, pos })
        }
    }
pub fn rational ( num : u32 , den : u32 , pos : usize ) -> CdResult < Self > { if num > 1 && den != 0 && den < num { Ok ( Self { num , den } ) } else { Err ( CdError :: InvalidEdge { num , den , pos } ) } }
Initializes a new edge from a given numerator and denominator.
Initializes a new edge from a given numerator and denominator .
num
u32
den
u32
pos
usize
num
u32
den
u32
pos
usize