Skip to content

Commit

Permalink
Add rate method
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Nov 5, 2024
1 parent 5fbc54a commit 6fd9ecd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sequence_spaces/norm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ Ell1() = Ell1{IdentityWeight}(IdentityWeight())
Ell1(weight::Weight...) = Ell1(weight)

weight(X::Ell1) = X.weight
rate(X::Ell1{<:Weight}) = rate(weight(X))
rate(X::Ell1{<:Tuple{Vararg{Weight}}}) = rate.(weight(X))

"""
ℓ¹(::Weight)
Expand Down Expand Up @@ -530,6 +532,8 @@ Ell2() = Ell2{IdentityWeight}(IdentityWeight())
Ell2(weight::Weight...) = Ell2(weight)

weight(X::Ell2) = X.weight
rate(X::Ell2{<:Weight}) = rate(weight(X))
rate(X::Ell2{<:Tuple{Vararg{Weight}}}) = rate.(weight(X))

"""
ℓ²(::Weight)
Expand Down Expand Up @@ -598,6 +602,8 @@ EllInf() = EllInf{IdentityWeight}(IdentityWeight())
EllInf(weight::Weight...) = EllInf(weight)

weight(X::EllInf) = X.weight
rate(X::EllInf{<:Weight}) = rate(weight(X))
rate(X::EllInf{<:Tuple{Vararg{Weight}}}) = rate.(weight(X))

"""
ℓ∞(::Weight)
Expand Down

0 comments on commit 6fd9ecd

Please sign in to comment.