Skip to content

Commit

Permalink
replace fixedsizearrays by staticarrays
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentcp committed Apr 5, 2018
1 parent 0e542ed commit ad32ac8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Plots
Reexport
RecipesBase
FixedSizeArrays
StaticArrays
6 changes: 3 additions & 3 deletions src/sequences/compactsequences.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ A FixedSequence has a fixed length `L` starting at a certain offset `OFS`.
It contains its values in a fixed size array.
"""
struct FixedSequence{L,OFS,T} <: Sequence
a :: Vec{L,T}
a :: SVector{L,T}
end

FixedSequence{L,T,OFS}(a::Vec{L,T}, ::Type{Val{OFS}}) = FixedSequence{L,OFS,T}(a)
FixedSequence{L,T,OFS}(a::SVector{L,T}, ::Type{Val{OFS}}) = FixedSequence{L,OFS,T}(a)

# type unstable constructor
FixedSequence(a::AbstractVector, offset = 0) = FixedSequence(Vec(a...), Val{offset})
FixedSequence(a::AbstractVector, offset = 0) = FixedSequence(SVector(a...), Val{offset})

# type unstable constructor
FixedSequence(s::CompactSequence) = FixedSequence(s.a, s.offset)
Expand Down
5 changes: 2 additions & 3 deletions src/sequences/sequence.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# sequence.jl

module Sequences

using FixedSizeArrays
using StaticArrays

import Base: eltype, getindex, setindex!, eachindex, collect

Expand Down Expand Up @@ -129,7 +128,7 @@ end
(f::ZTransform)(z) = ztransform(z.seq, z)

"FourierTransform is a wrapper type for the `fouriertransform` function."
struct FourierTransform{S}
struct FourierTransform{S}
seq :: S
end

Expand Down

0 comments on commit ad32ac8

Please sign in to comment.