

Is there a plan to eventually add special types for any of the following:
1) RowVector: represent a row vector, with the property that RowVector([1,2,3])*[1,2,3] = 14 2) Fill(x,n,m): represent an n x m matrix of all entries equal to x in O(1) memory. 3) Identity(T,n,m): represent an n x m identity matrix in O(1) memory. (Probably better as UniformScalingMatrix to support constants other than 1)
I think I will need these to handle matrices of operators in ApproxFun efficiently, but wanted to know whether to hold off for 0.6 or start rolling this on my own. One option would be to put together a package with these special types, say JuliaMatrices/StructuredMatrices.jl, which could eventually be merged into Base.


Of course, there is the "taking vector transposes seriously" issue for the RowVector.
Fill and Identity (with size) seem like good additions, but there's no harm in adding such things outside of Base unless they might be good replacement return types for some functions already in Base (I understand LinAlg might even be spun off to a "standard library" package with a more compact "Base" module),


El jueves, 29 de septiembre de 2016, 4:14:51 (UTC+2), Sheehan Olver escribió: Is there a plan to eventually add special types for any of the following:
1) RowVector: represent a row vector, with the property that RowVector([1,2,3])*[1,2,3] = 14 2) Fill(x,n,m): represent an n x m matrix of all entries equal to x in O(1) memory. 3) Identity(T,n,m): represent an n x m identity matrix in O(1) memory. (Probably better as UniformScalingMatrix to support constants other than 1)
UniformScaling already exists (with that name). Could you explain the purpose of Fill?
I think I will need these to handle matrices of operators in ApproxFun efficiently, but wanted to know whether to hold off for 0.6 or start rolling this on my own. One option would be to put together a package with these special types, say JuliaMatrices/StructuredMatrices.jl, which could eventually be merged into Base.


We already have (unexported) PermutedDimsArray, so your RowVector already exists.
Best, Tim


Does a PermutedDimsArraystyle RowVector really behave like a RowVector? Specifically product with a normal vector to a scalar?


It behaves like "regular" 1xn arrays, meaning the result of that multiplication will be a 1x1 Array, not a scalar.


UniformScaling doesn't include the dimension of the matrix. On Saturday, October 1, 2016 at 3:51:55 AM UTC+10, David P. Sanders wrote: El jueves, 29 de septiembre de 2016, 4:14:51 (UTC+2), Sheehan Olver escribió: Is there a plan to eventually add special types for any of the following:
1) RowVector: represent a row vector, with the property that RowVector([1,2,3])*[1,2,3] = 14 2) Fill(x,n,m): represent an n x m matrix of all entries equal to x in O(1) memory. 3) Identity(T,n,m): represent an n x m identity matrix in O(1) memory. (Probably better as UniformScalingMatrix to support constants other than 1)
UniformScaling already exists (with that name). Could you explain the purpose of Fill?
I think I will need these to handle matrices of operators in ApproxFun efficiently, but wanted to know whether to hold off for 0.6 or start rolling this on my own. One option would be to put together a package with these special types, say JuliaMatrices/StructuredMatrices.jl, which could eventually be merged into Base.


Can you give an example of where you need the dimension of the UniformScaling?

