Skip to content

Commit

Permalink
add source and line break
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Feb 14, 2024
1 parent d1b6f6c commit 7c0d336
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/ConcreteOperations/exact_sum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ Compute the exact sum of sparse polyomial zonotopes ``P₁`` and ``P₂``.
### Output
A `SparsePolynomialZonotope` representing the exact sum ``P₁ ⊞ P₂``.
### Algorithm
This method implements Proposition 3.1.20 in [1].
[1] Kochdumper, Niklas. *Extensions of polynomial zonotopes and their application
to verification of cyber-physical systems.* PhD diss., Technische Universität
München, 2022.
"""
function exact_sum(P1::SparsePolynomialZonotope, P2::SparsePolynomialZonotope)
indexvector(P1) == indexvector(P2) || throw(ArgumentError("the exact sum " *
"is currently only implemented for sparse polynomial zonotopes with " *
"the same index vector"))
if indexvector(P1) != indexvector(P2)
throw(ArgumentError("the exact sum is currently only implemented for " *
"sparse polynomial zonotopes with the same index vector"))
end

c = center(P1) + center(P2)
G = hcat(genmat_dep(P1), genmat_dep(P2))
Expand Down

0 comments on commit 7c0d336

Please sign in to comment.