I am upgrading the MixedModels
package to Julia v1.0 in the 0.7updates
branch. This package uses linear algebra operations on various types of matrix-like objects. What would previously be a method for a generic like Ac_mul_B!
should not be a method for *
in which the first argument is an Adjoint
type (or whatever is generated by the adjoint
method for the class).
My problems seem to stem from a misunderstanding of type signatures.
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.7.0 (2018-08-08 06:46 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> using LinearAlgebra, MixedModels
julia> trm = MatrixTerm(ones(10))
MatrixTerm{Float64,Array{Float64,2}}([1.0; 1.0; … ; 1.0; 1.0], [1.0; 1.0; … ; 1.0; 1.0], [1], 0, [""])
julia> typeof(trm')
Adjoint{Float64,MatrixTerm{Float64,Array{Float64,2}}}
julia> isa(trm', Adjoint{Float64,MatrixTerm{Float64}})
false
I’m not sure why the isa
call is false and what I should put in a method signature instead of Adjoint{T, MatrixTerm{T}}