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

New Post: What do the DenseMatrix FoldRows/FoldColumns functions do?

$
0
0
Similar to Map, Fold is one of the fundamental higher order functions in functional programming, see https://en.wikipedia.org/wiki/Fold_%28higher-order_function%29

With these fold functions you can fold some function over all columns (or over all rows). This is useful to implement simple algorithms (which are missing in the library) over all columns or rows, e.g. to compute column sums or some row statistics. You could also write a loop to achieve the same thing, but accessing matrix cells by index is very inefficient especially for sparse matrices.

Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>