# Symmetric interval hull (SymmetricIntervalHull)

`LazySets.SymmetricIntervalHull`

— Type`SymmetricIntervalHull{N, S<:LazySet{N}} <: AbstractHyperrectangle{N}`

Type that represents the symmetric interval hull of a compact set.

**Fields**

`X`

– compact set`cache`

– partial storage of already computed bounds, organized as mapping from the dimension to the bound value

**Notes**

The symmetric interval hull can be computed with $2n$ support-function queries (of unit vectors), where $n$ is the dimension of the wrapped set (i.e., two queries per dimension). When asking for the support vector (or support function) in a direction $d$, one needs $2k$ such queries, where $k$ is the number of non-zero entries in $d$.

However, if one asks for many support vectors (or support-function evaluations) in a loop, the number of computations may exceed $2n$. To be most efficient in such cases, this type stores the intermediately computed bounds in the `cache`

field.

The set `X`

must be bounded. The flag `check_boundedness`

(which defaults to `true`

) can be used to elide the boundedness check in the inner constructor. Misuse of this flag can result in incorrect behavior.

The symmetric interval hull of a set is a hyperrectangle centered in the origin, which in particular is convex.

An alias for this function is `⊡`

.

`LazySets.:⊡`

— Type`⊡`

Alias for `SymmetricIntervalHull`

.

`LazySets.dim`

— Method`dim(sih::SymmetricIntervalHull)`

Return the dimension of the symmetric interval hull of a set.

**Input**

`sih`

– symmetric interval hull of a set

**Output**

The ambient dimension of the symmetric interval hull of a set.

`LazySets.σ`

— Method`σ(d::AbstractVector, sih::SymmetricIntervalHull)`

Return a support vector of the symmetric interval hull of a set in a given direction.

**Input**

`d`

– direction`sih`

– symmetric interval hull of a set

**Output**

A support vector of the symmetric interval hull of a set in the given direction. If the direction has norm zero, the origin is returned.

**Algorithm**

For each non-zero entry in `d`

we need to either look up the bound (if it has been computed before) or compute it, in which case we store it for future queries.

`LazySets.center`

— Method`center(sih::SymmetricIntervalHull{N}, i::Int) where {N}`

Return the center along a given dimension of the symmetric interval hull of a set.

**Input**

`sih`

– symmetric interval hull of a set`i`

– dimension of interest

**Output**

The center along a given dimension of the symmetric interval hull of a set.

`LazySets.center`

— Method`center(sih::SymmetricIntervalHull{N}) where {N}`

Return the center of the symmetric interval hull of a set.

**Input**

`sih`

– symmetric interval hull of a set

**Output**

The origin.

`LazySets.radius_hyperrectangle`

— Method`radius_hyperrectangle(sih::SymmetricIntervalHull)`

Return the box radius of the symmetric interval hull of a set in every dimension.

**Input**

`sih`

– symmetric interval hull of a set

**Output**

The box radius of the symmetric interval hull of a set.

**Notes**

This function computes the symmetric interval hull explicitly.

`LazySets.radius_hyperrectangle`

— Method`radius_hyperrectangle(sih::SymmetricIntervalHull, i::Int)`

Return the box radius of the symmetric interval hull of a set in a given dimension.

**Input**

`sih`

– symmetric interval hull of a set`i`

– dimension of interest

**Output**

The radius in the given dimension.

**Notes**

If the radius was computed before, this is just a look-up. Otherwise it is computed.

Inherited from `LazySet`

:

Inherited from `AbstractPolytope`

:

Inherited from `AbstractCentrallySymmetricPolytope`

:

Inherited from `AbstractZonotope`

:

Inherited from `AbstractHyperrectangle`

: