raft-0.3.7.2: Miscellaneous Haskell utilities for data structures and data manipulation.

Safe HaskellSafe
LanguageHaskell2010

Data.Function.Tabulated

Contents

Description

Deprecated: This module will be replaced in a future release.

Data tables that behave as functions.

Synopsis

One dimension

class DomainFunction1 t where Source #

Class for functions of one variable, supported on a particular domain.

Minimal complete definition

domain1, evaluate1

Methods

domain1 :: Ord a => t a -> [a] Source #

The domain of the function.

evaluate1 :: Ord a => t a -> a -> Maybe Double Source #

class DomainFunction1 t => TabulatedFunction1 t where Source #

Class for tabulated functions of one variable.

Minimal complete definition

fromTable1

Methods

fromTable1 :: Ord a => [(a, Double)] -> t a Source #

Make a tabulated function from a table.

fromUnTable1 :: Ord a => (b -> (a, Double)) -> [b] -> t a Source #

Make a tabulated function for a generating function and a list of values.

Two dimensions

class DomainFunction2 t where Source #

Class for functions of two variables, supported on a particular domain.

Minimal complete definition

domain2, evaluate2

Methods

domain2 :: (Ord a, Ord b) => t a b -> ([a], [b]) Source #

The domain of the function.

evaluate2 :: (Ord a, Ord b) => t a b -> a -> b -> Maybe Double Source #

Instances

class DomainFunction2 t => TabulatedFunction2 t where Source #

Class for tabulated functions of two variables.

Minimal complete definition

fromTable2

Methods

fromTable2 :: (Ord a, Ord b) => [((a, b), Double)] -> t a b Source #

Make a tabulated function from a table.

fromUnTable2 :: (Ord a, Ord b) => (c -> ((a, b), Double)) -> [c] -> t a b Source #

Instances

TabulatedFunction2 TabulatedFunctionImpl2 Source # 

Methods

fromTable2 :: (Ord a, Ord b) => [((a, b), Double)] -> TabulatedFunctionImpl2 a b Source #

fromUnTable2 :: (Ord a, Ord b) => (c -> ((a, b), Double)) -> [c] -> TabulatedFunctionImpl2 a b Source #

data TabulatedFunctionImpl2 a b Source #

Implementation of a tabulated function of two variables.

Three dimensions

class DomainFunction3 t where Source #

Class for functions of three variables,

Minimal complete definition

domain3, evaluate3

Methods

domain3 :: (Ord a, Ord b, Ord c) => t a b c -> ([a], [b], [c]) Source #

The domain of the function.

evaluate3 :: (Ord a, Ord b, Ord c) => t a b c -> a -> b -> c -> Maybe Double Source #

Instances

DomainFunction3 TabulatedFunctionImpl3 Source # 

Methods

domain3 :: (Ord a, Ord b, Ord c) => TabulatedFunctionImpl3 a b c -> ([a], [b], [c]) Source #

evaluate3 :: (Ord a, Ord b, Ord c) => TabulatedFunctionImpl3 a b c -> a -> b -> c -> Maybe Double Source #

class DomainFunction3 t => TabulatedFunction3 t where Source #

Class for tabulated functions of two variables.

Minimal complete definition

fromTable3

Methods

fromTable3 :: (Ord a, Ord b, Ord c) => [((a, b, c), Double)] -> t a b c Source #

Make a tabulated function from a table.

fromUnTable3 :: (Ord a, Ord b, Ord c) => (d -> ((a, b, c), Double)) -> [d] -> t a b c Source #

Instances

TabulatedFunction3 TabulatedFunctionImpl3 Source # 

Methods

fromTable3 :: (Ord a, Ord b, Ord c) => [((a, b, c), Double)] -> TabulatedFunctionImpl3 a b c Source #

fromUnTable3 :: (Ord a, Ord b, Ord c) => (d -> ((a, b, c), Double)) -> [d] -> TabulatedFunctionImpl3 a b c Source #

data TabulatedFunctionImpl3 a b c Source #

Implementation of a tabulated function of three variables.

Instances

TabulatedFunction3 TabulatedFunctionImpl3 Source # 

Methods

fromTable3 :: (Ord a, Ord b, Ord c) => [((a, b, c), Double)] -> TabulatedFunctionImpl3 a b c Source #

fromUnTable3 :: (Ord a, Ord b, Ord c) => (d -> ((a, b, c), Double)) -> [d] -> TabulatedFunctionImpl3 a b c Source #

DomainFunction3 TabulatedFunctionImpl3 Source # 

Methods

domain3 :: (Ord a, Ord b, Ord c) => TabulatedFunctionImpl3 a b c -> ([a], [b], [c]) Source #

evaluate3 :: (Ord a, Ord b, Ord c) => TabulatedFunctionImpl3 a b c -> a -> b -> c -> Maybe Double Source #

(Show a, Show b, Show c) => Show (TabulatedFunctionImpl3 a b c) Source #