How to solve rectangular sparse matrix using Alglib, linlsqrsolvesparse?

梦想的初衷 提交于 2021-01-29 14:59:15

问题


I've created a sparse matrix

alglib.sparse.sparsematrix solvingInputA = new alglib.sparse.sparsematrix() ;
alglib.sparse.sparsecreate(kNew.Length, nanCount,fdaNonZero,solvingInputA, default);

then I put some data and tried to convert with this block of code

alglib.linlsqrstate linlsqrstate;
alglib.linlsqrcreate(solvingInputA.m, solvingInputA.n, out linlsqrstate);
alglib.xparams _params = default;
alglib.sparse.sparseconverttocrs(solvingInputA, default);

then solve

alglib.linlsqrsolvesparse(linlsqrstate, solvingInputA, solvingInputB, default);

but I can't solve because of error in solving line (after conversion to proper format, what I readed in docs):

Error CS1503 Argument 2: cannot convert from 'alglib.sparse.sparsematrix' to 'alglib.sparsematrix'

Before when I had aglib.sparsematrix instead of alglib.sparse.sparsematrix, I couldn't convert because it.

来源:https://stackoverflow.com/questions/60588389/how-to-solve-rectangular-sparse-matrix-using-alglib-linlsqrsolvesparse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!