JuliaLang/julia — pull request #6906 by simonbyrne (2014-05-21 11:07:45+00:00)
Title: add StructuredArray abstract type

At the risk of spilling yet more bits over the type hiearchy (#6212, etc.), I would like to propose an abstract `StructuredArray` type for "specially structured" arrays. The main purpose is to make it easier to reason about the type hierarchy, which is becoming difficult when dealing with ambiguous dispatch for all the `Ax_foo_Bx` methods.
```
julia> subtypes(StructuredArray)
10-element Array{Any,1}:
Bidiagonal{T}
Diagonal{T}
Givens{T}
Hermitian{T}
SymTridiagonal{T}
SymmetricRFP{T<:Union(Complex{Float64},Float32,Complex{Float32},Float64)}
Symmetric{T}
TriangularRFP{T<:Union(Complex{Float64},Float32,Complex{Float32},Float64)}
Triangular{T<:Number}
Tridiagonal{T}
```

The remaining subtypes of `AbstractArray` are:
```
julia> subtypes(AbstractArray)
10-element Array{Any,1}:
AbstractSparseArray{Tv,Ti,N}
DArray{T,N,A}
DenseArray{T,N}
HessenbergQ{T}
QRCompactWYQ{S}
QRPackedQ{T}
Range{T}
StructuredArray{T,N}
SubArray{T,N,A<:AbstractArray{T,N},I<:(Union(Range{Int64},Int64)...,)}
Woodbury{T}
```

Of these, `HessenbergQ{T}`, `QRCompactWYQ{S}` and `QRPackedQ{T}` could also be moved, as they are also structured in some sense.