tree_init: tree_init

Description Usage Arguments Details Value Examples

View source: R/trees.R

Description

This function initializes a tree (encoded as a list).

Usage

1
tree_init(X_0)

Arguments

X_0

is a dimX by N matrix representing a set of N initial dimX-dimensional particles.

Details

See Path storage in the particle filter, by Jacob, Murray, Rubenthaler (2015) [https://link.springer.com/article/10.1007/s11222-013-9445-x]

Value

This function outputs a list containing the following objects:

N

Number of particles (i.e. ncol(X_0)).

M

Size of the buffer (initialized at 10*N, increased automatically when needed).

dimX

Dimension of each particle (i.e. nrow(X_0)).

a_star

Vector of length M encoding ancestors (see details).

o_star

Vector of length M encoding number of offsprings (see details).

x_star

Matrix of size dimX by M encoding particles (see details).

l_star

Vector of length N containing the indices of the leaves (see details).

nstep

Height of the tree (starting at 0 with the root nodes).

Examples

1
2
3
4
N = 5
dimX = 2
X_0 = matrix(rnorm(N*dimX), nrow = dimX, ncol = N)
tree = tree_init(X_0)

pierrejacob/PET documentation built on May 25, 2019, 11:35 p.m.