From cbc556a281d3bdde46c0d9856820fdd142bc09d6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 15 Aug 2019 02:17:02 +1000 Subject: [PATCH] use AbstractVector instead of Vector --- src/Properties/BadStatesProperty.jl | 2 +- src/Properties/Conjunction.jl | 2 +- src/Properties/Disjunction.jl | 2 +- src/Properties/SafeStatesProperty.jl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Properties/BadStatesProperty.jl b/src/Properties/BadStatesProperty.jl index 5b330590..f451b3f4 100644 --- a/src/Properties/BadStatesProperty.jl +++ b/src/Properties/BadStatesProperty.jl @@ -71,7 +71,7 @@ Let ``Y`` be the bad states represented by 𝑃. return isdisjoint(X, 𝑃.bad, witness) end -@inline function project(𝑃::BadStatesProperty, vars::Vector{Int}) +@inline function project(𝑃::BadStatesProperty, vars::AbstractVector{Int}) proj = project(𝑃.bad, vars) return BadStatesProperty(proj) end diff --git a/src/Properties/Conjunction.jl b/src/Properties/Conjunction.jl index 67c7ec4a..13b5c038 100644 --- a/src/Properties/Conjunction.jl +++ b/src/Properties/Conjunction.jl @@ -76,6 +76,6 @@ function check(𝑃::Conjunction, X::LazySet{N}; return witness ? (true, N[]) : true end -function project(𝑃::Conjunction, vars::Vector{Int}) +@inline function project(𝑃::Conjunction, vars::AbstractVector{Int}) return Conjunction([project(conjunct, vars) for conjunct in 𝑃.conjuncts]) end diff --git a/src/Properties/Disjunction.jl b/src/Properties/Disjunction.jl index 49925e4b..a4a40dd7 100644 --- a/src/Properties/Disjunction.jl +++ b/src/Properties/Disjunction.jl @@ -115,6 +115,6 @@ function _reorder!(𝑃::Disjunction, i::Int) return nothing end -function project(𝑃::Disjunction, vars::Vector{Int}) +@inline function project(𝑃::Disjunction, vars::AbstractVector{Int}) return Disjunction([project(disjunct, vars) for disjunct in 𝑃.disjuncts]) end diff --git a/src/Properties/SafeStatesProperty.jl b/src/Properties/SafeStatesProperty.jl index 4acfcd75..d8c6d2a5 100644 --- a/src/Properties/SafeStatesProperty.jl +++ b/src/Properties/SafeStatesProperty.jl @@ -71,7 +71,7 @@ Let ``Y`` be the safe states represented by 𝑃. return ⊆(X, 𝑃.safe, witness) end -@inline function project(𝑃::SafeStatesProperty, vars::Vector{Int}) +@inline function project(𝑃::SafeStatesProperty, vars::AbstractVector{Int}) proj = project(𝑃.safe, vars) return SafeStatesProperty(proj) end