@@ -17,7 +17,12 @@ using BlockArrays:
1717 blocks,
1818 findblockindex
1919using DerivableInterfaces:
20- DerivableInterfaces, @interface , AbstractArrayInterface, DefaultArrayInterface, zero!
20+ DerivableInterfaces,
21+ @interface ,
22+ AbstractArrayInterface,
23+ DefaultArrayInterface,
24+ interface,
25+ zero!
2126using LinearAlgebra: Adjoint, Transpose
2227using SparseArraysBase:
2328 AbstractSparseArrayInterface,
@@ -125,7 +130,8 @@ function BlockSparseArrayInterface{N}(blockinterface::AbstractArrayInterface{N})
125130 return BlockSparseArrayInterface {N,typeof(blockinterface)} (blockinterface)
126131end
127132function BlockSparseArrayInterface {M,B} (:: Val{N} ) where {M,B<: AbstractArrayInterface{M} ,N}
128- return BlockSparseArrayInterface {N} (B (Val (N)))
133+ B′ = B (Val (N))
134+ return BlockSparseArrayInterface (B′)
129135end
130136function BlockSparseArrayInterface {N} () where {N}
131137 return BlockSparseArrayInterface {N} (DefaultArrayInterface {N} ())
@@ -134,6 +140,14 @@ BlockSparseArrayInterface(::Val{N}) where {N} = BlockSparseArrayInterface{N}()
134140BlockSparseArrayInterface {M} (:: Val{N} ) where {M,N} = BlockSparseArrayInterface {N} ()
135141BlockSparseArrayInterface () = BlockSparseArrayInterface {Any} ()
136142
143+ function DerivableInterfaces. combine_interface_rule (
144+ interface1:: AbstractBlockSparseArrayInterface ,
145+ interface2:: AbstractBlockSparseArrayInterface ,
146+ )
147+ B = interface (blockinterface (interface1), blockinterface (interface2))
148+ return BlockSparseArrayInterface (B)
149+ end
150+
137151@interface :: AbstractBlockSparseArrayInterface function BlockArrays. blocks (a:: AbstractArray )
138152 return error (" Not implemented" )
139153end
0 commit comments