Math.Net 的最新版本 (3.13) 无法运行以下 C# 代码:
Vector<double> a;
Vector<double> b = new DenseVector(a);
它显示以下错误消息:
cannot convert from 'MathNet.Numerics.LinearAlgebra.Vector<double>' to 'MathNet.Numerics.LinearAlgebra.Storage.DenseVectorStorage<double>'
请为这个初始化建议一个好的替代品?并在可能的情况下解释为什么它适用于以前版本的 Math.NET 但不适用于 3.13。
最佳答案
这也不适用于以前的版本。
如果您要查找的是 b
成为a
的克隆, 你可以使用 Vector<double> b = a.Clone();
关于c# - 如何在 Math.NET 中从 DenseVector 初始化 Vector<double>?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40576479/