quipper-algorithms-0.9.0.0: A set of algorithms implemented in Quipper.

Safe HaskellNone
LanguageHaskell98

Quipper.Algorithms.CL.Test

Contents

Description

Test the Class Number algorithm, and its components, using classical computation

Synopsis

Sample data

Some fairly arbitrarily chosen sample elements of various types, for convenience in testing functions.

Matrices

sample_matrix :: CLMatrix Integer Source #

A sample square matrix

sample_matrix_2 :: CLMatrix Integer Source #

A sample non-square matrix

sample_matrix_3 :: CLMatrix Integer Source #

Another sample non-square matrix

Ideals and related types

Testing routines

Smith reduction

test_SNF :: IO () Source #

Test the Smith Normal Form code.

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 -> String Source #

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.

first_few :: IO () Source #

Explicitly compute first few ideals for some Δ.

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.

main :: IO () Source #

Run classical tests for Class Number algorithm.

test_primes :: IO () Source #

Test the primes code.