forked from M-Labs/nalgebra
impl Hash for Transform
This just fixes the types in the existing TODO to compile.
This commit is contained in:
parent
b10711e66e
commit
3b4b661756
@ -1,6 +1,7 @@
|
|||||||
use approx::{AbsDiffEq, RelativeEq, UlpsEq};
|
use approx::{AbsDiffEq, RelativeEq, UlpsEq};
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
|
use std::hash;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
#[cfg(feature = "serde-serialize-no-std")]
|
#[cfg(feature = "serde-serialize-no-std")]
|
||||||
@ -166,14 +167,16 @@ where
|
|||||||
_phantom: PhantomData<C>,
|
_phantom: PhantomData<C>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
impl<T: RealField + hash::Hash, C: TCategory, const D: usize> hash::Hash for Transform<T, C, D>
|
||||||
// impl<T: RealField + hash::Hash, D: DimNameAdd<U1> + hash::Hash, C: TCategory> hash::Hash for Transform<T, C, D>
|
where
|
||||||
// where DefaultAllocator: Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>,
|
Const<D>: DimNameAdd<U1>,
|
||||||
// Owned<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>: hash::Hash {
|
DefaultAllocator: Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>,
|
||||||
// fn hash<H: hash::Hasher>(&self, state: &mut H) {
|
Owned<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>: hash::Hash,
|
||||||
// self.matrix.hash(state);
|
{
|
||||||
// }
|
fn hash<H: hash::Hasher>(&self, state: &mut H) {
|
||||||
// }
|
self.matrix.hash(state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T: RealField, C: TCategory, const D: usize> Copy for Transform<T, C, D>
|
impl<T: RealField, C: TCategory, const D: usize> Copy for Transform<T, C, D>
|
||||||
where
|
where
|
||||||
|
Loading…
Reference in New Issue
Block a user