nalgebra icon indicating copy to clipboard operation
nalgebra copied to clipboard

Always check iterator size when allocating

Open ThomasdenH opened this issue 9 months ago • 0 comments

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.

ThomasdenH avatar May 15 '24 08:05 ThomasdenH