From 097cef8f7c37b1ecb3393b4111db38638821ecfe Mon Sep 17 00:00:00 2001 From: Daan Huybrechs Date: Tue, 7 Apr 2026 00:07:30 +0200 Subject: [PATCH 1/2] remove deprecations and exports --- src/maps_imports.jl | 114 -------------------------------------------- 1 file changed, 114 deletions(-) delete mode 100644 src/maps_imports.jl diff --git a/src/maps_imports.jl b/src/maps_imports.jl deleted file mode 100644 index 2d8ab77..0000000 --- a/src/maps_imports.jl +++ /dev/null @@ -1,114 +0,0 @@ - -# In this file we list all functions defined in FunctionMaps that -# were defined in the namespace of DomainSets - -using FunctionMaps: - MapRef, - # canonical.jl - CanonicalType, CanonicalExtensionType, - canonicalextensiontype, - Equal, Equivalent, - # composite.jl - ComposedMap, similarmap, codomaintype, applymap, - applymap_rec, mapsize, jacobian, backpropagate, - inverse, leftinverse, rightinverse, - leftinverse_rec, rightinverse_rec, - composedmap, - isequalmap, map_hash, - MulMap, multiply_map, multiply_map1, multiply_map2, - SumMap, sum_map, sum_map1, sum_map2, - composite_jacobian, - mul_jacobian, sum_jacobian, - # inverse.jl - LazyInverse, implements_inverse, - # isomorhpism - Isomorphism, VectorToNumber, NumberToVector, - VectorToComplex, ComplexToVector, - VectorToTuple, TupleToVector, - NestedToFlat, FlatToNested, - # jacobian.jl - LazyJacobian, DeterminantMap, determinantmap, jacdet, - AbsMap, absmap, - LazyDiffVolume, diffvolume, - NumberLike, - to_matrix, to_vector, zeromatrix, zerovector, identitymatrix, - # lazy.jl - LazyMap, CompositeLazyMap, SimpleLazyMap, - supermap, - DerivedMap, WrappedMap, - # map.jl - Map, TypedMap, EuclideanMap, VectorMap, - domaintype, codomaintype, prectype, numtype, - convert_domaintype, convert_codomaintype, convert_prectype, convert_numtype, - promote_map_point_pair, - promote_and_apply, promote_maps, - isvectorvalued_type, isvectorvalued, - issquaremap, isoverdetermined, isunderdetermined, - isrealmap, - is_scalar_to_vector, is_scalar_to_scalar, - is_vector_to_scalar, is_vector_to_vector, - isequalmap1, isequalmap2, default_isequalmap, - map_stencil, map_stencil_broadcast, - # product.jl - ProductMap, VcatMapElement, - compatibleproductdims, - tointernalpoint, toexternalpoint, - productmap, productmap1, productmap2, - VcatMap, size_as_matrix, toexternalmatrix, - VectorProductMap, TupleProductMap, - # affine.jl - AbstractAffineMap, - unsafe_matrix, unsafe_vector, - affinematrix, affinevector, - applymap!, - islinearmap, isaffinemap, - LinearMap, GenericLinearMap, ScalarLinearMap, - VectorLinearMap, StaticLinearMap, - Translation, ScalarTranslation, StaticTranslation, - VectorTranslation, GenericTranslation, - AffineMap, GenericAffineMap, ScalarAffineMap, - VectorAffineMap, StaticAffineMap, - # arithmetics.jl - affine_composition, - interval_map, bounded_interval_map, - # basic.jl - IdentityMap, isidentitymap, - StaticIdentityMap, DynamicIdentityMap, - EuclideanIdentityMap, VectorIdentityMap, - ConstantMap, isconstantmap, mapconstant, - ZeroMap, UnityMap, FixedConstantMap, - # coordinates.jl - CartToPolarMap, PolarToCartMap, - UnitCircleMap, AngleMap, UnitDiskMap, - # common.jl - isrealtype, - StaticTypes, - hashrec, - euclideandimension, - convert_eltype, promotable_eltypes, - prectype, convert_prectype, to_prectype, promote_prectype, - numtype, convert_numtype, to_numtype, promote_numtype, - convert_fromcartesian, convert_tocartesian, - factors, nfactors, factor - -import FunctionMaps: - convert_eltype, - convert_prectype, - convert_numtype, - prectype, - numtype, - factors, - tointernalpoint, toexternalpoint, compatibleproductdims - -# Deprecations for symbols that were renamed in FunctionMaps.jl -const AbstractMap = Map -@deprecate isreal(::Type{T}) where {T} isrealtype(T) -@deprecate isreal(m::Map) isrealmap(m) -@deprecate islinear(m::Map) islinearmap(m) -@deprecate isaffine(m::Map) isaffinemap(m) -@deprecate isidentity(m::Map) isidentitymap(m) -@deprecate isconstant(m::Map) isconstantmap(m) -@deprecate constant(m::Map) mapconstant(m) -@deprecate matrix(m::Map) affinematrix(m) -@deprecate vector(m::Map) affinevector(m) -@deprecate mapdim(m::Map) mapsize(m, 2) From 493a079dba5c8207759f586d69d763087ebad2ab Mon Sep 17 00:00:00 2001 From: Daan Huybrechs Date: Tue, 7 Apr 2026 00:40:01 +0200 Subject: [PATCH 2/2] clean exports internally --- src/DomainSets.jl | 74 +++++++++++++++++------------------- src/deprecated.jl | 43 --------------------- src/domains/complex.jl | 10 +++-- src/domains/interval.jl | 2 +- src/domains/trivial.jl | 4 +- src/generic/broadcast.jl | 2 +- src/generic/canonical.jl | 4 +- src/generic/mapped.jl | 6 +-- src/generic/productdomain.jl | 9 ++--- test/aqua.jl | 6 +-- test/runtests.jl | 2 +- test/test_applications.jl | 2 + test/test_canonical.jl | 11 +----- test/test_domain_ball.jl | 4 +- test/test_domain_product.jl | 12 +++--- 15 files changed, 68 insertions(+), 123 deletions(-) diff --git a/src/DomainSets.jl b/src/DomainSets.jl index cafbc85..f3eb067 100644 --- a/src/DomainSets.jl +++ b/src/DomainSets.jl @@ -15,14 +15,24 @@ import Base: # Set operations setdiff, in, isempty, issubset, intersect, union, &, \, # Arrays - eltype, hash, isreal, + eltype, hash, # Types, promotions and conversions convert, promote, - # for maps (both deprecated and to be removed) - size, inv, # Display show +import FunctionMaps: + convert_eltype, + convert_prectype, + convert_numtype, + prectype, + numtype, + factors, + isrealtype, + tointernalpoint, + toexternalpoint, + compatibleproductdims + import CompositeTypes: component, components import IntervalSets: (..), endpoints, Domain, AbstractInterval, TypedEndpointsInterval, @@ -31,9 +41,27 @@ import IntervalSets: (..), endpoints, Domain, AbstractInterval, TypedEndpointsIn infimum, supremum export .. -# to be removed in breaking version 0.8 -import LinearAlgebra: cross, ×, pinv - +using FunctionMaps: + CanonicalType, + Equal, + AbstractAffineMap, + GenericLinearMap, + GenericAffineMap, + interval_map, + UnitCircleMap, + AngleMap, + UnitDiskMap, + StaticTypes, + hashrec, + euclideandimension, + convert_eltype, + promotable_eltypes, + promote_prectype, + promote_numtype, + convert_fromcartesian, + convert_tocartesian, + nfactors, + factor ################################ ## Exhaustive list of exports @@ -47,36 +75,6 @@ export prectype, numtype, convert_prectype, promote_prectype, iscomposite, component, components, ncomponents -## Maps - -include("maps_imports.jl") - -# from maps/map.jl -export AbstractMap, Map, MapRef, TypedMap, - applymap, isequalmap, - domaintype, codomaintype, - inverse, leftinverse, rightinverse, - mapsize, mapdim, # mapdim is deprecated - jacobian, jacdet, diffvolume, - isrealmap -# from maps/composite.jl -export ComposedMap, composedmap -# from maps/product.jl -export ProductMap, productmap -# from maps/basic.jl -export IdentityMap, - StaticIdentityMap, VectorIdentityMap, - ZeroMap, UnityMap, ConstantMap, - isconstant, constant, # deprecated - isconstantmap, mapconstant, - isidentity, isidentitymap # isidentity is deprecated -# from maps/affine.jl -export AffineMap, Translation, LinearMap, - affinematrix, affinevector, - matrix, vector, # deprecated aliases - islinear, isaffine, # deprecated - islinearmap, isaffinemap - ## Generic domains # from generic/domain.jl @@ -178,10 +176,6 @@ export LevelSet, ZeroSet, # from domain/indicator.jl export IndicatorFunction -## Applications -# from applications/rotation.jl -export rotation_map, - CartToPolarMap, PolarToCartMap include("util/common.jl") diff --git a/src/deprecated.jl b/src/deprecated.jl index d710255..e69de29 100644 --- a/src/deprecated.jl +++ b/src/deprecated.jl @@ -1,43 +0,0 @@ - -@deprecate convert_prectype(d::Domain, ::Type{T}) where {T} convert_prectype(T, d) -@deprecate convert_numtype(d::Domain, ::Type{T}) where {T} convert_numtype(T, d) - -@deprecate point_in_domain(d) choice(d) - -@deprecate broadcast_in(A, d::Domain) vectorized_in(A, d) -@deprecate broadcast_approx_in(A, d::Domain) vectorized_approx_in(A, d) -@deprecate broadcast_approx_in(A, d::Domain, tol) vectorized_approx_in(A, d, tol) - -@deprecate UnionDomain(domain::Domain) UnionDomain((domain,)) -@deprecate UnionDomain{T}(domain::Domain) where {T} UnionDomain{T}((domain,)) -@deprecate IntersectDomain(domain::Domain) IntersectDomain((domain,)) -@deprecate IntersectDomain{T}(domain::Domain) where T IntersectDomain((domain,)) - -@deprecate issubset(d1::AnyDomain, d2) issubset(d1, DomainRef(d2)) -@deprecate union(d1::AnyDomain, d2, domains...) union(d1, DomainRef(d2), domains...) -@deprecate union(d1, d2::AnyDomain, domains...) union(DomainRef(d1), d2, domains...) -@deprecate intersect(d1, d2::AnyDomain) intersect(DomainRef(d1), d2) -@deprecate intersect(d1::AnyDomain, d2) intersect(d1, DomainRef(d2)) -@deprecate \(d1::AnyDomain, d2) d1 \ DomainRef(d2) -@deprecate \(d1, d2::AnyDomain) DomainRef(d1) \ d2 -@deprecate setdiff(d1::AnyDomain, d2) setdiff(d1, DomainRef(d2)) -@deprecate setdiff(d1, d2::AnyDomain) setdiff(DomainRef(d1), d2) -@deprecate (&)(d1::AnyDomain, d2) d1 & DomainRef(d2) -@deprecate (&)(d1, d2::AnyDomain) DomainRef(d1) & d2 - -@deprecate isequal1(d1,d2) isequaldomain1(d1,d2) -@deprecate isequal2(d1,d2) isequaldomain2(d1,d2) - -# AsDomain was defined in versions 0.7 and 0.7.1, and then replaced by DomainRef -@deprecate AsDomain(d) DomainRef(d) - -@deprecate inv(m::AbstractMap) inverse(m) - -@deprecate size(m::AbstractMap) mapsize(m) -@deprecate size(m::AbstractMap, i) mapsize(m, i) -@deprecate issquare(m::AbstractMap) issquaremap(m) - -# Added in v0.7.17, to be removed in v0.8 -@deprecate isreal(d::Domain) isrealdomain(d) -LinearAlgebra.cross(d1::Domain, domains...) = linearalgebra_x_becomes_domainsets_x(d1, domains...) -@deprecate linearalgebra_x_becomes_domainsets_x(d1::Domain, domains...) cartesianproduct(d1, domains...) diff --git a/src/domains/complex.jl b/src/domains/complex.jl index a9de5d4..42daec6 100644 --- a/src/domains/complex.jl +++ b/src/domains/complex.jl @@ -33,14 +33,16 @@ show(io::IO, d::ComplexUnitDisk{T,:open}) where {T} = print(io, "ComplexUnitDisk canonicaldomain(::Parameterization, d::ComplexUnitCircle{T}) where {T} = UnitInterval{T}() mapfrom_canonical(::Parameterization, d::ComplexUnitCircle{T}) where {T} = - VectorToComplex{T}() ∘ UnitCircleMap{T}() + FunctionMaps.VectorToComplex{T}() ∘ UnitCircleMap{T}() canonicaldomain(::Isomorphic, d::ComplexUnitCircle{T}) where {T} = UnitCircle{T}() -mapfrom_canonical(::Isomorphic, d::ComplexUnitCircle{T}) where {T} = VectorToComplex{T}() +mapfrom_canonical(::Isomorphic, d::ComplexUnitCircle{T}) where {T} = + FunctionMaps.VectorToComplex{T}() canonicaldomain(::Parameterization, d::ComplexUnitDisk{T}) where {T} = UnitSquare{T}() mapfrom_canonical(::Parameterization, d::ComplexUnitDisk{T}) where {T} = - VectorToComplex{T}() ∘ UnitDiskMap{T}() + FunctionMaps.VectorToComplex{T}() ∘ UnitDiskMap{T}() canonicaldomain(::Isomorphic, d::ComplexUnitDisk{T}) where {T} = UnitCircle{T}() -mapfrom_canonical(::Isomorphic, d::ComplexUnitDisk{T}) where {T} = VectorToComplex{T}() +mapfrom_canonical(::Isomorphic, d::ComplexUnitDisk{T}) where {T} = + FunctionMaps.VectorToComplex{T}() diff --git a/src/domains/interval.jl b/src/domains/interval.jl index dd4d6da..625b803 100644 --- a/src/domains/interval.jl +++ b/src/domains/interval.jl @@ -149,7 +149,7 @@ identitymap(d::TypedEndpointsInterval{L,R,T}) where {L,R,T<:Integer} = IdentityM canonicaldomain(d::TypedEndpointsInterval{:closed,:closed,T}) where {T} = ChebyshevInterval{T}() mapfrom_canonical(d::TypedEndpointsInterval{:closed,:closed}) = - bounded_interval_map(-1, 1, endpoints(d)...) + FunctionMaps.bounded_interval_map(-1, 1, endpoints(d)...) canonicaldomain(d::FixedInterval) = d canonicaldomain(ctype::Equal, d::FixedInterval) = d diff --git a/src/domains/trivial.jl b/src/domains/trivial.jl index 5afc18f..7bfbe19 100644 --- a/src/domains/trivial.jl +++ b/src/domains/trivial.jl @@ -51,9 +51,9 @@ isequaldomain2(d1, d2::EmptySpace) = isempty(d1) domainhash(d::EmptySpace, h::UInt) = hash("EmptySpace", h) mapto1(d1::EmptySpace{T}, d2) where {T} = - isempty(d2) ? StaticIdentityMap{T}() : throw(ArgumentError("Can't map empty to non-empty domain")) + isempty(d2) ? IdentityMap{T}() : throw(ArgumentError("Can't map empty to non-empty domain")) mapto2(d1, d2::EmptySpace{T}) where {T} = - isempty(d1) ? StaticIdentityMap{T}() : throw(ArgumentError("Can't map non-empty to empty domain")) + isempty(d1) ? IdentityMap{T}() : throw(ArgumentError("Can't map non-empty to empty domain")) """ diff --git a/src/generic/broadcast.jl b/src/generic/broadcast.jl index 0bdc6f1..06b6077 100644 --- a/src/generic/broadcast.jl +++ b/src/generic/broadcast.jl @@ -41,7 +41,7 @@ broadcasted(::DomainSetStyle, ::typeof(/), d::AnyDomain, a::Number) = broadcasted(::DomainSetStyle, ::typeof(\), a::Number, d::AnyDomain) = mapped_domain(LinearMap(a), domain(d)) -broadcasted(::DomainSetStyle, m::AbstractMap, d::AnyDomain) = +broadcasted(::DomainSetStyle, m::Map, d::AnyDomain) = map_domain(m, domain(d)) broadcasted(::DomainSetStyle, fun::Function, d::AnyDomain) = diff --git a/src/generic/canonical.jl b/src/generic/canonical.jl index b71e9d3..6efd4a8 100644 --- a/src/generic/canonical.jl +++ b/src/generic/canonical.jl @@ -141,12 +141,12 @@ mapto_canonical(::Isomorphic, d) = leftinverse(mapfrom_canonical(Isomorphic(), d canonicaldomain(::Isomorphic, d::Domain{<:StaticVector{1,T}}) where {T} = convert(Domain{T}, d) mapfrom_canonical(::Isomorphic, d::Domain{<:StaticVector{1,T}}) where {T} = - NumberToVector{T}() + FunctionMaps.NumberToVector{T}() canonicaldomain(::Isomorphic, d::Domain{NTuple{N,T}}) where {N,T} = convert(Domain{SVector{N,T}}, d) mapfrom_canonical(::Isomorphic, d::Domain{NTuple{N,T}}) where {N,T} = - VectorToTuple{N,T}() + FunctionMaps.VectorToTuple{N,T}() diff --git a/src/generic/mapped.jl b/src/generic/mapped.jl index 5f09a66..6904069 100644 --- a/src/generic/mapped.jl +++ b/src/generic/mapped.jl @@ -37,7 +37,7 @@ corners(d::AbstractMappedDomain) = [forward_map(d, x) for x in corners(superdoma show(io::IO, mime::MIME"text/plain", d::AbstractMappedDomain) = composite_show(io, mime, d) Display.displaystencil(d::AbstractMappedDomain) = - map_stencil_broadcast(forward_map(d), superdomain(d)) + FunctionMaps.map_stencil_broadcast(forward_map(d), superdomain(d)) Display.object_parentheses(d::AbstractMappedDomain) = FunctionMaps.map_object_parentheses(forward_map(d)) Display.stencil_parentheses(d::AbstractMappedDomain) = @@ -56,7 +56,7 @@ _promote_map_domain_pair(map, domain, ::Type{T}, ::Type{T}) where T = map, domai _promote_map_domain_pair(map, domain, ::Type{S}, ::Type{T}) where {S,T} = _promote_map_domain_pair(map, domain, S, T, promote_type(S,T)) _promote_map_domain_pair(map, domain, ::Type{S}, ::Type{T}, ::Type{U}) where {S,T,U} = - convert_codomaintype(U, map), convert_eltype(U, domain) + FunctionMaps.convert_codomaintype(U, map), convert_eltype(U, domain) _promote_map_domain_pair(map, domain, ::Type{Any}, ::Type{T}, ::Type{Any}) where T = map, domain _promote_map_domain_pair(map, domain, ::Type{S}, ::Type{Any}, ::Type{Any}) where S = @@ -86,7 +86,7 @@ _MappedDomain(invmap, domain) = _MappedDomainT(mapped_domain_eltype(invmap,domain), invmap, domain) MappedDomain{T}(invmap, domain) where T = - _MappedDomainT(T, convert_domaintype(T, invmap), convert_eltype(T, domain)) + _MappedDomainT(T, FunctionMaps.convert_domaintype(T, invmap), convert_eltype(T, domain)) _MappedDomainT(::Type{T}, invmap, domain) where T = MappedDomain{T,typeof(invmap),typeof(domain)}(invmap, domain) diff --git a/src/generic/productdomain.jl b/src/generic/productdomain.jl index b863252..c52f725 100644 --- a/src/generic/productdomain.jl +++ b/src/generic/productdomain.jl @@ -121,8 +121,7 @@ julia> (0..1) × (2..3) ```` """ cartesianproduct(d...) = productdomain(d...) -# To be activated in v0.8: -# × = cartesianproduct +× = cartesianproduct Base.:^(d::Domain, n::Int) = productdomain(ntuple(i->d, n)...) @@ -152,12 +151,12 @@ end # multiplication with a scalar number function map_domain(linmap::GenericLinearMap{<:StaticVector{N,S},A}, domain::ProductDomain{<:StaticVector{N,T}}) where {N,S,T,A<:Number} - c = unsafe_matrix(linmap) + c = FunctionMaps.unsafe_matrix(linmap) ProductDomain{SVector{N,promote_type(S,T)}}(map(d -> c .* d, components(domain))) end function map_domain(transmap::Translation{<:StaticVector{N,S}}, domain::ProductDomain{<:StaticVector{N,T}}) where {N,S,T} - vec = unsafe_vector(transmap) + vec = FunctionMaps.unsafe_vector(transmap) ProductDomain{SVector{N,promote_type(S,T)}}( map( (d,v) -> d .+ v, components(domain), tointernalpoint(domain, vec))) end @@ -258,4 +257,4 @@ end TupleProductDomain{T}(domains::Tuple) where {T} = TupleProductDomain{T,typeof(domains)}(domains) -matching_product_map(d::TupleProductDomain, maps) = TupleProductMap(maps) +matching_product_map(d::TupleProductDomain, maps) = FunctionMaps.TupleProductMap(maps) diff --git a/test/aqua.jl b/test/aqua.jl index 690eba0..12e859a 100644 --- a/test/aqua.jl +++ b/test/aqua.jl @@ -2,11 +2,9 @@ using Aqua # Aqua.test_all(DomainSets) -# A few ambiguities remain in deprecated function calls. Tests to be activated -# in next breaking release when those deprecations are removed: -# Aqua.test_ambiguities(DomainSets) +Aqua.test_ambiguities(DomainSets) -# The unbound tests annoyingly flag several valid uses of NTuple{N,T} +# The unbound tests flag several valid uses of NTuple{N,T} # Aqua.test_unbound_args(DomainSets) Aqua.test_undefined_exports(DomainSets) diff --git a/test/runtests.jl b/test/runtests.jl index 4f20197..4ff21e4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,6 @@ using Test, LinearAlgebra, StaticArrays, Random, StableRNGs -using DomainSets +using DomainSets, FunctionMaps using CompositeTypes.Indexing using DomainSets: × diff --git a/test/test_applications.jl b/test/test_applications.jl index 83e5efb..782254d 100644 --- a/test/test_applications.jl +++ b/test/test_applications.jl @@ -1,3 +1,5 @@ +using DomainSets: rotation_map +using FunctionMaps: CartToPolarMap, PolarToCartMap function test_rotation_map(T) ϕ = T(pi)/4 diff --git a/test/test_canonical.jl b/test/test_canonical.jl index e4aac1c..b5fad01 100644 --- a/test/test_canonical.jl +++ b/test/test_canonical.jl @@ -40,8 +40,8 @@ end d2 = UnitBall(Val(1)) @test canonicaldomain(iso, d2) == UnitBall{Float64}() - @test mapfrom_canonical(iso, d2) isa DomainSets.NumberToVector - @test mapto_canonical(iso, d2) isa DomainSets.VectorToNumber + @test mapfrom_canonical(iso, d2) isa FunctionMaps.NumberToVector + @test mapto_canonical(iso, d2) isa FunctionMaps.VectorToNumber @test_throws ArgumentError mapto(UnitCircle(), UnitDisk()) @test mapto(UnitInterval(), UnitInterval()) isa IdentityMap @@ -73,13 +73,6 @@ end @test_throws ArgumentError mapfrom_canonical(Interval{:closed,:open}(-Inf,2.0)) @test_throws ArgumentError mapfrom_canonical(Interval{:open,:closed}(2.0,Inf)) - @test DomainSets.interval_map(-Inf,Inf,-Inf,Inf) isa StaticIdentityMap - @test DomainSets.interval_map(Inf,-Inf,Inf,-Inf) isa StaticIdentityMap - @test DomainSets.interval_map(-Inf,Inf,Inf,-Inf) == LinearMap(-1) - @test DomainSets.interval_map(Inf,-Inf,-Inf,Inf) == LinearMap(-1) - @test DomainSets.interval_map(Inf,Inf,Inf,Inf) isa StaticIdentityMap - @test DomainSets.interval_map(-Inf,-Inf,-Inf,-Inf) isa StaticIdentityMap - @testset "canonical types" begin struct MyCanonicalType <: DomainSets.CanonicalType end diff --git a/test/test_domain_ball.jl b/test/test_domain_ball.jl index 4a1f352..9fdf143 100644 --- a/test/test_domain_ball.jl +++ b/test/test_domain_ball.jl @@ -306,7 +306,7 @@ function test_spheres() @test applymap(q, -x) ≈ 1 @test rightinverse(q) == p @test rightinverse(q)(0) ≈ rightinverse(q, 0) - @test jacobian(q) isa DomainSets.LazyJacobian + @test jacobian(q) isa FunctionMaps.LazyJacobian @test jacobian(q, x) isa LinearAlgebra.Transpose{Float64,SVector{2,Float64}} @test boundingbox(C) == ProductDomain(ChebyshevInterval(), ChebyshevInterval()) @@ -332,7 +332,7 @@ function test_spheres() @test affinematrix(mapfrom_canonical(C)) == [2 0; 0 2] @test affinevector(mapfrom_canonical(C)) == [1; 1] @test parameterdomain(C) == UnitInterval() - @test mapfrom_parameterdomain(C) isa ComposedMap + @test mapfrom_parameterdomain(C) isa FunctionMaps.ComposedMap @test mapfrom_parameterdomain(C)(0.5) ≈ [-1; 1] @test mapfrom_parameterdomain(C, 0.5) ≈ [-1; 1] @test mapto_parameterdomain(C)([-1; 1]) ≈ 0.5 diff --git a/test/test_domain_product.jl b/test/test_domain_product.jl index 05428b3..a1a8807 100644 --- a/test/test_domain_product.jl +++ b/test/test_domain_product.jl @@ -375,14 +375,14 @@ function test_product_domains() @testset "product mapto" begin d1 = ProductDomain(1.0..2.0, 1.0..2.0) d2 = ProductDomain(2.0..4.0, 2.0..4.0) - @test mapto(d1, d2) isa DomainSets.VcatMap - @test jacobian(mapto(d1,d2)) isa ConstantMap - @test jacdet(mapto(d1,d2)) == DomainSets.ConstantMap{SVector{2,Float64}}(4.0) + @test mapto(d1, d2) isa FunctionMaps.VcatMap + @test jacobian(mapto(d1,d2)) isa FunctionMaps.ConstantMap + @test jacdet(mapto(d1,d2)) == FunctionMaps.ConstantMap{SVector{2,Float64}}(4.0) d1v = ProductDomain([1.0..2.0, 1.0..2.0]) d2v = ProductDomain([2.0..4.0, 2.0..4.0]) - @test mapto(d1v, d2v) isa DomainSets.VectorProductMap - @test jacobian(mapto(d1v,d2v)) isa DomainSets.ConstantMap - @test jacdet(mapto(d1v,d2v)) == DomainSets.ConstantMap{Vector{Float64}}(4.0) + @test mapto(d1v, d2v) isa FunctionMaps.VectorProductMap + @test jacobian(mapto(d1v,d2v)) isa FunctionMaps.ConstantMap + @test jacdet(mapto(d1v,d2v)) == FunctionMaps.ConstantMap{Vector{Float64}}(4.0) end @testset "VcatDomain == bug" begin