Spatial

smfsb.Spatial
object Spatial

All functions and utilities relating to spatial simulation

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Spatial.type

Members list

Value members

Concrete methods

def cle1d(n: Spn[DoubleState], d: DoubleState, dt: Double): (Seq[DoubleState], Time, Time) => Seq[DoubleState]

The 1d spatial CLE algorithm

The 1d spatial CLE algorithm

Value parameters

d

A vector of diffusion coefficients - one for each species

dt

Time step of the simulation algorithm

n

A Spn[DoubleState] model for simulation

Attributes

Returns

A function with type signature (x0: GenSeq[DoubleState], t0: Time, deltat: Time) => GenSeq[DoubleState] which will simulate the state of the system at time t0+deltat given initial state x0 and initial time t0

The 2d spatial CLE algorithm

The 2d spatial CLE algorithm

Value parameters

d

A vector of diffusion coefficients - one for each species

dt

Time step of the simulation algorithm

n

A Spn[DoubleState] model for simulation

Attributes

Returns

A function with type signature (x0: PMatrix[DoubleState], t0: Time, deltat: Time) => PMatrix[DoubleState] which will simulate the state of the system at time t0+deltat given initial state x0 and initial time t0

def euler1d(n: Spn[DoubleState], d: DoubleState, dt: Double): (Seq[DoubleState], Time, Time) => Seq[DoubleState]

The 1d spatial Euler algorithm

The 1d spatial Euler algorithm

Value parameters

d

A vector of diffusion coefficients - one for each species

dt

Time step of the simulation algorithm

n

A Spn[DoubleState] model for simulation

Attributes

Returns

A function with type signature (x0: GenSeq[DoubleState], t0: Time, deltat: Time) => GenSeq[DoubleState] which will simulate the state of the system at time t0+deltat given initial state x0 and initial time t0

The 2d spatial Euler algorithm

The 2d spatial Euler algorithm

Value parameters

d

A vector of diffusion coefficients - one for each species

dt

Time step of the simulation algorithm

n

A Spn[DoubleState] model for simulation

Attributes

Returns

A function with type signature (x0: PMatrix[DoubleState], t0: Time, deltat: Time) => PMatrix[DoubleState] which will simulate the state of the system at time t0+deltat given initial state x0 and initial time t0

def gillespie1d(n: Spn[IntState], d: DoubleState, minH: Double, maxH: Double): (Seq[IntState], Time, Time) => Seq[IntState]

The 1d spatial Gillespie algorithm

The 1d spatial Gillespie algorithm

Value parameters

d

A vector of diffusion coefficients - one for each species

maxH

Threshold for terminating simulation early

minH

Threshold for treating hazard as zero

n

A Spn[IntState] model for simulation

Attributes

Returns

A function with type signature (x0: GenSeq[IntState], t0: Time, deltat: Time) => GenSeq[IntState] which will simulate the state of the system at time t0+deltat given initial state x0 and initial time t0

def gillespie2d(n: Spn[IntState], d: DoubleState, minH: Double, maxH: Double): (PMatrix[IntState], Time, Time) => PMatrix[IntState]

The 2d spatial Gillespie algorithm

The 2d spatial Gillespie algorithm

Value parameters

d

A vector of diffusion coefficients - one for each species

maxH

Threshold for terminating simulation early

minH

Threshold for treating hazard as zero

n

A Spn[IntState] model for simulation

Attributes

Returns

A function with type signature (x0: PMatrix[IntState], t0: Time, deltat: Time) => PMatrix[IntState] which will simulate the state of the system at time t0+deltat given initial state x0 and initial time t0

def plotTs1d[S : State](ts: Ts[Seq[S]]): Unit

Plot the output of a 1d time series simulation. Called solely for the side-effect of rendering a plot on the console.

Plot the output of a 1d time series simulation. Called solely for the side-effect of rendering a plot on the console.

Value parameters

ts

Output from a 1d spatial time series simulation

Attributes