changeset 244:bb5fec8db722 sparse

ColMajor -> ColumnMajor
author Chris Cannam
date Mon, 20 May 2013 16:46:38 +0100
parents 1313764cb89c
children 91bde82e34eb
files yetilab/matrix/matrix.yeti
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/yetilab/matrix/matrix.yeti	Mon May 20 16:45:34 2013 +0100
+++ b/yetilab/matrix/matrix.yeti	Mon May 20 16:46:38 2013 +0100
@@ -125,19 +125,19 @@
     SparseCSC _: true;
     esac;
 
-newColMajorStorage { rows, columns } = 
+newColumnMajorStorage { rows, columns } = 
     if rows < 1 then array []
     else array (map \(vec.zeros rows) [1..columns])
     fi;
 
 zeroMatrix { rows, columns } = 
-    DenseCols (newColMajorStorage { rows, columns });
+    DenseCols (newColumnMajorStorage { rows, columns });
 
 zeroMatrixWithTypeOf m { rows, columns } = 
     if isRowMajor? m then
-        DenseRows (newColMajorStorage { rows = columns, columns = rows });
+        DenseRows (newColumnMajorStorage { rows = columns, columns = rows });
     else
-        DenseCols (newColMajorStorage { rows, columns });
+        DenseCols (newColumnMajorStorage { rows, columns });
     fi;
 
 zeroSizeMatrix () = zeroMatrix { rows = 0, columns = 0 };
@@ -173,7 +173,7 @@
     esac);
 
 makeSparse type size data =
-   (isRow = case type of RowMajor (): true; ColMajor (): false esac;
+   (isRow = case type of RowMajor (): true; ColumnMajor (): false esac;
     ordered = 
         sortBy do a b:
             if a.maj == b.maj then a.min < b.min else a.maj < b.maj fi
@@ -224,7 +224,7 @@
              _: [];
             esac;
         makeSparse 
-            if isRowMajor? m then RowMajor () else ColMajor () fi
+            if isRowMajor? m then RowMajor () else ColumnMajor () fi
                (size m)
                (enumerate m [0..rows-1] [0..columns-1]);
     fi;
@@ -252,7 +252,7 @@
 flipped m =
     if isSparse? m then
         if isRowMajor? m then
-            makeSparse (ColMajor ()) (size m) (enumerateSparse m)
+            makeSparse (ColumnMajor ()) (size m) (enumerateSparse m)
         else
             makeSparse (RowMajor ()) (size m) (enumerateSparse m)
         fi