From 066621eea0ba8881da02b493372531f3fb0ee14e Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sun, 2 Oct 2011 17:13:25 +0200 Subject: [PATCH] Fixes F# SparseMatrix.initCol to iterate over columns instead of rows. Closes gh-13. --- src/FSharp/SparseMatrix.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FSharp/SparseMatrix.fs b/src/FSharp/SparseMatrix.fs index baa4a23f..7d996697 100644 --- a/src/FSharp/SparseMatrix.fs +++ b/src/FSharp/SparseMatrix.fs @@ -71,5 +71,5 @@ module SparseMatrix = /// Initialize a matrix by calling a construction function for every column. let inline initCol (n: int) (m: int) (f: int -> #Vector) = let A = new Double.SparseMatrix(n,m) - for i=0 to n-1 do A.SetColumn(i, f i) + for i=0 to m-1 do A.SetColumn(i, f i) A \ No newline at end of file