From 753c692daafd77dd1339df3d3f4f253cccbb1575 Mon Sep 17 00:00:00 2001 From: YueRen Date: Thu, 19 Oct 2023 13:39:46 +0100 Subject: [PATCH] Added more convencience methods for arithmetics with Vector{QQFieldElem} --- src/flint/fmpq.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/flint/fmpq.jl b/src/flint/fmpq.jl index 5e2a0f145..97a7298f9 100644 --- a/src/flint/fmpq.jl +++ b/src/flint/fmpq.jl @@ -1205,14 +1205,20 @@ Rational(z::ZZRingElem) = Rational{BigInt}(z) ############################################################################### # -# Convenience methods for arithmetics (since `QQFieldElem` is not a `Number` type) +# Convenience methods for arithmetics (since `QQFieldElem` and `ZZRingElem` are not `Number` types) # ############################################################################### //(v::Vector{QQFieldElem}, x::QQFieldElem) = v .// x +/(v::Vector{QQFieldElem}, x::QQFieldElem) = v ./ x *(x::QQFieldElem, v::Vector{QQFieldElem}) = x .* v *(v::Vector{QQFieldElem}, x::QQFieldElem) = v .* x +//(v::Vector{QQFieldElem}, x::ZZRingElem) = v .// x +/(v::Vector{QQFieldElem}, x::ZZRingElem) = v ./ x +*(x::ZZRingElem, v::Vector{QQFieldElem}) = x .* v +*(v::Vector{QQFieldElem}, x::ZZRingElem) = v .* x + ############################################################################### #