@@ -17,7 +17,12 @@ using BlockArrays:
17
17
blocks,
18
18
findblockindex
19
19
using DerivableInterfaces:
20
- DerivableInterfaces, @interface , AbstractArrayInterface, DefaultArrayInterface, zero!
20
+ DerivableInterfaces,
21
+ @interface ,
22
+ AbstractArrayInterface,
23
+ DefaultArrayInterface,
24
+ interface,
25
+ zero!
21
26
using LinearAlgebra: Adjoint, Transpose
22
27
using SparseArraysBase:
23
28
AbstractSparseArrayInterface,
@@ -125,7 +130,8 @@ function BlockSparseArrayInterface{N}(blockinterface::AbstractArrayInterface{N})
125
130
return BlockSparseArrayInterface {N,typeof(blockinterface)} (blockinterface)
126
131
end
127
132
function 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′)
129
135
end
130
136
function BlockSparseArrayInterface {N} () where {N}
131
137
return BlockSparseArrayInterface {N} (DefaultArrayInterface {N} ())
@@ -134,6 +140,14 @@ BlockSparseArrayInterface(::Val{N}) where {N} = BlockSparseArrayInterface{N}()
134
140
BlockSparseArrayInterface {M} (:: Val{N} ) where {M,N} = BlockSparseArrayInterface {N} ()
135
141
BlockSparseArrayInterface () = BlockSparseArrayInterface {Any} ()
136
142
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
+
137
151
@interface :: AbstractBlockSparseArrayInterface function BlockArrays. blocks (a:: AbstractArray )
138
152
return error (" Not implemented" )
139
153
end
0 commit comments