1
0
mirror of https://github.com/kalmarek/SmallHyperbolic synced 2024-11-27 16:35:26 +01:00

import isprime

This commit is contained in:
kalmarek 2020-11-14 19:24:12 +01:00
parent e01421ace9
commit ae027329be
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -6,9 +6,12 @@ using ArgParse
using Logging using Logging
using Dates using Dates
import RamanujanGraphs.Primes: isprime
include(joinpath(@__DIR__, "src", "eigen_utils.jl")) include(joinpath(@__DIR__, "src", "eigen_utils.jl"))
function SL2p_gens(p) function SL2p_gens(p::Integer)
@assert isprime(p)
if p == 31 if p == 31
a, b = let a, b = let
a = SL₂{p}([8 14; 4 11]) a = SL₂{p}([8 14; 4 11])
@ -98,13 +101,9 @@ end
parsed_args = parse_our_args() parsed_args = parse_our_args()
const p = try const p = let p = parsed_args["p"]
p = parsed_args["p"] isprime(p) || @error "You need to provide a prime, ex: `julia adj_psl2_eigvals.jl -p 31`"
RamanujanGraphs.Primes.isprime(p)
p p
catch ex
@error "You need to provide a prime, ex: `julia adj_psl2_eigvals.jl -p 31`"
rethrow(ex)
end end
const LOGFILE = "SL(2,$p)_eigvals_$(now()).log" const LOGFILE = "SL(2,$p)_eigvals_$(now()).log"