Skip to content

Kronecker power for integer one #136

@Wu-Chenyang

Description

@Wu-Chenyang
struct KroneckerPower{T,TA<:AbstractMatrix{T}} <: AbstractKroneckerProduct{T}
    A::TA
    pow::Int
    function KroneckerPower(A::AbstractMatrix, pow::Integer)
        @assert pow  2 "KroneckerPower only makes sense for powers greater than 1"
        return new{eltype(A),typeof(A)}(A, Int(pow))
    end
end

Currently, the Kronecker power is only implemented for integers greater than one, but isn't it natural to have M⊗1 equal to M?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions