# HG changeset patch # User Chris Cannam # Date 1363902793 0 # Node ID 2bc6534248fee06dca8bd2fd6149f8cd038a4d03 # Parent 4e52d04887a50c0a88dba44f812e29448ee8cc7d Tidier comments diff -r 4e52d04887a5 -r 2bc6534248fe yetilab/matrix/matrix.yeti --- a/yetilab/matrix/matrix.yeti Thu Mar 21 17:13:09 2013 +0000 +++ b/yetilab/matrix/matrix.yeti Thu Mar 21 21:53:13 2013 +0000 @@ -3,13 +3,11 @@ // A matrix is an array of fvectors (i.e. primitive double[]s). -// A matrix can be either RowMajor, akin to a C multidimensional array -// in which each row is a separate fvector, or ColumnMajor, akin to a -// FORTAN multidimensional array in which each column is a separate -// fvector. The default is ColumnMajor. Storage order is an efficiency -// concern only, all operations behave identically regardless. (The -// transpose function just switches the row/column order without -// moving the elements.) +// A matrix can be stored in either column-major (the default) or +// row-major format. Storage order is an efficiency concern only: +// every API function operating on matrix objects will return the same +// result regardless of storage order. (The transpose function just +// switches the row/column order without moving the elements.) vec = load yetilab.block.fvector; block = load yetilab.block.block; @@ -147,7 +145,6 @@ if m1.size.columns != m2.size.rows then failWith "Matrix dimensions incompatible: \(m1.size), \(m2.size) (\(m1.size.columns != m2.size.rows)"; else - //!!! super-slow! generate do row col: bf.sum (bf.multiply (m1.getRow row) (m2.getColumn col)) done { rows = m1.size.rows, columns = m2.size.columns }