goal-core-0.1: Core imports for Geometric Optimization Libraries.

Safe HaskellNone
LanguageHaskell2010

Goal.Core

Contents

Synopsis

Module Exports

module Data.Ord

module Data.List

module Data.Maybe

module Numeric

Lists

takeEvery :: Int -> [x] -> [x] Source

Takes every nth element, starting with the head of the list.

breakEvery :: Int -> [x] -> [[x]] Source

Break the list up into lists of length n.

Low-Level

traceGiven :: Show a => a -> a Source

Runs traceShow on the given element.

Numeric

roundSD :: (Floating x, RealFrac x) => Int -> x -> x Source

Roundest the number to the specified significant digit.

toPi :: (Floating x, RealFrac x) => x -> x Source

Modulo pi thingy.

Functions

logistic :: Floating x => x -> x Source

A standard sigmoid function.

logit :: Floating x => x -> x Source

The inverse of the logistic.

Lists

mean :: Fractional x => [x] -> x Source

Average value of a list of numbers.

range :: Double -> Double -> Int -> [Double] Source

Returns n numbers from mn to mx.

discretizeFunction :: Double -> Double -> Int -> (Double -> Double) -> [(Double, Double)] Source

Takes range information in the form of a minimum, maximum, and sample count, a function to sample, and returns a list of pairs (x,f(x)) over the specified range.