Trait ArrayRational
Source pub trait ArrayRational<N: Numeric>{
// Required methods
fn lcm(&self, other: &Array<N>) -> Result<Array<N>, ArrayError>;
fn gcd(&self, other: &Array<N>) -> Result<Array<N>, ArrayError>;
}
Expand description
ArrayTrait
- Array Rational functions
Returns the lowest common multiple of |x1| and |x2|
§Arguments
other
- array to perform the operation with
§Examples
use arr_rs::prelude::*;
assert_eq!(Array::single(60), Array::single(12).lcm(&Array::single(20).unwrap()));
§Errors
may returns ArrayError
Returns the greatest common divisor of |x1| and |x2|
§Arguments
other
- array to perform the operation with
§Examples
use arr_rs::prelude::*;
assert_eq!(Array::single(4), Array::single(12).gcd(&Array::single(20).unwrap()));
§Errors
may returns ArrayError
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.