diff --git a/Project.toml b/Project.toml index ae9910b..254bea2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "AtiyahBott" uuid = "4bc0d046-1179-4daa-900a-9bc021c7f891" authors = ["Giosuè Muratore ", "Csaba Schneider "] -version = "2.2.0" +version = "2.2.1" [deps] Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" diff --git a/docs/make.jl b/docs/make.jl index 3987c91..ab15ae3 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -10,6 +10,7 @@ makedocs( deploydocs( repo = "github.com/mgemath/AtiyahBott.jl.git", versions = nothing, + #=, target = "build", push_preview = true,=# diff --git a/src/AtiyahBott.jl b/src/AtiyahBott.jl index eb128bd..3d38f59 100644 --- a/src/AtiyahBott.jl +++ b/src/AtiyahBott.jl @@ -14,6 +14,7 @@ using ProgressMeter using Nemo include("Arithmetic.jl") +include("Euler.jl") include("Marked.jl") include("GraphFunctions.jl") include("EquivariantClasses.jl") diff --git a/src/EquivariantClasses.jl b/src/EquivariantClasses.jl index 69200b8..a09e312 100644 --- a/src/EquivariantClasses.jl +++ b/src/EquivariantClasses.jl @@ -173,15 +173,20 @@ The following Gromov-Witten invariants \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> P = Incidency(3)^2; -julia> AtiyahBottFormula(3,1,0,P); + +julia> AtiyahBottFormula(3, 1, 0, P, show_bar=false); Result: 1 + julia> P = Incidency([2,2,3]); -julia> AtiyahBottFormula(3,1,0,P); + +julia> AtiyahBottFormula(3, 1, 0, P, show_bar=false); Result: 1 + julia> P = Incidency([2,2])*Hypersurface(3); -julia> AtiyahBottFormula(3,3,0,P); + +julia> AtiyahBottFormula(3, 3, 0, P, show_bar=false); Result: 756 ``` !!! warning "Attention!" @@ -255,18 +260,25 @@ The following Gromov-Witten invariants of Calabi-Yau threefolds \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> P = Hypersurface(5); -julia> AtiyahBottFormula(4,1,0,P); + +julia> AtiyahBottFormula(4, 1, 0, P, show_bar=false); Result: 2875 + julia> P = Hypersurface([3,3]); -julia> AtiyahBottFormula(5,2,0,P); + +julia> AtiyahBottFormula(5, 2, 0, P, show_bar=false); Result: 423549//8 + julia> P = Hypersurface(4)*Hypersurface(2); -julia> AtiyahBottFormula(5,3,0,P); + +julia> AtiyahBottFormula(5, 3, 0, P, show_bar=false); Result: 422690816//27 + julia> P = Hypersurface(2)^4; -julia> AtiyahBottFormula(7,4,0,P); + +julia> AtiyahBottFormula(7, 4, 0, P, show_bar=false); Result: 25705160 ``` !!! warning "Attention!" @@ -344,9 +356,10 @@ Equivariant class of the Euler class of the bundle equal to the direct image und \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> P = O1_i(1)^2*O1_i(2)^3*Contact(); -julia> AtiyahBottFormula(3,1,2,P); + +julia> AtiyahBottFormula(3, 1, 2, P, show_bar=false); Result: 1 ``` """ @@ -407,12 +420,15 @@ The following Gromov-Witten invariants \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> P = O1_i(1)*O1_i(2); -julia> AtiyahBottFormula(1,1,2,P); + +julia> AtiyahBottFormula(1, 1, 2, P, show_bar=false); Result: 1 + julia> P = O1_i(1)^2*Hypersurface(2); -julia> AtiyahBottFormula(3,1,1,P); + +julia> AtiyahBottFormula(3, 1, 1, P, show_bar=false); Result: 4 ``` !!! warning "Attention!" @@ -447,12 +463,15 @@ The following Gromov-Witten invariants \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> P = O1()^2; -julia> AtiyahBottFormula(2,3,8,P); + +julia> AtiyahBottFormula(2, 3, 8, P, show_bar=false); Result: 12 + julia> P = O1()^2*Hypersurface(3); -julia> AtiyahBottFormula(3,2,1,P); + +julia> AtiyahBottFormula(3, 2, 1, P, show_bar=false); Result: 81 ``` @@ -496,10 +515,12 @@ The equivariant class of the first derived functor of the pull-back of ``\\mathc \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> d = 1; #for other values of d, change this line + julia> P = R1(1)^2; -julia> AtiyahBottFormula(1,d,0,P); + +julia> AtiyahBottFormula(1, d, 0, P, show_bar=false); Result: 1 ``` !!! warning "Attention!" @@ -580,21 +601,30 @@ The following Gromov-Witten invariants \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> P = O1_i(1)^5*O1_i(2)^2*Hypersurface(5)*Psi([1,0]); -julia> AtiyahBottFormula(6,2,2,P); + +julia> AtiyahBottFormula(6, 2, 2, P, show_bar=false); Result: 495000 + julia> P = O1_i(1)^8*O1_i(2)^6*Hypersurface(7)*Psi(2); -julia> AtiyahBottFormula(10,2,2,P); + +julia> AtiyahBottFormula(10, 2, 2, P, show_bar=false); Result: 71804533752 + julia> P = O1()^2*Psi(4); -julia> AtiyahBottFormula(2,2,1,P); + +julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false); Result: 1//8 + julia> P = Incidency(2)^4*O1_i(1)*(O1_i(1) + Psi(1)); -julia> AtiyahBottFormula(2,2,1,P); #number of plane conics through four points and tangent to a line + +julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false); #number of plane conics through four points and tangent to a line Result: 2 + julia> P = O1()*(Psi(7)*O1()+Psi(6)*O1()^2); -julia> AtiyahBottFormula(3,2,1,P); + +julia> AtiyahBottFormula(3, 2, 1, P, show_bar=false); Result: -5//16 ``` !!! warning "Psi is singleton!" @@ -708,16 +738,23 @@ Equivariant class of the jet bundle ``J^p`` of the pull back of ``\\mathcal{O}_{ \\end{aligned} ``` can be computed as -```julia-repl +```jldoctest; setup = :(using AtiyahBott) julia> P = Incidency(2)^4*Jet(1,1); -julia> AtiyahBottFormula(2,2,1,P); + +julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false); Result: 2 + julia> P = Incidency(2)^4*(Jet(1,1)+O1()^2); -julia> AtiyahBottFormula(2,2,1,P); + +julia> AtiyahBottFormula(2, 2, 1, P, show_bar=false); Result: 3 + julia> d=1;k=1; #for other values of d, change this line + julia> P = (O1()^2)//k*Jet(4*d-2,k); -julia> AtiyahBottFormula(3,d,1,P); #The value of this integral does not depend on k, only on d + +julia> AtiyahBottFormula(3, d, 1, P, show_bar=false); #The value of this integral does not depend on k, only on d +Result: 2 ``` """ function Jet( p, q )::EquivariantClass @@ -744,117 +781,7 @@ function Jet(g::SimpleGraph{Int64}, col::Tuple{Vararg{Int64}}, weights::Vector{I end -# """ -# Euler_inv(g, c, w, s, m) - -# The inverse of the (equivariant) Euler class of the normal bundle. This function is invoked automatically. -# # Arguments -# - `g::SimpleGraph{Int64}`: the graph. -# - `c::Vector{UInt8}`: the coloration. -# - `w::Vector{Int64}`: the weights. -# - `s::Tuple{Vararg{fmpq}}`: the scalars. -# - `m::Vector{Int64}`: the marks. - -# """ -function Euler_inv(g::SimpleGraph{Int64}, col::Tuple{Vararg{Int64}}, weights::Vector{Int64}, scalars::Tuple{Vararg{fmpq}}, mark::Marks_type)::fmpq - - local V::fmpq = fmpq(1) - #local E::fmpq = fmpq(1) - local temp1::fmpq = fmpq(1) - local temp2::fmpq = fmpq(1) - local q1::fmpq - local p1::fmpq - local s1::fmpq - # col = Dict(vertices(g).=> col) #assing colors to vertices - d = Dict(edges(g).=> weights) #assign weights to edges - #= - omega_inv = Dict(edges(g).=> [d[e]//(scalars[col[src(e)]]-scalars[col[dst(e)]]) for e in edges(g)]) - merge!(omega_inv,Dict(reverse.(edges(g)).=> [d[e]//(scalars[col[dst(e)]]-scalars[col[src(e)]]) for e in edges(g)])) - =# - max_col = length(scalars) - - for e in edges(g) - q1 = fmpq(1) - for j in 1:max_col - if j != col[src(e)] && j != col[dst(e)] - for alph in 0:d[e] - eq!(temp1, scalars[col[src(e)]]) - eq!(temp2, scalars[col[dst(e)]]) - mul_eq!(temp1, alph) - mul_eq!(temp2, d[e]-alph) - add_eq!(temp1, temp2) - div_eq!(temp1, d[e]) - sub!(temp1, scalars[j]) - mul_eq!(q1, temp1) - #q1 *= ((alph*scalars[col[src(e)]]+(d[e]-alph)*scalars[col[dst(e)]])//d[e]-scalars[j]) - end - end - end - - #eq!(temp1, omega_inv[e]) - eq!(temp1, scalars[col[dst(e)]]) - neg!(temp1) - add_eq!(temp1, scalars[col[src(e)]]) - inv!(temp1) - mul_eq!(temp1, d[e]) - - pow_eq!(temp1, 2*d[e]) - if isodd(d[e]) - neg!(temp1) - end - q1 *= Nemo.factorial(fmpz(d[e]))^2 - # mul_eq!(q1, Nemo.factorial(fmpz(d[e]))^2) - #div_eq!(temp1, factorial(d[e])^2) - div_eq!(temp1, q1) - mul_eq!(V, temp1) - #E *= ((omega_inv[e])^(2*d[e]))*((-1)^d[e])//(factorial(d[e])^2)//q1 - end - - for v in vertices(g) - nghbrs = all_neighbors(g, v) - p1 = fmpq(1) - for j in 1:max_col - if j != col[v] - eq!(temp1, scalars[col[v]]) - sub!(temp1, scalars[j]) - mul_eq!(p1, temp1) - #p1 *= scalars[col[v]]-scalars[j] - end - end - pow_eq!(p1, length(nghbrs)-1) - mul_eq!(V, p1) - #p1 ^= length(nghbrs)-1 - - s1 = fmpq(0) - #local r1 = fmpq(1) - - for w in nghbrs - eq!(temp1, scalars[col[w]]) - neg!(temp1) - add_eq!(temp1, scalars[col[v]]) - inv!(temp1) - # e = SimpleEdge(v,w) - # d_e = haskey(d,e) ? d[e] : d[reverse(e)] - # mul_eq!(temp1, d_e) - mul_eq!(temp1, d[SimpleEdge(min(v,w),max(v,w))]) - # e = SimpleEdge(v,w) - add_eq!(s1, temp1) - mul_eq!(V, temp1) - # s1 += omega_inv[e] - # r1 *= omega_inv[e] - end - - pow_eq!(s1, length(nghbrs) + num_marks(mark,v) - 3) - #s1 ^= length(nghbrs) + num_marks(mark,v) - 3 - #mul_eq!(V, p1) - mul_eq!(V, s1) - #V *= p1*s1*r1 - end - - #mul_eq!(V, E) - return V -end ############################################################### ### List of the class useful for computing the rank (Cycle) ### diff --git a/src/Euler.jl b/src/Euler.jl new file mode 100644 index 0000000..bf38288 --- /dev/null +++ b/src/Euler.jl @@ -0,0 +1,157 @@ +# """ +# Euler_inv(g, c, w, s, m) + +# The inverse of the (equivariant) Euler class of the normal bundle. This function is invoked automatically. +# # Arguments +# - `g::SimpleGraph{Int64}`: the graph. +# - `c::Vector{UInt8}`: the coloration. +# - `w::Vector{Int64}`: the weights. +# - `s::Tuple{Vararg{fmpq}}`: the scalars. +# - `m::Vector{Int64}`: the marks. + +# """ +function Euler_inv(g::SimpleGraph{Int64}, col::Tuple{Vararg{Int64}}, weights::Vector{Int64}, scalars::Tuple{Vararg{fmpq}}, mark::Marks_type, otd::Dict{Int64, fmpq})::fmpq + + local V::fmpq = fmpq(1) + #local E::fmpq = fmpq(1) + local temp1::fmpq = fmpq(1) + # local temp2::fmpq = fmpq(1) + local q1::fmpq + # local p1::fmpq + local s1::fmpq + # col = Dict(vertices(g).=> col) #assing colors to vertices + d = Dict(edges(g).=> weights) #assign weights to edges + #= + omega_inv = Dict(edges(g).=> [d[e]//(scalars[col[src(e)]]-scalars[col[dst(e)]]) for e in edges(g)]) + merge!(omega_inv,Dict(reverse.(edges(g)).=> [d[e]//(scalars[col[dst(e)]]-scalars[col[src(e)]]) for e in edges(g)])) + =# + max_col = length(scalars) + + # for e in edges(g) + # q1 = fmpq(1) + # for j in 1:max_col + # if j != col[src(e)] && j != col[dst(e)] + # for alph in 0:d[e] + # eq!(temp1, scalars[col[src(e)]]) + # eq!(temp2, scalars[col[dst(e)]]) + # mul_eq!(temp1, alph) + # mul_eq!(temp2, d[e]-alph) + # add_eq!(temp1, temp2) + # div_eq!(temp1, d[e]) + # sub!(temp1, scalars[j]) + # mul_eq!(q1, temp1) + # #q1 *= ((alph*scalars[col[src(e)]]+(d[e]-alph)*scalars[col[dst(e)]])//d[e]-scalars[j]) + # end + # end + # end + + # #eq!(temp1, omega_inv[e]) + # eq!(temp1, scalars[col[dst(e)]]) + # neg!(temp1) + # add_eq!(temp1, scalars[col[src(e)]]) + # inv!(temp1) + # mul_eq!(temp1, d[e]) + + # pow_eq!(temp1, 2*d[e]) + # if isodd(d[e]) + # neg!(temp1) + # end + # q1 *= Nemo.factorial(fmpz(d[e]))^2 + # # mul_eq!(q1, Nemo.factorial(fmpz(d[e]))^2) + # #div_eq!(temp1, factorial(d[e])^2) + # div_eq!(temp1, q1) + # mul_eq!(V, temp1) + # #E *= ((omega_inv[e])^(2*d[e]))*((-1)^d[e])//(factorial(d[e])^2)//q1 + # end + + for v in vertices(g) + nghbrs = all_neighbors(g, v) + # p1 = fmpq(1) + # for j in 1:max_col + # if j != col[v] + # eq!(temp1, scalars[col[v]]) + # sub!(temp1, scalars[j]) + # mul_eq!(p1, temp1) + # #p1 *= scalars[col[v]]-scalars[j] + # end + # end + # pow_eq!(p1[col[v]], length(nghbrs)-1) + # mul_eq!(V, p1) + #p1 ^= length(nghbrs)-1 + mul_eq!(V, otd[col[v]]^(length(nghbrs)-1)) + + s1 = fmpq(0) + #local r1 = fmpq(1) + + for w in nghbrs + eq!(temp1, scalars[col[w]]) + neg!(temp1) + add_eq!(temp1, scalars[col[v]]) + inv!(temp1) + # e = SimpleEdge(v,w) + # d_e = haskey(d,e) ? d[e] : d[reverse(e)] + # mul_eq!(temp1, d_e) + mul_eq!(temp1, d[SimpleEdge(min(v,w),max(v,w))]) + # e = SimpleEdge(v,w) + add_eq!(s1, temp1) + mul_eq!(V, temp1) + # s1 += omega_inv[e] + # r1 *= omega_inv[e] + end + + pow_eq!(s1, length(nghbrs) + num_marks(mark,v) - 3) + #s1 ^= length(nghbrs) + num_marks(mark,v) - 3 + #mul_eq!(V, p1) + mul_eq!(V, s1) + #V *= p1*s1*r1 + + end + + #mul_eq!(V, E) + return V +end + +function Lambda_Gamma_e(scalars::Tuple{Vararg{fmpq}}, d_e::Int64, col_1::Int64, col_2::Int64)::fmpq + + local V::fmpq = fmpq(1) + #local E::fmpq = fmpq(1) + local temp1::fmpq = fmpq(1) + local temp2::fmpq = fmpq(1) + max_col = length(scalars) + + q1 = fmpq(1) + for j in 1:max_col + if j != col_1 && j != col_2 + for alph in 0:d_e + eq!(temp1, scalars[col_1]) + eq!(temp2, scalars[col_2]) + mul_eq!(temp1, alph) + mul_eq!(temp2, d_e-alph) + add_eq!(temp1, temp2) + div_eq!(temp1, d_e) + sub!(temp1, scalars[j]) + mul_eq!(q1, temp1) + #q1 *= ((alph*scalars[col_1]+(d_e-alph)*scalars[col_2])//d_e-scalars[j]) + end + end + end + + #eq!(temp1, omega_inv[e]) + eq!(temp1, scalars[col_2]) + neg!(temp1) + add_eq!(temp1, scalars[col_1]) + inv!(temp1) + mul_eq!(temp1, d_e) + + pow_eq!(temp1, 2*d_e) + if isodd(d_e) + neg!(temp1) + end + q1 *= Nemo.factorial(fmpz(d_e))^2 + # mul_eq!(q1, Nemo.factorial(fmpz(d_e))^2) + #div_eq!(temp1, factorial(d_e)^2) + div_eq!(temp1, q1) + mul_eq!(V, temp1) + #E *= ((omega_inv[e])^(2*d_e))*((-1)^d_e)//(factorial(d_e)^2)//q1 + return V +end \ No newline at end of file diff --git a/src/Main.jl b/src/Main.jl index c208ca5..ef0f463 100644 --- a/src/Main.jl +++ b/src/Main.jl @@ -21,18 +21,18 @@ julia> P = After `=`, one has to write an expression in the equivariant classes. The expression is a combination of the equivariant classes. We compute the degree of `P` by ```julia-repl -julia> AtiyahBottFormula(n,d,m,P); +julia> AtiyahBottFormula(n, d, m, P); ``` # Example ```julia-repl julia> P = Hypersurface(5); -julia> AtiyahBottFormula(3,1,0,P); +julia> AtiyahBottFormula(3, 1, 0, P); Warning: the class is not a 0-cycle. -julia> AtiyahBottFormula(4,1,0,P); +julia> AtiyahBottFormula(4, 1, 0, P); Result: 2875 -julia> AtiyahBottFormula(4,1,0,P,do_check = false); #skip the preliminary check on `P` -julia> AtiyahBottFormula(4,1,0,P,show_bar = false); #it does not show the progress bar +julia> AtiyahBottFormula(4, 1, 0, P, do_check = false); #skip the preliminary check on `P` +julia> AtiyahBottFormula(4, 1, 0, P, show_bar = false); #it does not show the progress bar ``` The function returns an array of the same dimension of `P` (non-vectorized classes are assumed as 1-dimensional arrays). The Julia notation for accessing to array is `name_of_array[i]` where `i` is an index starting from 1. @@ -40,7 +40,7 @@ The function returns an array of the same dimension of `P` (non-vectorized class # Example ```julia-repl julia> P = Incidency(2)*Hypersurface(3); -julia> x = AtiyahBottFormula(3,2,0,P)[1]; +julia> x = AtiyahBottFormula(3, 2, 0, P)[1]; Result: 81 julia> x 81 @@ -50,10 +50,10 @@ The class `P` supports parameters. ```julia-repl julia> P = Hypersurface(3)*(Incidency(2)//3)^(d-1); julia> d = 2; -julia> AtiyahBottFormula(3,d,0,P); +julia> AtiyahBottFormula(3, d, 0, P); Result: 27 julia> d = 3; -julia> AtiyahBottFormula(3,d,0,P); +julia> AtiyahBottFormula(3, d, 0, P); Result: 84 ``` @@ -111,7 +111,21 @@ function AtiyahBottFormula(n::Int64, deg::Int64, n_marks::Int64, P_input; do_che local result::Vector{Vector{fmpq}} = [[fmpq() for _ in 1:n_results] for _ in 1:Threads.nthreads()] local s::NTuple{n+1, fmpq} = (fmpq.(rand(Int16, n+1))...,) nc = Dict{Int64,Vector{Int64}}([i for i in 1:(n+1)] .=> [[j + Int64(i<=j) for j in 1:n] for i in 1:(n+1)]) - + Lambda_Gamma_e_dict::Dict{Tuple{Int64, Int64, Int64}, fmpq} = Dict{Tuple{Int64, Int64, Int64}, fmpq}() + omega_t_dict::Dict{Int64, fmpq} = Dict{Int64, fmpq}() + for c_1 in 1:(n+1) + omega_t_dict[c_1] = fmpq(1) + for c_2 in 1:(n+1) + if c_2 > c_1 + for deg_e in 1:deg + Lambda_Gamma_e_dict[deg_e, c_1, c_2] = Lambda_Gamma_e(s, deg_e, c_1, c_2) + end + end + if c_2 != c_1 + omega_t_dict[c_1] *= s[c_1] - s[c_2] + end + end + end if show_bar #set up progress data @@ -147,7 +161,7 @@ function AtiyahBottFormula(n::Int64, deg::Int64, n_marks::Int64, P_input; do_che aut = count_iso(ls, col, m_inv) for w in all_weights #we run among all weights of g PRODW = prod(w) - + d = Dict(edges(g).=> w) try local Euler::fmpq = fmpq(0) local temp = Vector{fmpq}(undef, n_results) @@ -161,8 +175,12 @@ function AtiyahBottFormula(n::Int64, deg::Int64, n_marks::Int64, P_input; do_che all(res -> temp[res] == fmpq(0), eachindex(temp)) && continue # check if at least one partial result is not zero if Euler == fmpq(0) - eq!(Euler, Euler_inv(g, col, w, s, m)) + eq!(Euler, Euler_inv(g, col, w, s, m, omega_t_dict)) div_eq!(Euler, aut*PRODW) + for e in edges(g) + triple = (d[e], min(col[src(e)], col[dst(e)]), max(col[src(e)], col[dst(e)])) + mul_eq!(Euler, Lambda_Gamma_e_dict[triple]) + end end for res in 1:n_results #compute each term of the array P diff --git a/src/NemoFunctions.jl b/src/NemoFunctions.jl index 2ed7a80..2c604cc 100644 --- a/src/NemoFunctions.jl +++ b/src/NemoFunctions.jl @@ -64,19 +64,19 @@ poweq!(x::fmpq, y::Int) = pow!(x, x, y) diveq!(x::fmpq, y::fmpq) = div!(x, x, y) Nemo.inv!(x::fmpq) = Nemo.inv!(x, x) =# -""" - pow_eq!(a, b) -Equivalent to a ^= b -""" +# """ +# pow_eq!(a, b) +# Equivalent to a ^= b +# """ function pow_eq!(a::fmpq, b::Int)::Nothing #iszero(a) && b < 0 && throw(DivideError()) ccall((:fmpq_pow_si, Nemo.libflint), Nothing, (Ref{fmpq}, Ref{fmpq}, Int), a, a, b) end -""" - mul_eq!(a, b) -Equivalent to a *= b -""" +# """ +# mul_eq!(a, b) +# Equivalent to a *= b +# """ # function mul_eq!(a::fmpq, b::fmpz)::Nothing # ccall((:fmpq_mul, Nemo.libflint), Nothing,(Ref{fmpq}, Ref{fmpq}, Ref{fmpz}), a, a, b) # end @@ -87,10 +87,10 @@ function mul_eq!(a::fmpq, b::Int)::Nothing ccall((:fmpq_mul_si, Nemo.libflint), Nothing,(Ref{fmpq}, Ref{fmpq}, Int), a, a, b) end -""" - add_eq!(a, b) -Equivalent to a += b -""" +# """ +# add_eq!(a, b) +# Equivalent to a += b +# """ function add_eq!(a::fmpq, b::fmpq)::Nothing ccall((:fmpq_add, Nemo.libflint), Nothing,(Ref{fmpq}, Ref{fmpq}, Ref{fmpq}), a, a, b) end @@ -100,10 +100,10 @@ function add_eq!(a::Vector{fmpq}, b::Vector{fmpq})::Nothing end end -""" - div_eq!(a, b) -Equivalent to a /= b -""" +# """ +# div_eq!(a, b) +# Equivalent to a /= b +# """ function div_eq!(a::fmpq, b::fmpq)::Nothing ccall((:fmpq_div, Nemo.libflint), Nothing, (Ref{fmpq}, Ref{fmpq}, Ref{fmpq}), a, a, b) end @@ -111,34 +111,34 @@ function div_eq!(a::fmpq, b::Int)::Nothing ccall((:fmpq_div_fmpz, Nemo.libflint), Nothing, (Ref{fmpq}, Ref{fmpq}, Ref{fmpz}), a, a, fmpz(b)) end -""" - eq!(a, b) -Equivalent to a = b -""" +# """ +# eq!(a, b) +# Equivalent to a = b +# """ function eq!(a::fmpq, b::fmpq)::Nothing ccall((:fmpq_set, Nemo.libflint), Nothing, (Ref{fmpq}, Ref{fmpq}), a, b) end -""" - sub!(a, b) -Equivalent to a -= b -""" +# """ +# sub!(a, b) +# Equivalent to a -= b +# """ function sub!(a::fmpq, b::fmpq)::Nothing ccall((:fmpq_sub, Nemo.libflint), Nothing, (Ref{fmpq}, Ref{fmpq}, Ref{fmpq}), a, a, b) end -""" - neg!(a, b) -Equivalent to a *= -1 -""" +# """ +# neg!(a, b) +# Equivalent to a *= -1 +# """ function neg!(a::fmpq)::Nothing ccall((:fmpq_neg, Nemo.libflint), Nothing, (Ref{fmpq}, Ref{fmpq}), a, a) end -""" - inv!(a, b) -Equivalent to a /= 1 -""" +# """ +# inv!(a, b) +# Equivalent to a /= 1 +# """ function inv!(a::fmpq)::Nothing ccall((:fmpq_inv, Nemo.libflint), Nothing, (Ref{fmpq}, Ref{fmpq}), a, a) end \ No newline at end of file