diff --git a/CHANGELOG.md b/CHANGELOG.md index 0467046..b100277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ Changelog for StateSpaceSets.jl is kept w.r.t. version 1.3 +# 2.2 + +- Allow construction of `StateSpaceSet`s from existing `StateSpaceSet`s (this just calls `hcat` under the hood). + # 2.1 It is allowed to make `StateSpaceSet` with points of arbitrary `eltype` now. diff --git a/Project.toml b/Project.toml index c468523..ffbe402 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "StateSpaceSets" uuid = "40b095a5-5852-4c12-98c7-d43bf788e795" authors = ["George Datseris "] repo = "https://github.com/JuliaDynamics/StateSpaceSets.jl.git" -version = "2.1.2" +version = "2.2.0" [deps] Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" diff --git a/src/statespaceset_concrete.jl b/src/statespaceset_concrete.jl index ddf5e2c..fa26c93 100644 --- a/src/statespaceset_concrete.jl +++ b/src/statespaceset_concrete.jl @@ -83,6 +83,11 @@ function StateSpaceSet(v::Vector{V}; container = SVector) where {V<:AbstractVect return StateSpaceSet{n,t,U}(u) end +# Concatenating existing state space sets +function StateSpaceSet(xs::AbstractStateSpaceSet...) + return hcat(xs...) +end + ########################################################################### # StateSpaceSet(Vectors of stuff) ########################################################################### diff --git a/test/ssset_tests.jl b/test/ssset_tests.jl index ee291a7..3b08677 100644 --- a/test/ssset_tests.jl +++ b/test/ssset_tests.jl @@ -10,10 +10,13 @@ s = StateSpaceSet(o) x = rand(10) y = rand(10) z = rand(10, 4) - + w = rand(10, 2) s1 = StateSpaceSet(x) s2 = StateSpaceSet(x, y) s3 = StateSpaceSet(z) + s4 = StateSpaceSet(w) + + @test dimension(StateSpaceSet(s3, s4)) == 6 for (i, q) in enumerate((s1, s2, s, s3)) @test dimension(q) == i