[SYSTEMML-1259] Replace append with cbind for matrices Replace matrix append calls with cbind calls.
Closes #391. Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/ba2819bc Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/ba2819bc Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/ba2819bc Branch: refs/heads/gh-pages Commit: ba2819bce02500a374c7e7fe957bb678efebf277 Parents: 0f92f40 Author: Deron Eriksson <de...@us.ibm.com> Authored: Tue Feb 14 16:14:16 2017 -0800 Committer: Deron Eriksson <de...@us.ibm.com> Committed: Tue Feb 14 16:14:16 2017 -0800 ---------------------------------------------------------------------- dml-language-reference.md | 1 - 1 file changed, 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/ba2819bc/dml-language-reference.md ---------------------------------------------------------------------- diff --git a/dml-language-reference.md b/dml-language-reference.md index 22ec0d9..fca2b9b 100644 --- a/dml-language-reference.md +++ b/dml-language-reference.md @@ -639,7 +639,6 @@ The builtin function `sum` operates on a matrix (say A of dimensionality (m x n) Function | Description | Parameters | Example -------- | ----------- | ---------- | ------- -append() | Adds the second argument as additional columns to the first argument (note that the first argument is not over-written). Append is meant to be used in situations where one cannot use left-indexing. <br/> **NOTE: append() has been replaced by cbind(), so its use is discouraged.** | Input: (X <matrix>, Y <matrix>) <br/>Output: <matrix> <br/> X and Y are matrices (with possibly multiple columns), where the number of rows in X and Y must be the same. Output is a matrix with exactly the same number of rows as X and Y. Let n1 and n2 denote the number of columns of matrix X and Y, respectively. The returned matrix has n1+n2 columns, where the first n1 columns contain X and the last n2 columns contain Y. | A = matrix(1, rows=2,cols=5) <br/> B = matrix(1, rows=2,cols=3) <br/> C = append(A,B) <br/> print("Dimensions of C: " + nrow(C) + " X " + ncol(C)) <br/> The output of above example is: <br/> Dimensions of C: 2 X 8 cbind() | Column-wise matrix concatenation. Concatenates the second matrix as additional columns to the first matrix | Input: (X <matrix>, Y <matrix>) <br/>Output: <matrix> <br/> X and Y are matrices, where the number of rows in X and the number of rows in Y are the same. | A = matrix(1, rows=2,cols=3) <br/> B = matrix(2, rows=2,cols=3) <br/> C = cbind(A,B) <br/> print("Dimensions of C: " + nrow(C) + " X " + ncol(C)) <br/> Output: <br/> Dimensions of C: 2 X 6 matrix() | Matrix constructor (assigning all the cells to numeric literals). | Input: (<init>, rows=<value>, cols=<value>) <br/> init: numeric literal; <br/> rows/cols: number of rows/cols (expression) <br/> Output: matrix | # 10x10 matrix initialized to 0 <br/> A = matrix (0, rows=10, cols=10) | Matrix constructor (reshaping an existing matrix). | Input: (<existing matrix>, rows=<value>, cols=<value>, byrow=TRUE) <br/> Output: matrix | A = matrix (0, rows=10, cols=10) <br/> B = matrix (A, rows=100, cols=1)