pointprocesses/temporal/
cox.rs

1/* Cox processes
2 *
3 */
4use crate::temporal::traits::*;
5use rand::prelude::*;
6use rand_distr::{StandardNormal};
7
8use ndarray::array;
9use ndarray::prelude::*;
10use ndarray_parallel::prelude::*;
11
12use rayon::prelude::*;
13
14
15/// Lognormal Cox process.
16pub struct LognormalCox {
17    mu: f64,
18    sigma: f64
19}
20
21
22impl StochasticIntensity for LognormalCox {}
23
24impl TemporalProcess for LognormalCox {
25    /// Algorithm: acceptance-rejection method
26    /// Propose new event time, compute brownian increment,
27    /// update intensity and accept/reject
28    fn sample(&self, tmax: f64) -> TimeProcessResult {
29
30        let x = array![0.];
31        let y = array![0.];
32        TimeProcessResult {
33            timestamps: x,
34            intensities: y
35        }
36    }
37}
38
39