Skip to content

adjoint of a Composite #312

@mzgubic

Description

@mzgubic
julia> c = Composite{Adjoint{Float64,Array{Float64,2}}}(parent = [-1.8280580596976814 0.2779228276891495; 1.0080661406609885 -1.7102674963647622],)

julia> c'
ERROR: MethodError: no method matching adjoint(::Composite{Adjoint{Float64,Array{Float64,2}},NamedTuple{(:parent,),Tuple{Array{Float64,2}}}})
Closest candidates are:
  adjoint(::Missing) at missing.jl:100
  adjoint(::Number) at number.jl:169
  adjoint(::Adjoint{var"#s173",var"#s172"} where var"#s172"<:Union{StaticArrays.StaticArray{Tuple{N},T,1} where T where N, StaticArrays.StaticArray{Tuple{N,M},T,2} where T where M where N} where var"#s173") at /Users/mzgubic/.julia/packages/StaticArrays/NTbHj/src/linalg.jl:73
  ...
Stacktrace:
 [1] top-level scope at REPL[51]:1

Since adjoint is a linear operator there is no reason not to define adjoint on Composites, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Structural TangentRelated to the `Tangent` type for structured (composite) valuesdesignRequires some desgin before changes are made

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions