boltzmann-brain-1.4: Boltzmann sampler compiler for combinatorial systems.

Copyright(c) Maciej Bendkowski 2017-2018
LicenseBSD3
Maintainermaciej.bendkowski@tcs.uj.edu.pl
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Boltzmann.System

Description

General utilities for combinatorial system of algebraic and rational systems.

Synopsis

Documentation

data System a Source #

System of combinatorial structures.

Constructors

System 

Fields

Instances

Show a => Show (System a) Source # 

Methods

showsPrec :: Int -> System a -> ShowS #

show :: System a -> String #

showList :: [System a] -> ShowS #

size :: System a -> Int Source #

Size of a combinatorial system.

constructors :: System a -> Int Source #

Constructors of a combinatorial system.

data Cons a Source #

Type constructor.

Constructors

Cons 

Fields

Instances

Eq a => Eq (Cons a) Source # 

Methods

(==) :: Cons a -> Cons a -> Bool #

(/=) :: Cons a -> Cons a -> Bool #

Show a => Show (Cons a) Source # 

Methods

showsPrec :: Int -> Cons a -> ShowS #

show :: Cons a -> String #

showList :: [Cons a] -> ShowS #

data Arg Source #

Type constructor arguments.

Constructors

Type String

Regular type reference.

List String

Type list reference.

Instances

Eq Arg Source # 

Methods

(==) :: Arg -> Arg -> Bool #

(/=) :: Arg -> Arg -> Bool #

Show Arg Source # 

Methods

showsPrec :: Int -> Arg -> ShowS #

show :: Arg -> String #

showList :: [Arg] -> ShowS #

argName :: Arg -> String Source #

The name of an argument.

types :: System a -> Set String Source #

Type set of the given system.

data PSystem a Source #

Parametrised system of combinatorial structures.

Constructors

PSystem 

Fields

typeList :: PSystem a -> [String] Source #

Type list of the given parametrised system.

initType :: System a -> String Source #

First (in alphabetical order) type in system.

paramTypes :: PSystem a -> [(String, [Cons a])] Source #

List of types with corresponding constructors.

paramTypesW :: PSystem a -> [(String, [(Cons a, Int)])] Source #

List of types with corresponding constructors and input weights.

typeWeight :: PSystem Double -> String -> Double Source #

Type weight of the given parametrised system.

seqTypes :: System a -> [String] Source #

List of sequence types.

data SystemType Source #

Type of a combinatorial system. Note: System other than rational or algebraic are not yet supported.

Constructors

Rational 
Algebraic 
Unsupported String

error message

systemType :: System a -> SystemType Source #

Determines the system type.

hasAtoms :: System a -> Bool Source #

Determines whether the system has atoms.

evalT :: System Int -> Double -> Vector Double -> [Cons Int] -> Double Source #

Evaluates the type in the given coordinates.

evalC :: System Int -> Double -> Vector Double -> Cons Int -> Double Source #

Evaluates the constructor in the given coordinates.

evalA :: System Int -> Vector Double -> Arg -> Double Source #

Evaluates the argument in the given coordinates.

eval :: System Int -> Vector Double -> Double -> Vector Double Source #

Evaluates the system at the given coordinates.

data SystemT a Source #

Instances

toSystemT :: System a -> SystemT a Source #

Converts a given system to an output format.