AvlTree-4.2: Balanced binary trees using the AVL algorithm.

Portabilityportable
Stabilitystable
Maintainerhttp://homepages.nildram.co.uk/~ahey/em.png

Data.Tree.AVL.Test.Counter

Description

This module defines the XInt type which is a specialised instance of Ord which allows the number of comparisons performed to be counted. This may be used evaluate various algorithms. The functions defined here are not exported by the main Data.Tree.AVL module. You need to import this module explicitly if you want to use any of them.

Synopsis

Documentation

newtype XInt Source

Basic data type.

Constructors

XInt Int 

Instances

Eq XInt 
Ord XInt

A side effecting instance of Ord.

Read XInt 
Show XInt 

getCount :: IO IntSource

Read the current comparison counter.

resetCount :: IO ()Source

Reset the comparison counter to zero.