15 releases (4 breaking)
0.5.1  Aug 1, 2018 

0.5.0 

0.4.1  Jul 29, 2018 
0.3.1  Jul 13, 2018 
0.1.2  Jun 10, 2018 
#46 in Algorithms
107 downloads per month
Point processes in Rust
Point processes are stochastic processes with a wide range of applications in seismology, epidemiology, or financial mathematics. They are utilized to model the arrival of random events as a function of time.
This crate provides functions to simulate point processes in Rust, built on top of ndarray
.
Timedependent processes
The following timedependent point processes have been implemented within the timedependent
module:
 Poisson point process (homogeneous and inhomogeneous, with custom function)
 Hawkes processes, with an exponential kernel (refer to Dassios and Zhao's 2013 paper (1))
ndimensional processes
The generalized
module provides functions for higherdimensional processes.
For now, only Poisson processes have been implemented.
fn poisson_process(lambda: f64, domain: &T)
where T: Set > ndarray::Array<f64, Ix2> {
...
}
fn variable_poisson<F, T>(lambda: F,max_lambda: f64,domain: &T) > Array2<f64>
where F: Fn(&Array1<f64>) > f64,
T: Set
{
...
}
which takes a reference to a domain, that is a subset of ndimensional space implemented with the Set
trait (see API docs), and returns a 2dimensional array which is a set of point events in ddimensional space falling into the domain.
Examples
Some examples require a yet unpublished version of milliams' plotlib graphing library. To build them, you'll need to checkout plotlib locally:
git clone https://github.com/milliams/plotlib
cargo build example 2d_poisson
To run the examples, do for instance
cargo run example variable_poisson
Some will produce SVG image files in the examples
directory.
The examples show how to use the API.
Dependencies

ndarray 0.11.2
+serde1  ndarrayparallel 0.8.0
 rand 0.5.4
 rayon 1.0.2
 serde 1.0.70
 serde_json 1.0.24