| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
StatisticalMechanics.Ensemble
Description
This module provides generic functionality to deal with ensembles in statistical mechanics.
Synopsis
- class StateProbability a where
- stateProbability :: Double -> a -> Probability NotNormalized Double
- stateLogProbability :: Double -> a -> Log (Probability NotNormalized Double)
Documentation
class StateProbability a where Source #
The state probability functions provide conversion from some types a
into non-normalized probabilities. For "real" applications, using the
logProbability function is preferred. This functions allows for easy
abstraction when types a are given as fractions of some actual value (say:
deka-cal), or are discretized.
The returned values are not normalized, because we do not now the total
evidence Z until integration over all states has happened -- which is not
feasible in a number of problems.
TODO replace () with temperature and results with non-normalized P or
LogP, depending. At some point we want to have type-level physical
quantities, hence the need for the second type.
Methods
Arguments
| :: Double | this is |
| -> a | the energy (or discretized energy) |
| -> Probability NotNormalized Double | probability of being in state |
Given a temperature and a state "energy", return the corresponding non-normalized probability.
Arguments
| :: Double | this is |
| -> a | the energy (or discretized energy) |
| -> Log (Probability NotNormalized Double) | resulting probability |
Instances
| StateProbability Double Source # | |
Defined in StatisticalMechanics.Ensemble Methods stateProbability :: Double -> Double -> Probability NotNormalized Double Source # stateLogProbability :: Double -> Double -> Log (Probability NotNormalized Double) Source # | |