nalgebra
nalgebra copied to clipboard
Always check iterator size when allocating
Fixes #1391.
Allocation now checks whether the supplied iterator has the correct size. Because checking this size messes with the zero-cost conversion of a Vec
to a Matrix
, I have also added a method allocate_from_vec
to the Allocator
trait with a default implementation. I am not sure if this will be useful in general. Alternatively this could also just be a private method of DefaultAllocator
instead.