The Quipper System

Safe HaskellNone

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 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

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 -> 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.

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.