From 3936b38e3a2a493238abc1afe60fe912ad745c87 Mon Sep 17 00:00:00 2001 From: schillic Date: Wed, 2 Nov 2022 22:01:17 +0100 Subject: [PATCH] revise QuadraticMap code --- src/LazyOperations/QuadraticMap.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/LazyOperations/QuadraticMap.jl b/src/LazyOperations/QuadraticMap.jl index 29e2238db3..a38a59d06e 100644 --- a/src/LazyOperations/QuadraticMap.jl +++ b/src/LazyOperations/QuadraticMap.jl @@ -27,12 +27,13 @@ struct QuadraticMap{N, S<:LazySet{N}, MVT<:AbstractVector{<:AbstractMatrix{N}}} X::S # default constructor with dimension match check - function QuadraticMap(Q::MVT, X::S) where {N, S<:LazySet{N}, MVT<:AbstractVector{<:AbstractMatrix{N}}} + function QuadraticMap(Q::MVT, X::S) where {N, S<:LazySet{N}, + MVT<:AbstractVector{<:AbstractMatrix{N}}} n = dim(X) @assert length(Q) == n "the number of matrices ($(length(Q))) needs " * "to match the dimension of the set ($n)" @assert all(M -> checksquare(M) == n, Q) "dimension mismatch in the " * - "matrices of the quadratic map applied to a set of size $n" + "matrices of the quadratic map applied to a set of dimension $n" return new{N, S, MVT}(Q, X) end end