use crate::Rational;
use crate::rational_vector::RationalVector;
use malachite_base::num::basic::unsigneds::PrimitiveUnsigned;
use malachite_base::unsigned_vector::UnsignedVector;
impl<T: PrimitiveUnsigned> PartialEq<UnsignedVector<T>> for RationalVector
where
Rational: PartialEq<T>,
{
fn eq(&self, other: &UnsignedVector<T>) -> bool {
self.elements.len() == other.elements.len()
&& self
.elements
.iter()
.zip(&other.elements)
.all(|(x, y)| x == y)
}
}
impl<T: PrimitiveUnsigned> PartialEq<RationalVector> for UnsignedVector<T>
where
Rational: PartialEq<T>,
{
#[inline]
fn eq(&self, other: &RationalVector) -> bool {
other == self
}
}