0

I have a class which contains multiple dotnumeric matrices. The matrices contains doubles with a known maximum precision. Each matrix must be saved to a single field in a mssql database.

What is the best practice for doing this?

Since the matrices are dotnumerics classes I do not have control over these, ie. i can't make them implement ISerializable for instance so I guess I have to manually convert the matrices to a string which can be saved, or is there any better solution?

It is more crucial that the conversion is fast than memory efficient.

I'm using EntityFramework as ORM.

4

1 回答 1

0

您可以通过扩展方法向点数值添加行为,也可以创建具有附加功能的派生类(如果点数值矩阵未密封)。
您很可能需要通过Binary serializer/protobuf.net或使用自己的实现将其序列化为字节数组。

于 2012-06-28T09:03:56.120 回答