úÎKkG‡0      !"#$%&'()*+,-./KDCustom data structure, used for constructing individual test cases. Fields: . ps - a pointer to the ProbSpace being tested  res - the expected result * name - a label for identifying this test 0120Custom data type for reporting different errors  <Custom data type used for test results and error reporting. Measure has 2 fields:  event) - a list of samples from the space, and  prob> - a number between 0 and 1 giving the events probability of  occurence. 345The custom type Event) is just an alias for a list of Samples. 6789:QThis is our abstract data type, which represents a sample in the abstract space. OIt has a constructor representing every possible element in the abstract space we'3re modeling. (Currently, just points and ranges of Doubles.) INormally, none of the constructors of this type will be called directly. 0Instead, helper functions are provided, such as  and , which Ohide the implementation details from the user, and present a stable interface. 2Currently, the sole exception to the above is the Empty constructor, which is Oreally just a hack intended to put off the job of making the functions in this Hlibrary more intelligent, with regard to their handling of empty lists. ;<=9We take a probability space to consist of the following:  an 'abstract space'> composed of either discrete or continuous (or a mix) samples  an ' event space'>, which must be a Sigma field defined over the abstract space  a 'probability measure' defined over the event space  Note:' For the sake of efficient coding, the  event space and the  probability measure- are combined in the Haskell data structure, C below. This is permissable, because there has to be a 1:1 O correspondance between them anyway. And it is preferable, because it: 2 keeps the probabilities more closely associated w/ the events, and 9 avoids duplication of code (i.e. - the list of events). >?@AQThis is the helper function intended to be used for constructing a point sample. QThis is the helper function intended to be used for constructing a range sample.  The range is considered open,. That is, its end points are not included. GThis helper function generates a complete and valid probability space, : given a discrete sample space and set of probabilities. .Gets the beginning point of a range, which is not included in the range, ) since ranges are considered to be open. +Gets the ending point of a range, which is not included in the range, )Extracts the probability from a Measure. !#Extracts the Event from a Measure. "6Get the complement of an event from the sample space. #BCalculates the intersection of 2 events (i.e. - list of samples). $KReturns that portion of the first sample that is disjoint from the second. %0Determine if a sample is an element of a space. %(Need this, as opposed to just using B", in order to accomodate ranges.) C&4Checks a list of measures against duplicate events. ',Returns the intersection between 2 samples. (NReduces a list of samples to a single sample representing their intersection. ) Returns the union of 2 samples. Unlike ',  smplUnion* must return a list since, if the 2 input  samples aren'7t adjacent or overlapping, the union of them is a list  containing both. DNAbsorbs a single input sample into a reverse-sorted list, as far as possible, H via unioning. Assumes the single sample to be > the first list entry. *KCollapses a list of samples down to the maximally reduced set, which still ' composes a proper union of the input. EFGHI"getErrStr : Turns a value of type ErrType into a more readable string. +Turns a value of type  TestResult into a human readable string. ,LChecks whether event space is actually a Sigma field over the sample space. J+Power set generator, specific to a list of 5s FMade necessary by the fact that generating all possible unions of all ' possible events grows as 2^(2^N), N = #% of samples, due to much redundancy. -Power set generator KRemove duplicates from a list. .Checks a value of type ) for correctness, and returns a value of  type . /JTakes a test case and returns a string indicating the result of the test. 0  !"#$%&'()*+,-./0 /+., !"#$%&'()*-0   !"#$%&'()*+,-./L      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM randproc-0.4 Data.RandProc ProbSpaceTestErrTypeEventAndCompNoSumOneCertainEventNonUnityProbNullEventNonZeroProbMissingEventsInMeasDupEventsInMeasEventMeasLenMismatchMissingUnionEventMissingCompEventBadEventSamplesMissingCertainEventMissingNullEventEmptyEventSpaceEmptySampleSpace UnknownErr TestResultPassFailerrMeasureSampleEmpty ProbSpacepointrange makeProbSpace rangeBeginrangeEndgetProbgetEvent getCompEventeventIntsmplCompisElem noDupEventssmplInt smplSetInt smplUnion smplSetUnion getRsltStr checkSigmasubs checkProbMeas checkSpacepsresnameeventprobEvent SampleTypeSTFullSTEmptySTRangeSTPointFullRangePointspacemeasureeps sampleTypebaseGHC.ListelemtestElemsmplUnionRecursRevconsolidateRPRscanRPR headIsPoint headIsRange getErrStr eventUnions removeDups