This project has moved. For the latest updates, please go here.

Matrix serialization

Apr 5, 2011 at 8:25 PM
Edited Apr 5, 2011 at 8:34 PM


Any chance you can mark the Matrix class as Serializable ? -- sorry I am trying to serialize a DenseMatrix and it does not seem to be working but I see that the Matrix class is marked as Serializable. I'm trying to see which is the part that's causing trouble.

Thanks !

Apr 5, 2011 at 8:42 PM

I get an error indeed because DenseMatrix is not marked as Serializable.

Type 'MathNet.Numerics.LinearAlgebra.Double.DenseMatrix' in Assembly 'MathNet.Numerics, Version=2010.11.26.814, Culture=neutral, PublicKeyToken=cd8b63ad3d691a37' is not marked as serializable.

Apr 5, 2011 at 9:54 PM

Just as a comment - I checked out the latest code, added the Serializable attributes to all Matrix and DenseMatrix classes, and serialization works as a charm. Very happy :-). If you get a chance to add that to the actual code at some point, I think others will find it useful.

Apr 6, 2011 at 10:39 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Apr 6, 2011 at 10:40 AM

My bad. I thought the Serializable was inheritable. Fixing it now.

Apr 6, 2011 at 11:33 AM

checked in.