Skip to content

Commit

Permalink
Added more convencience methods for arithmetics with Vector{QQFieldElem}
Browse files Browse the repository at this point in the history
  • Loading branch information
YueRen authored Oct 19, 2023
1 parent 4f99e9e commit 753c692
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/flint/fmpq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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


###############################################################################
#
Expand Down

0 comments on commit 753c692

Please sign in to comment.