ExactSurvivor

class DCProgs::ExactSurvivor

Implementation of recursion for exact missed-event survivor function.

Implements the exact-missed event probability calculations, as detailed in Hawkes, Jalali, and Colquhoun (1990). Specifically, this is equation 3.2.

Subclassed by DCProgs::MissedEventsG

Public Functions

ExactSurvivor(QMatrix const &_qmatrix, t_real _tau)

Initializes exact survivor functor.

Parameters
  • _qmatrix -

    Partitioned matrix with open states in top left corner.

  • _tau -

    Missed event cutoff time.

template <class T>
ExactSurvivor(Eigen::DenseBase<T> const &_qmatrix, t_uint _nopen, t_real _tau)

Initializes exact survivor functor.

Parameters
  • _qmatrix -

    A transition matrix with open states in top left corner

  • _nopen -

    Number of open states.

  • _tau -

    Missed event cutoff time.

ExactSurvivor(ExactSurvivor &&_c)

Move constructor.

void set(QMatrix const &_qmatrix, t_real _tau)

Sets the values for which to compute exact g.

t_stack_rmatrix af(t_real t) const

Probability of no shut times detected between 0 and t.

t_stack_rmatrix fa(t_real t) const

Probability of no open times detected between 0 and t.

t_real get_tau() const

Gets the value of tau;.

t_stack_rmatrix recursion_af(t_uint _i, t_uint _m, t_uint _l) const

Returns recursion matrix for af.

t_stack_rmatrix recursion_fa(t_uint _i, t_uint _m, t_uint _l) const

Returns recursion matrix for af.

t_stack_rmatrix D_af(t_uint _i) const

Returns Di matrix for af.

t_stack_rmatrix D_fa(t_uint _i) const

Returns Di matrix for af.

t_rvector eigenvalues_af() const

Returns eigenvalues for af matrix.

t_rvector eigenvalues_fa() const

Returns eigenvalues for fa matrix.

ExactSurvivor &operator=(ExactSurvivor &&_c)

Move assignment.

class RecursionInterface

Implementation of recursion for exact missed-event Survivor function.

This is an interface to the function recursion_formula. In practice, this object needs not be called directly. Rather the public interface (which is about computing the likelihood for an event of duration t) is in the containing class ExactSurvivor.

Public Types

typedef t_stack_rmatrix t_element

Element on which to perform recursion.

Public Functions

RecursionInterface(QMatrix const &_qmatrix, t_real _tau, bool _doAF = true)

Constructor.

Parameters
  • _qmatrix -

    The transition state matrix for which to compute \(^eR_{AF}(t\rightarrow\infty)\)

  • _tau -

    Maximum length of missed events

  • _doAF -

    Whether to do AF (true) or FA

ExactSurvivor::RecursionInterface::t_element operator()(t_uint _i, t_uint _m, t_uint _l)

Recursion element i, m, l.

t_element const &getD(t_uint _i) const

Returns D values.

t_real get_eigvals(t_uint _i) const

Returns i \(^{th}\) eigenvalue.

t_uint nbeigvals() const

Returns the number of eigenvalues.

t_rvector const &eigenvalues() const

Reference to eigenvalues.

decltype(t_stack_rmatrix::Zero(1,1)) DCProgs::ExactSurvivor::RecursionInterface::zero() const

A null matrix of appropriate size.