Closed dvc94ch closed 6 months ago
seems like a common operation. if Scale had an as_mut method maybe matmul could be reused?
Scale
as_mut
matmul
#[inline] fn dot<T: Entity + SimpleEntity + ComplexField>(a: &Mat<T>, b: &Mat<T>) -> T { // TODO: does this allocate? (a.transpose() * b)[(0, 0)] }
you can write a.as_ref().col(0).adjoint() * b.as_ref().col(0), which will give you a T without allocating
a.as_ref().col(0).adjoint() * b.as_ref().col(0)
T
though i should make it so you can just write a.col(0) without the intermediate .as_ref()
a.col(0)
.as_ref()
thanks!
seems like a common operation. if
Scale
had anas_mut
method maybematmul
could be reused?