/
RcppExports.R
88 lines (80 loc) · 2.42 KB
/
RcppExports.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Internal function that samples z's from a categorical distribution
#'
#' @param prob A numeric matrix.
#' @param randu A numeric vector.
#'
#'
rmultinom1 <- function(prob, randu) {
.Call(`_bayesmove_rmultinom1`, prob, randu)
}
#' Internal function that samples z's from a multinomial distribution
#'
#' @param prob A numeric vector.
#' @param n An integer.
#' @param randu A numeric vector.
#' @param nmaxclust An integer.
#'
#'
rmultinom2 <- function(prob, n, randu, nmaxclust) {
.Call(`_bayesmove_rmultinom2`, prob, n, randu, nmaxclust)
}
#' Internal function that samples z1 aggregate
#'
#' @param ntsegm An integer.
#' @param b1 An integer.
#' @param y1 An integer matrix.
#' @param nmaxclust An integer.
#' @param lphi1 A numeric matrix.
#' @param ltheta A numeric matrix.
#' @param zeroes A numeric vector.
#'
#'
SampleZAgg <- function(ntsegm, b1, y1, nmaxclust, lphi1, ltheta, zeroes) {
.Call(`_bayesmove_SampleZAgg`, ntsegm, b1, y1, nmaxclust, lphi1, ltheta, zeroes)
}
#' Internal function that calculates the inverted cumsum
#'
#' @param ntsegm An integer.
#' @param nmaxclust An integer.
#' @param z An integer matrix.
#'
#'
CumSumInv <- function(ntsegm, nmaxclust, z) {
.Call(`_bayesmove_CumSumInv`, ntsegm, nmaxclust, z)
}
#' Internal function that summarizes bin distributions of track segments
#'
#' @param VecVals A vector of bin values.
#' @param Breakpts A vector if breakpoints.
#' @param nobs The number of observations.
#' @param nbins The number of bins for a given data stream.
#' @param nbreak The number of estimated breakpoints.
#'
#'
summarize1 <- function(VecVals, Breakpts, nobs, nbins, nbreak) {
.Call(`_bayesmove_summarize1`, VecVals, Breakpts, nobs, nbins, nbreak)
}
#' Internal function that generates nmat matrix to help with multinomial draws
#'
#' @param z An integer vector.
#' @param dat An integer vector.
#' @param ncateg An integer.
#' @param nbehav An integer.
#' @param nobs An integer.
#'
#'
SummarizeDat <- function(z, dat, ncateg, nbehav, nobs) {
.Call(`_bayesmove_SummarizeDat`, z, dat, ncateg, nbehav, nobs)
}
#' This function helps store z from all iterations after burn in
#'
#' @param z An integer vector.
#' @param store_z An integer matrix.
#' @param nobs An integer.
#'
#'
StoreZ <- function(z, store_z, nobs) {
.Call(`_bayesmove_StoreZ`, z, store_z, nobs)
}