diff --git a/docs/src/matrix.md b/docs/src/matrix.md index e34fa3d5e..3f6603ac1 100644 --- a/docs/src/matrix.md +++ b/docs/src/matrix.md @@ -27,10 +27,10 @@ $\mathbb{Q}$ | Flint | `QQMatrix` $\mathbb{Z}/p\mathbb{Z}$ (small $p$) | Flint | `fpMatrix` | `fpMatrixSpace` $\mathbb{F}_{p^n}$ (small $p$) | Flint | `fqPolyRepMatrix` | `fqPolyRepMatrixSpace` $\mathbb{F}_{p^n}$ (large $p$) | Flint | `FqPolyRepMatrix` | `FqPolyRepMatrixSpace` -$\mathbb{R}$ (arbitrary precision) | Arb | `RealMatrix` | `RealMatSpace` -$\mathbb{C}$ (arbitrary precision) | Arb | `ComplexMatrix` | `ComplexMatSpace` -$\mathbb{R}$ (fixed precision) | Arb | `ArbMatrix` | `ArbMatSpace` -$\mathbb{C}$ (fixed precision) | Arb | `AcbMatrix` | `AcbMatSpace` +$\mathbb{R}$ (arbitrary precision) | Arb | `RealMatrix` | `RealMatrixSpace` +$\mathbb{C}$ (arbitrary precision) | Arb | `ComplexMatrix` | `ComplexMatrixSpace` +$\mathbb{R}$ (fixed precision) | Arb | `ArbMatrix` | `ArbMatrixSpace` +$\mathbb{C}$ (fixed precision) | Arb | `AcbMatrix` | `AcbMatrixSpace` The dimensions and base ring $R$ of a generic matrix are stored in its parent object. diff --git a/docs/src/types.md b/docs/src/types.md index 6431faf48..ce7d55bce 100644 --- a/docs/src/types.md +++ b/docs/src/types.md @@ -65,8 +65,8 @@ parent objects of the given rings and structures. - `AcbFieldElem` (`AcbField`) - `ArbPolyRingElem` (`ArbPolyRing`) - `AcbPolyRingElem` (`AcbPolyRing`) - - `ArbMatrix` (`ArbMatSpace`) - - `AcbMatrix` (`AcbMatSpace`) + - `ArbMatrix` (`ArbMatrixSpace`) + - `AcbMatrix` (`AcbMatrixSpace`) - Calcium diff --git a/src/Deprecations.jl b/src/Deprecations.jl index 8f284be2a..0afce3271 100644 --- a/src/Deprecations.jl +++ b/src/Deprecations.jl @@ -11,6 +11,10 @@ @alias RealPoly RealPolyRingElem @alias ComplexMat ComplexMatrix @alias RealMat RealMatrix +@alias AcbMatSpace AcbMatrixSpace +@alias ComplexMatSpace ComplexMatrixSpace +@alias ArbMatSpace ArbMatrixSpace +@alias RealMatSpace RealMatrixSpace ############################################################################### # diff --git a/src/Exports.jl b/src/Exports.jl index 80bed1540..a23f2112b 100644 --- a/src/Exports.jl +++ b/src/Exports.jl @@ -11,7 +11,7 @@ export AbsSimpleNumFieldElem export AcbField export AcbFieldElem export AcbMatrix -export AcbMatSpace +export AcbMatrixSpace export AcbPolyRing export AcbPolyRingElem export accuracy_bits @@ -34,7 +34,7 @@ export angle export ArbField export ArbFieldElem export ArbMatrix -export ArbMatSpace +export ArbMatrixSpace export ArbPolyRing export ArbPolyRingElem export Array @@ -88,7 +88,7 @@ export complex_normal_form export ComplexField export ComplexFieldElem export ComplexMatrix -export ComplexMatSpace +export ComplexMatrixSpace export ComplexPolyRing export ComplexPolyRingElem export compose @@ -526,7 +526,7 @@ export real export RealField export RealFieldElem export RealMatrix -export RealMatSpace +export RealMatrixSpace export RealPolyRing export RealPolyRingElem export reconstruct diff --git a/src/arb/ArbTypes.jl b/src/arb/ArbTypes.jl index d04072acf..225292497 100644 --- a/src/arb/ArbTypes.jl +++ b/src/arb/ArbTypes.jl @@ -783,11 +783,11 @@ base_ring(a::AcbPolyRing) = a.base_ring ################################################################################ # -# Types and memory management for ArbMatSpace +# Types and memory management for ArbMatrixSpace # ################################################################################ -const RealMatSpace = AbstractAlgebra.Generic.MatSpace{RealFieldElem} +const RealMatrixSpace = AbstractAlgebra.Generic.MatSpace{RealFieldElem} mutable struct RealMatrix <: MatElem{RealFieldElem} entries::Ptr{Nothing} @@ -875,7 +875,7 @@ end # fixed precision -const ArbMatSpace = AbstractAlgebra.Generic.MatSpace{ArbFieldElem} +const ArbMatrixSpace = AbstractAlgebra.Generic.MatSpace{ArbFieldElem} mutable struct ArbMatrix <: MatElem{ArbFieldElem} entries::Ptr{Nothing} @@ -963,11 +963,11 @@ end ################################################################################ # -# Types and memory management for AcbMatSpace +# Types and memory management for AcbMatrixSpace # ################################################################################ -const ComplexMatSpace = AbstractAlgebra.Generic.MatSpace{ComplexFieldElem} +const ComplexMatrixSpace = AbstractAlgebra.Generic.MatSpace{ComplexFieldElem} mutable struct ComplexMatrix <: MatElem{ComplexFieldElem} entries::Ptr{Nothing} @@ -1157,7 +1157,7 @@ end # fixed precision -const AcbMatSpace = AbstractAlgebra.Generic.MatSpace{AcbFieldElem} +const AcbMatrixSpace = AbstractAlgebra.Generic.MatSpace{AcbFieldElem} mutable struct AcbMatrix <: MatElem{AcbFieldElem} entries::Ptr{Nothing} diff --git a/src/arb/ComplexMat.jl b/src/arb/ComplexMat.jl index 82508a508..723436e58 100644 --- a/src/arb/ComplexMat.jl +++ b/src/arb/ComplexMat.jl @@ -79,7 +79,7 @@ end setindex!(x::ComplexMatrix, y::Tuple{Rational{T}, Rational{T}}, r::Int, c::Int) where {T <: Integer} = setindex!(x, map(QQFieldElem, y), r, c) -function one(x::ComplexMatSpace) +function one(x::ComplexMatrixSpace) z = x() ccall((:acb_mat_one, libflint), Nothing, (Ref{ComplexMatrix}, ), z) return z @@ -739,19 +739,19 @@ end # ############################################################################### -function (x::ComplexMatSpace)() +function (x::ComplexMatrixSpace)() z = ComplexMatrix(nrows(x), ncols(x)) return z end -function (x::ComplexMatSpace)(y::ZZMatrix) +function (x::ComplexMatrixSpace)(y::ZZMatrix) (ncols(x) != ncols(y) || nrows(x) != nrows(y)) && error("Dimensions are wrong") z = ComplexMatrix(y, precision(Balls)) return z end -function (x::ComplexMatSpace)(y::RealMatrix) +function (x::ComplexMatrixSpace)(y::RealMatrix) (ncols(x) != ncols(y) || nrows(x) != nrows(y)) && error("Dimensions are wrong") z = ComplexMatrix(y, precision(Balls)) @@ -760,13 +760,13 @@ end for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, RealFieldElem, ComplexFieldElem, String] @eval begin - function (x::ComplexMatSpace)(y::AbstractMatrix{$T}) + function (x::ComplexMatrixSpace)(y::AbstractMatrix{$T}) _check_dim(nrows(x), ncols(x), y) z = ComplexMatrix(nrows(x), ncols(x), y, precision(Balls)) return z end - function (x::ComplexMatSpace)(y::AbstractVector{$T}) + function (x::ComplexMatrixSpace)(y::AbstractVector{$T}) _check_dim(nrows(x), ncols(x), y) z = ComplexMatrix(nrows(x), ncols(x), y, precision(Balls)) return z @@ -774,23 +774,23 @@ for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, RealFieldElem, ComplexFiel end end -(x::ComplexMatSpace)(y::AbstractMatrix{T}) where {T <: Integer} = x(map(ZZRingElem, y)) +(x::ComplexMatrixSpace)(y::AbstractMatrix{T}) where {T <: Integer} = x(map(ZZRingElem, y)) -(x::ComplexMatSpace)(y::AbstractVector{T}) where {T <: Integer} = x(map(ZZRingElem, y)) +(x::ComplexMatrixSpace)(y::AbstractVector{T}) where {T <: Integer} = x(map(ZZRingElem, y)) -(x::ComplexMatSpace)(y::AbstractMatrix{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) +(x::ComplexMatrixSpace)(y::AbstractMatrix{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) -(x::ComplexMatSpace)(y::AbstractVector{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) +(x::ComplexMatrixSpace)(y::AbstractVector{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, RealFieldElem, String] @eval begin - function (x::ComplexMatSpace)(y::AbstractMatrix{Tuple{$T, $T}}) + function (x::ComplexMatrixSpace)(y::AbstractMatrix{Tuple{$T, $T}}) _check_dim(nrows(x), ncols(x), y) z = ComplexMatrix(nrows(x), ncols(x), y, precision(Balls)) return z end - function (x::ComplexMatSpace)(y::AbstractVector{Tuple{$T, $T}}) + function (x::ComplexMatrixSpace)(y::AbstractVector{Tuple{$T, $T}}) _check_dim(nrows(x), ncols(x), y) z = ComplexMatrix(nrows(x), ncols(x), y, precision(Balls)) return z @@ -798,21 +798,21 @@ for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, RealFieldElem, String] end end -(x::ComplexMatSpace)(y::AbstractMatrix{Tuple{T, T}}) where {T <: Integer} = +(x::ComplexMatrixSpace)(y::AbstractMatrix{Tuple{T, T}}) where {T <: Integer} = x(map(z -> (ZZRingElem(z[1]), ZZRingElem(z[2])), y)) -(x::ComplexMatSpace)(y::AbstractVector{Tuple{T, T}}) where {T <: Integer} = +(x::ComplexMatrixSpace)(y::AbstractVector{Tuple{T, T}}) where {T <: Integer} = x(map(z -> (ZZRingElem(z[1]), ZZRingElem(z[2])), y)) -(x::ComplexMatSpace)(y::AbstractMatrix{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = +(x::ComplexMatrixSpace)(y::AbstractMatrix{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = x(map(z -> (QQFieldElem(z[1]), QQFieldElem(z[2])), y)) -(x::ComplexMatSpace)(y::AbstractVector{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = +(x::ComplexMatrixSpace)(y::AbstractVector{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = x(map(z -> (QQFieldElem(z[1]), QQFieldElem(z[2])), y)) for T in [Integer, ZZRingElem, QQFieldElem, Float64, BigFloat, RealFieldElem, ComplexFieldElem, String] @eval begin - function (x::ComplexMatSpace)(y::$T) + function (x::ComplexMatrixSpace)(y::$T) z = x() for i in 1:nrows(z) for j = 1:ncols(z) @@ -828,7 +828,7 @@ for T in [Integer, ZZRingElem, QQFieldElem, Float64, BigFloat, RealFieldElem, Co end end -(x::ComplexMatSpace)(y::Rational{T}) where {T <: Integer} = x(QQFieldElem(y)) +(x::ComplexMatrixSpace)(y::Rational{T}) where {T <: Integer} = x(QQFieldElem(y)) ############################################################################### # diff --git a/src/arb/RealMat.jl b/src/arb/RealMat.jl index 619bd818a..369c0a99c 100644 --- a/src/arb/RealMat.jl +++ b/src/arb/RealMat.jl @@ -67,7 +67,7 @@ Base.@propagate_inbounds setindex!(x::RealMatrix, y::Rational{T}, r::Int, c::Int) where {T <: Integer} = setindex!(x, ZZRingElem(y), r, c) -function one(x::RealMatSpace) +function one(x::RealMatrixSpace) z = x() ccall((:arb_mat_one, libflint), Nothing, (Ref{RealMatrix}, ), z) return z @@ -682,31 +682,31 @@ end # ############################################################################### -function (x::RealMatSpace)() +function (x::RealMatrixSpace)() z = RealMatrix(nrows(x), ncols(x)) return z end -function (x::RealMatSpace)(y::ZZMatrix) +function (x::RealMatrixSpace)(y::ZZMatrix) (ncols(x) != ncols(y) || nrows(x) != nrows(y)) && error("Dimensions are wrong") z = RealMatrix(y, precision(Balls)) return z end -function (x::RealMatSpace)(y::AbstractMatrix{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, RealFieldElem, AbstractString}} +function (x::RealMatrixSpace)(y::AbstractMatrix{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, RealFieldElem, AbstractString}} _check_dim(nrows(x), ncols(x), y) z = RealMatrix(nrows(x), ncols(x), y, precision(Balls)) return z end -function (x::RealMatSpace)(y::AbstractVector{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, RealFieldElem, AbstractString}} +function (x::RealMatrixSpace)(y::AbstractVector{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, RealFieldElem, AbstractString}} _check_dim(nrows(x), ncols(x), y) z = RealMatrix(nrows(x), ncols(x), y, precision(Balls)) return z end -function (x::RealMatSpace)(y::Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, +function (x::RealMatrixSpace)(y::Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, RealFieldElem, AbstractString}) z = x() for i in 1:nrows(z) diff --git a/src/arb/acb_mat.jl b/src/arb/acb_mat.jl index 53b95bdb1..f0b606435 100644 --- a/src/arb/acb_mat.jl +++ b/src/arb/acb_mat.jl @@ -28,7 +28,7 @@ base_ring(a::AcbMatrix) = a.base_ring dense_matrix_type(::Type{AcbFieldElem}) = AcbMatrix -precision(x::AcbMatSpace) = precision(base_ring(x)) +precision(x::AcbMatrixSpace) = precision(base_ring(x)) function getindex!(z::AcbFieldElem, x::AcbMatrix, r::Int, c::Int) GC.@preserve x begin @@ -82,7 +82,7 @@ end setindex!(x::AcbMatrix, y::Tuple{Rational{T}, Rational{T}}, r::Int, c::Int) where {T <: Integer} = setindex!(x, map(QQFieldElem, y), r, c) -function one(x::AcbMatSpace) +function one(x::AcbMatrixSpace) z = x() ccall((:acb_mat_one, libflint), Nothing, (Ref{AcbMatrix}, ), z) return z @@ -742,13 +742,13 @@ end # ############################################################################### -function (x::AcbMatSpace)() +function (x::AcbMatrixSpace)() z = AcbMatrix(nrows(x), ncols(x)) z.base_ring = x.base_ring return z end -function (x::AcbMatSpace)(y::ZZMatrix) +function (x::AcbMatrixSpace)(y::ZZMatrix) (ncols(x) != ncols(y) || nrows(x) != nrows(y)) && error("Dimensions are wrong") z = AcbMatrix(y, precision(x)) @@ -756,7 +756,7 @@ function (x::AcbMatSpace)(y::ZZMatrix) return z end -function (x::AcbMatSpace)(y::ArbMatrix) +function (x::AcbMatrixSpace)(y::ArbMatrix) (ncols(x) != ncols(y) || nrows(x) != nrows(y)) && error("Dimensions are wrong") z = AcbMatrix(y, precision(x)) @@ -766,14 +766,14 @@ end for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, ArbFieldElem, AcbFieldElem, String] @eval begin - function (x::AcbMatSpace)(y::AbstractMatrix{$T}) + function (x::AcbMatrixSpace)(y::AbstractMatrix{$T}) _check_dim(nrows(x), ncols(x), y) z = AcbMatrix(nrows(x), ncols(x), y, precision(x)) z.base_ring = x.base_ring return z end - function (x::AcbMatSpace)(y::AbstractVector{$T}) + function (x::AcbMatrixSpace)(y::AbstractVector{$T}) _check_dim(nrows(x), ncols(x), y) z = AcbMatrix(nrows(x), ncols(x), y, precision(x)) z.base_ring = x.base_ring @@ -782,24 +782,24 @@ for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, ArbFieldElem, AcbFieldElem end end -(x::AcbMatSpace)(y::AbstractMatrix{T}) where {T <: Integer} = x(map(ZZRingElem, y)) +(x::AcbMatrixSpace)(y::AbstractMatrix{T}) where {T <: Integer} = x(map(ZZRingElem, y)) -(x::AcbMatSpace)(y::AbstractVector{T}) where {T <: Integer} = x(map(ZZRingElem, y)) +(x::AcbMatrixSpace)(y::AbstractVector{T}) where {T <: Integer} = x(map(ZZRingElem, y)) -(x::AcbMatSpace)(y::AbstractMatrix{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) +(x::AcbMatrixSpace)(y::AbstractMatrix{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) -(x::AcbMatSpace)(y::AbstractVector{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) +(x::AcbMatrixSpace)(y::AbstractVector{Rational{T}}) where {T <: Integer} = x(map(QQFieldElem, y)) for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, ArbFieldElem, String] @eval begin - function (x::AcbMatSpace)(y::AbstractMatrix{Tuple{$T, $T}}) + function (x::AcbMatrixSpace)(y::AbstractMatrix{Tuple{$T, $T}}) _check_dim(nrows(x), ncols(x), y) z = AcbMatrix(nrows(x), ncols(x), y, precision(x)) z.base_ring = x.base_ring return z end - function (x::AcbMatSpace)(y::AbstractVector{Tuple{$T, $T}}) + function (x::AcbMatrixSpace)(y::AbstractVector{Tuple{$T, $T}}) _check_dim(nrows(x), ncols(x), y) z = AcbMatrix(nrows(x), ncols(x), y, precision(x)) z.base_ring = x.base_ring @@ -808,21 +808,21 @@ for T in [Float64, ZZRingElem, QQFieldElem, BigFloat, ArbFieldElem, String] end end -(x::AcbMatSpace)(y::AbstractMatrix{Tuple{T, T}}) where {T <: Integer} = +(x::AcbMatrixSpace)(y::AbstractMatrix{Tuple{T, T}}) where {T <: Integer} = x(map(z -> (ZZRingElem(z[1]), ZZRingElem(z[2])), y)) -(x::AcbMatSpace)(y::AbstractVector{Tuple{T, T}}) where {T <: Integer} = +(x::AcbMatrixSpace)(y::AbstractVector{Tuple{T, T}}) where {T <: Integer} = x(map(z -> (ZZRingElem(z[1]), ZZRingElem(z[2])), y)) -(x::AcbMatSpace)(y::AbstractMatrix{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = +(x::AcbMatrixSpace)(y::AbstractMatrix{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = x(map(z -> (QQFieldElem(z[1]), QQFieldElem(z[2])), y)) -(x::AcbMatSpace)(y::AbstractVector{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = +(x::AcbMatrixSpace)(y::AbstractVector{Tuple{Rational{T}, Rational{T}}}) where {T <: Integer} = x(map(z -> (QQFieldElem(z[1]), QQFieldElem(z[2])), y)) for T in [Integer, ZZRingElem, QQFieldElem, Float64, BigFloat, ArbFieldElem, AcbFieldElem, String] @eval begin - function (x::AcbMatSpace)(y::$T) + function (x::AcbMatrixSpace)(y::$T) z = x() for i in 1:nrows(z) for j = 1:ncols(z) @@ -838,7 +838,7 @@ for T in [Integer, ZZRingElem, QQFieldElem, Float64, BigFloat, ArbFieldElem, Acb end end -(x::AcbMatSpace)(y::Rational{T}) where {T <: Integer} = x(QQFieldElem(y)) +(x::AcbMatrixSpace)(y::Rational{T}) where {T <: Integer} = x(QQFieldElem(y)) ############################################################################### # diff --git a/src/arb/arb_mat.jl b/src/arb/arb_mat.jl index b0357da4f..8f99e7a51 100644 --- a/src/arb/arb_mat.jl +++ b/src/arb/arb_mat.jl @@ -28,7 +28,7 @@ base_ring(a::ArbMatrix) = a.base_ring dense_matrix_type(::Type{ArbFieldElem}) = ArbMatrix -precision(x::ArbMatSpace) = precision(x.base_ring) +precision(x::ArbMatrixSpace) = precision(x.base_ring) function getindex!(z::ArbFieldElem, x::ArbMatrix, r::Int, c::Int) GC.@preserve x begin @@ -70,7 +70,7 @@ Base.@propagate_inbounds setindex!(x::ArbMatrix, y::Rational{T}, r::Int, c::Int) where {T <: Integer} = setindex!(x, ZZRingElem(y), r, c) -function one(x::ArbMatSpace) +function one(x::ArbMatrixSpace) z = x() ccall((:arb_mat_one, libflint), Nothing, (Ref{ArbMatrix}, ), z) return z @@ -709,13 +709,13 @@ end # ############################################################################### -function (x::ArbMatSpace)() +function (x::ArbMatrixSpace)() z = ArbMatrix(nrows(x), ncols(x)) z.base_ring = x.base_ring return z end -function (x::ArbMatSpace)(y::ZZMatrix) +function (x::ArbMatrixSpace)(y::ZZMatrix) (ncols(x) != ncols(y) || nrows(x) != nrows(y)) && error("Dimensions are wrong") z = ArbMatrix(y, precision(x)) @@ -723,14 +723,14 @@ function (x::ArbMatSpace)(y::ZZMatrix) return z end -function (x::ArbMatSpace)(y::AbstractMatrix{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, ArbFieldElem, AbstractString}} +function (x::ArbMatrixSpace)(y::AbstractMatrix{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, ArbFieldElem, AbstractString}} _check_dim(nrows(x), ncols(x), y) z = ArbMatrix(nrows(x), ncols(x), y, precision(x)) z.base_ring = x.base_ring return z end -function (x::ArbMatSpace)(y::AbstractVector{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, ArbFieldElem, AbstractString}} +function (x::ArbMatrixSpace)(y::AbstractVector{T}) where {T <: Union{Int, UInt, ZZRingElem, QQFieldElem, Float64, BigFloat, ArbFieldElem, AbstractString}} _check_dim(nrows(x), ncols(x), y) z = ArbMatrix(nrows(x), ncols(x), y, precision(x)) z.base_ring = x.base_ring diff --git a/test/arb/ComplexMat-test.jl b/test/arb/ComplexMat-test.jl index c4b5d829a..1eff58fad 100644 --- a/test/arb/ComplexMat-test.jl +++ b/test/arb/ComplexMat-test.jl @@ -5,20 +5,20 @@ RR = RealField() @test_throws ErrorException matrix_space(CC, -1, 5) @test_throws ErrorException matrix_space(CC, 0, -2) @test_throws ErrorException matrix_space(CC, -3, -4) - @test_throws ErrorException ComplexMatSpace(CC, 2, -1) - @test_throws ErrorException ComplexMatSpace(CC, -1, 2) - @test_throws ErrorException ComplexMatSpace(CC, -1, -1) + @test_throws ErrorException ComplexMatrixSpace(CC, 2, -1) + @test_throws ErrorException ComplexMatrixSpace(CC, -1, 2) + @test_throws ErrorException ComplexMatrixSpace(CC, -1, -1) S = matrix_space(CC, 3, 3) R = matrix_space(ZZ, 3, 3) @test elem_type(S) == ComplexMatrix - @test elem_type(ComplexMatSpace) == ComplexMatrix - @test parent_type(ComplexMatrix) == ComplexMatSpace + @test elem_type(ComplexMatrixSpace) == ComplexMatrix + @test parent_type(ComplexMatrix) == ComplexMatrixSpace @test nrows(S) == 3 @test ncols(S) == 3 - @test isa(S, ComplexMatSpace) + @test isa(S, ComplexMatrixSpace) f = S(ZZRingElem(3)) diff --git a/test/arb/RealMat-test.jl b/test/arb/RealMat-test.jl index 06c1cc7f6..104c16135 100644 --- a/test/arb/RealMat-test.jl +++ b/test/arb/RealMat-test.jl @@ -4,20 +4,20 @@ RR = RealField() @test_throws ErrorException matrix_space(RR, -1, 5) @test_throws ErrorException matrix_space(RR, 0, -2) @test_throws ErrorException matrix_space(RR, -3, -4) - @test_throws ErrorException RealMatSpace(RR, 2, -1) - @test_throws ErrorException RealMatSpace(RR, -1, 2) - @test_throws ErrorException RealMatSpace(RR, -1, -1) + @test_throws ErrorException RealMatrixSpace(RR, 2, -1) + @test_throws ErrorException RealMatrixSpace(RR, -1, 2) + @test_throws ErrorException RealMatrixSpace(RR, -1, -1) S = matrix_space(RR, 3, 3) R = matrix_space(ZZ, 3, 3) @test elem_type(S) == RealMatrix - @test elem_type(RealMatSpace) == RealMatrix - @test parent_type(RealMatrix) == RealMatSpace + @test elem_type(RealMatrixSpace) == RealMatrix + @test parent_type(RealMatrix) == RealMatrixSpace @test nrows(S) == 3 @test ncols(S) == 3 - @test isa(S, RealMatSpace) + @test isa(S, RealMatrixSpace) f = S(ZZRingElem(3)) diff --git a/test/arb/acb_mat-test.jl b/test/arb/acb_mat-test.jl index f9a3f6e0d..7cc29da34 100644 --- a/test/arb/acb_mat-test.jl +++ b/test/arb/acb_mat-test.jl @@ -5,20 +5,20 @@ RR = ArbField(64) @test_throws ErrorException matrix_space(CC, -1, 5) @test_throws ErrorException matrix_space(CC, 0, -2) @test_throws ErrorException matrix_space(CC, -3, -4) - @test_throws ErrorException AcbMatSpace(CC, 2, -1) - @test_throws ErrorException AcbMatSpace(CC, -1, 2) - @test_throws ErrorException AcbMatSpace(CC, -1, -1) + @test_throws ErrorException AcbMatrixSpace(CC, 2, -1) + @test_throws ErrorException AcbMatrixSpace(CC, -1, 2) + @test_throws ErrorException AcbMatrixSpace(CC, -1, -1) S = matrix_space(CC, 3, 3) R = matrix_space(ZZ, 3, 3) @test elem_type(S) == AcbMatrix - @test elem_type(AcbMatSpace) == AcbMatrix - @test parent_type(AcbMatrix) == AcbMatSpace + @test elem_type(AcbMatrixSpace) == AcbMatrix + @test parent_type(AcbMatrix) == AcbMatrixSpace @test nrows(S) == 3 @test ncols(S) == 3 - @test isa(S, AcbMatSpace) + @test isa(S, AcbMatrixSpace) f = S(ZZRingElem(3)) diff --git a/test/arb/arb_mat-test.jl b/test/arb/arb_mat-test.jl index ba098ae0b..a75506d5d 100644 --- a/test/arb/arb_mat-test.jl +++ b/test/arb/arb_mat-test.jl @@ -4,20 +4,20 @@ RR = ArbField(64) @test_throws ErrorException matrix_space(RR, -1, 5) @test_throws ErrorException matrix_space(RR, 0, -2) @test_throws ErrorException matrix_space(RR, -3, -4) - @test_throws ErrorException ArbMatSpace(RR, 2, -1) - @test_throws ErrorException ArbMatSpace(RR, -1, 2) - @test_throws ErrorException ArbMatSpace(RR, -1, -1) + @test_throws ErrorException ArbMatrixSpace(RR, 2, -1) + @test_throws ErrorException ArbMatrixSpace(RR, -1, 2) + @test_throws ErrorException ArbMatrixSpace(RR, -1, -1) S = matrix_space(RR, 3, 3) R = matrix_space(ZZ, 3, 3) @test elem_type(S) == ArbMatrix - @test elem_type(ArbMatSpace) == ArbMatrix - @test parent_type(ArbMatrix) == ArbMatSpace + @test elem_type(ArbMatrixSpace) == ArbMatrix + @test parent_type(ArbMatrix) == ArbMatrixSpace @test nrows(S) == 3 @test ncols(S) == 3 - @test isa(S, ArbMatSpace) + @test isa(S, ArbMatrixSpace) f = S(ZZRingElem(3))