Safe Haskell | None |
---|
Algorithms.CL.Test
Contents
Description
Test the Class Number algorithm, and its components, using classical computation
- sample_matrix :: CLMatrix Integer
- sample_matrix_2 :: CLMatrix Integer
- sample_matrix_3 :: CLMatrix Integer
- sample_CLReal :: Int -> FPReal
- sample_Ideal :: CLIntP -> Ideal
- sample_IdealQ :: CLIntP -> IdealQ
- sample_IdealRed :: CLIntP -> IdealRed
- sample_IdealRedQ :: CLIntP -> IdealRedQ
- sample_IdDist :: CLIntP -> IdDist
- sample_IdDistQ :: CLIntP -> IdDistQ
- sample_IdRedDist :: CLIntP -> IdRedDist
- sample_IdRedDistQ :: CLIntP -> IdRedDistQ
- test_SNF :: IO ()
- period_of_ideals :: (IdDist -> IdDist) -> IdDist -> (CLReal, [IdDist])
- show_period_for_bigD :: CLIntP -> String
- show_period_for_many_bigDs :: Int -> IO ()
- show_period_for_some_bigD :: CLIntP -> IO ()
- show_bigDs :: Int -> IO ()
- first_few :: IO ()
- op_all_ideals :: (IdDist -> IdDist -> IdDist) -> String -> CLIntP -> IO ()
- dot_all_ideals :: CLIntP -> IO ()
- star_all_ideals :: CLIntP -> IO ()
- test_bounded_while :: (Show int, Integral int) => int -> int -> IO ()
- main :: IO ()
- test_primes :: IO ()
Sample data
Some fairly arbitrarily chosen sample elements of various types, for convenience in testing functions.
Matrices
sample_matrix :: CLMatrix IntegerSource
A sample square matrix
sample_matrix_2 :: CLMatrix IntegerSource
A sample non-square matrix
sample_matrix_3 :: CLMatrix IntegerSource
Another sample non-square matrix
Ideals and related types
sample_CLReal :: Int -> FPRealSource
A sample CLReal
.
sample_Ideal :: CLIntP -> IdealSource
A sample Ideal
.
sample_IdealQ :: CLIntP -> IdealQSource
A sample IdealQ
.
sample_IdealRed :: CLIntP -> IdealRedSource
A sample IdealRed
.
sample_IdealRedQ :: CLIntP -> IdealRedQSource
A sample IdealRedQ
.
sample_IdDist :: CLIntP -> IdDistSource
A sample IdDist
.
sample_IdDistQ :: CLIntP -> IdDistQSource
A sample IdDistQ
.
sample_IdRedDist :: CLIntP -> IdRedDistSource
A sample IdRedDist
.
sample_IdRedDistQ :: CLIntP -> IdRedDistQSource
A sample IdRedDistQ
.
Testing routines
Smith reduction
Class group functions
period_of_ideals :: (IdDist -> IdDist) -> IdDist -> (CLReal, [IdDist])Source
Classical period finding (just compare the "next" ideal to O and see if it is the same). Takes in the O ideal with appropriate Δ, and returns the circle length (sum δ(I)) and the list of ideals in the first iteration.
show_period_for_bigD :: CLIntP -> StringSource
Show period string for a given Δ.
show_period_for_many_bigDs :: Int -> IO ()Source
Show the period for the first n valid Δ's.
show_period_for_some_bigD :: CLIntP -> IO ()Source
Show period string and the list of ideals for a given Δ.
show_bigDs :: Int -> IO ()Source
Show a list of valid Δ's.
op_all_ideals :: (IdDist -> IdDist -> IdDist) -> String -> CLIntP -> IO ()Source
Perform an operation on all ideal pairs that are generated by Δ.
dot_all_ideals :: CLIntP -> IO ()Source
The the product of all pairs of ideals for a given Δ.
star_all_ideals :: CLIntP -> IO ()Source
Take the star product of all pairs of ideals for a given Δ.
test_bounded_while :: (Show int, Integral int) => int -> int -> IO ()Source
Test the bounded_while
functionality.
test_primes :: IO ()Source
Test the primes code.