mirror of
https://github.com/kalmarek/SmallHyperbolic
synced 2024-09-01 13:25:35 +02:00
import isprime
This commit is contained in:
parent
e01421ace9
commit
ae027329be
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user