From 7d4ca839239e8449231f929c392c99f9f0df105f Mon Sep 17 00:00:00 2001 From: schillic Date: Tue, 14 Aug 2018 21:44:15 +0200 Subject: [PATCH] remove result type from SparseMatrixExp's 'get_row' function --- src/ExponentialMap.jl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/ExponentialMap.jl b/src/ExponentialMap.jl index 9a7f6fca65..ed6ff3349d 100644 --- a/src/ExponentialMap.jl +++ b/src/ExponentialMap.jl @@ -98,7 +98,27 @@ function get_columns(spmexp::SparseMatrixExp{N}, return ans end -function get_row(spmexp::SparseMatrixExp{N}, i::Int)::RowVector{N} where {N} +""" + get_row(spmexp::SparseMatrixExp{N}, i::Int) where {N} + +Return a single row of a sparse matrix exponential. + +### Input + +- `spmexp` -- sparse matrix exponential +- `i` -- row index + +### Output + +A row vector corresponding to the `i`th row of the matrix exponential. + +### Notes + +This function uses Julia's `transpose` function to create the result. +The result is of type `Transpose`; in Julia versions older than v0.7, the result +was of type `RowVector`. +""" +function get_row(spmexp::SparseMatrixExp{N}, i::Int) where {N} n = size(spmexp, 1) aux = zeros(N, n) aux[i] = one(N)