Skip to content

Commit

Permalink
Merge pull request #3021 from JuliaReach/schillic/jrb
Browse files Browse the repository at this point in the history
Outsource auxiliary code to ReachabilityBase
  • Loading branch information
schillic authored Aug 3, 2022
2 parents 951e87e + 90d796a commit c7abd9b
Show file tree
Hide file tree
Showing 45 changed files with 189 additions and 2,367 deletions.
5 changes: 2 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ version = "1.59.1"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
GLPK = "60bf3e95-4087-53dc-ae20-288a0d20c6a6"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
ReachabilityBase = "379f33d0-9447-4353-bd03-d664070e549f"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Expand All @@ -19,9 +18,9 @@ SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
ExprTools = "0.1"
GLPK = "0.11 - 0.15, 1"
IntervalArithmetic = "0.15 - 0.20"
ReachabilityBase = "0.1"
JuMP = "0.21 - 0.23, 1"
RecipesBase = "0.6 - 0.8, 1"
Reexport = "0.2, 1"
Expand Down
3 changes: 1 addition & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include("init.jl")

makedocs(
sitename = "LazySets.jl",
modules = [LazySets, Approximations, Arrays, LazySets.Parallel],
modules = [LazySets, Approximations, LazySets.Parallel],
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true",
assets = ["assets/aligned.css"]),
pages = [
Expand Down Expand Up @@ -82,7 +82,6 @@ makedocs(
],
"Concrete Operations" => "lib/binary_functions.md",
"Conversions between set representations" => "lib/conversion.md",
"Comparisons" => "lib/comparisons.md",
"Approximations" => "lib/approximations.md",
"Utility Functions" => "lib/utils.md",
"Parallel" => "lib/parallel.md",
Expand Down
35 changes: 0 additions & 35 deletions docs/src/lib/comparisons.md

This file was deleted.

48 changes: 2 additions & 46 deletions docs/src/lib/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,6 @@ CurrentModule = LazySets

# Utility functions

## Arrays module

```@docs
Arrays
cross_product(::AbstractMatrix{N}) where {N<:Real}
nonzero_columns
dot_zero
hasfullrowrank
inner
is_cyclic_permutation
isinvertible
ismultiple
ispermutation
is_right_turn
issquare
nonzero_indices
remove_duplicates_sorted!
remove_zero_columns
right_turn
samedir
SingleEntryVector
to_negative_vector
_up
_dr
_above
minmax
arg_minmax
extend
projection_matrix
LazySets.Arrays._vector_type
LazySets.Arrays._matrix_type
LazySets.Arrays.allequal
LazySets.Arrays.distance(::AbstractVector, ::AbstractVector; ::Real=2.0)
LazySets.Arrays.same_sign
LazySets.Arrays.to_matrix
LazySets.Arrays._rationalize
```

## Functions and Macros

```@docs
Expand All @@ -53,34 +15,28 @@ sign_cadlag
_leq_trig
_random_zero_sum_vector
rectify
require(::Symbol)
require(::Vector{Symbol})
reseed
same_block_structure
substitute
substitute!
σ_helper
get_constrained_lowdimset
minmax
arg_minmax
@neutral
@absorbing
@neutral_absorbing
@declare_array_version
@array_neutral
@array_absorbing
@commutative
```

## Types

```@docs
CachedPair
StrictlyIncreasingIndices
```

## Inspection of set interfaces

```@docs
LazySets.subtypes(::Any, ::Bool)
implementing_sets
```

Expand Down
10 changes: 5 additions & 5 deletions src/Approximations/Approximations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ module Approximations
import IntervalArithmetic
const IA = IntervalArithmetic

using LazySets, LazySets.Arrays, Requires, LinearAlgebra, SparseArrays
using LazySets, ReachabilityBase.Arrays, Requires, LinearAlgebra, SparseArrays

using LazySets: _isapprox, _leq, _geq, _rtol, _normal_Vector, isapproxzero,
default_lp_solver, _isbounded_stiemke, require, dim, linprog,
is_lp_optimal
using ReachabilityBase.Comparison: _isapprox, _leq, _geq, _rtol, isapproxzero
using LazySets: default_lp_solver, _isbounded_stiemke, require, dim, linprog,
is_lp_optimal, _normal_Vector

import LazySets: project

using ..Assertions: @assert, activate_assertions
using ..LazySets: @assert, activate_assertions
# activate assertions by default
activate_assertions(Approximations)

Expand Down
10 changes: 5 additions & 5 deletions src/Approximations/template_directions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Box directions can be seen as the vectors where only one entry is ±1, and all
other entries are 0. In dimension ``n``, there are ``2n`` such directions.
The default vector representation used in this template is a
`LazySets.Arrays.SingleEntryVector`, although other implementations can be used
`ReachabilityBase.Arrays.SingleEntryVector`, although other implementations can be used
such as a regular `Vector` and a sparse vector, `SparseVector`.
### Examples
Expand All @@ -158,7 +158,7 @@ two,
```jldoctest dirs_Box
julia> dirs = BoxDirections(2)
BoxDirections{Float64, LazySets.Arrays.SingleEntryVector{Float64}}(2)
BoxDirections{Float64, ReachabilityBase.Arrays.SingleEntryVector{Float64}}(2)
julia> length(dirs)
4
Expand All @@ -169,14 +169,14 @@ i.e. a vector with only one non-zero element,
```jldoctest dirs_Box
julia> eltype(dirs)
LazySets.Arrays.SingleEntryVector{Float64}
ReachabilityBase.Arrays.SingleEntryVector{Float64}
```
In two dimensions, the directions defined by `BoxDirections` are normal to the
facets of a box.
```jldoctest dirs_Box
julia> collect(dirs)
4-element Vector{LazySets.Arrays.SingleEntryVector{Float64}}:
4-element Vector{ReachabilityBase.Arrays.SingleEntryVector{Float64}}:
[1.0, 0.0]
[0.0, 1.0]
[0.0, -1.0]
Expand All @@ -187,7 +187,7 @@ The numeric type can be specified as well:
```jldoctest
julia> BoxDirections{Rational{Int}}(10)
BoxDirections{Rational{Int64}, LazySets.Arrays.SingleEntryVector{Rational{Int64}}}(10)
BoxDirections{Rational{Int64}, ReachabilityBase.Arrays.SingleEntryVector{Rational{Int64}}}(10)
julia> length(ans)
20
Expand Down
23 changes: 0 additions & 23 deletions src/Arrays/Arrays.jl

This file was deleted.

67 changes: 0 additions & 67 deletions src/Arrays/SingleEntryVector.jl

This file was deleted.

Loading

0 comments on commit c7abd9b

Please sign in to comment.