From 1f1a5ebf37c05e48e6d8693b10d3f9e986c88278 Mon Sep 17 00:00:00 2001 From: OlivierHnt <38465572+OlivierHnt@users.noreply.github.com> Date: Sat, 14 Sep 2024 12:51:38 -0400 Subject: [PATCH] Add `reverse`/`reverse!` for `Sequence` --- src/sequence_spaces/sequence.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sequence_spaces/sequence.jl b/src/sequence_spaces/sequence.jl index e27f0acb..b919a301 100644 --- a/src/sequence_spaces/sequence.jl +++ b/src/sequence_spaces/sequence.jl @@ -88,6 +88,10 @@ function Base.fill!(a::Sequence, value) return a end +Base.reverse(a::Sequence; dims = :) = Sequence(space(a), reverse(coefficients(a); dims = dims)) + +Base.reverse!(a::Sequence; dims = :) = Sequence(space(a), reverse!(coefficients(a); dims = dims)) + Base.copy(a::Sequence) = Sequence(space(a), copy(coefficients(a))) Base.similar(a::Sequence) = Sequence(space(a), similar(coefficients(a)))