Quantcast
Channel: Math.NET Numerics
Viewing all articles
Browse latest Browse all 971

New Post: add several vectors

$
0
0
Alternatively, if the vectors are very large you could try whether the following is faster:
var result = new double[length];
foreach(var array in arrays)
{
    Control.LinearAlgebraProvider.AddArrays(array, result, result);
}
Of course, if the vectors were actual Math.NET Numerics vectors you could do:
var vectors = new List<Vector<double>>();
vectors.Aggregate((a, b) => a + b);
Thanks,
Christoph

Viewing all articles
Browse latest Browse all 971

Trending Articles