Safe Haskell | None |
---|
Programs.Synthesis.Main
Description
This module provides a command line interface to the decomposition library.
- data Options = Options {}
- defaultOptions :: Options
- options :: [OptDescr (Options -> IO Options)]
- dopts :: [String] -> IO Options
- usage :: IO ()
- main :: IO ()
- round_to :: RealFrac r => Integer -> r -> r
- show_exp :: (Show r, RealFrac r, Floating r, PrintfArg r) => Integer -> Integer -> Maybe r -> String
- showlatex_exp :: (Show r, RealFrac r, Floating r, PrintfArg r) => Integer -> Integer -> Maybe r -> String
- expand_seed :: RandomGen g => Integer -> g -> [g]
Option processing
A data type to hold values set by command line options.
Constructors
Options | |
Fields
|
defaultOptions :: OptionsSource
The default options.
options :: [OptDescr (Options -> IO Options)]Source
The list of command line options, in the format required by getOpt
.
dopts :: [String] -> IO OptionsSource
Process argv-style command line options into an Options
structure.
The main function
Miscellaneous
round_to :: RealFrac r => Integer -> r -> rSource
Round a RealFrac
value to the given number of decimals.
show_exp :: (Show r, RealFrac r, Floating r, PrintfArg r) => Integer -> Integer -> Maybe r -> StringSource
Show the number 10-x in the format 10^(-n) or
1.23*10^(-n), with precision d and exponent -n. A value of
Nothing
is treated as 0.
For example, display 0.316*10^(-13)
instead of 10^(-13.5)
.
showlatex_exp :: (Show r, RealFrac r, Floating r, PrintfArg r) => Integer -> Integer -> Maybe r -> StringSource
Show the number 10-x in the format 10^{-n}
or
1.23\cdot 10^{-n}
, with precision d and exponent -n. A value
of Nothing
is treated as 0.
expand_seed :: RandomGen g => Integer -> g -> [g]Source
Expand a random seed g into a list [g1, …, gn] of n random seeds. This is done in such a way that g1 = g.