The Quipper System

Algorithms.CL.Test

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

A sample square matrix

A sample non-square matrix

Another sample non-square matrix

## Ideals and related types

A sample CLReal.

A sample Ideal.

A sample IdealQ.

A sample IdealRed.

A sample IdealRedQ.

A sample IdDist.

A sample IdDistQ.

A sample IdRedDist.

A sample IdRedDistQ.

# Testing routines

## Smith reduction

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 string for a given Δ.

Show the period for the first n valid Δ's.

Show period string and the list of ideals for a given Δ.

show_bigDs :: Int -> IO () Source #

Show a list of valid Δ's.

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

The the product of all pairs of ideals for a given Δ.

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 the primes code.