File: utils.R

package info (click to toggle)
r-cran-markovchain 0.8.5-4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,060 kB
  • sloc: cpp: 2,854; sh: 13; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 882 bytes parent folder | download | duplicates (2)
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
precomputeData <- function(mc) {
  list(
    object = mc,
    transitionMatrix = mc@transitionMatrix,
    states = mc@states,
    byrow = mc@byrow,
    irreducible = is.irreducible(mc),
    regular = is.regular(mc),
    canonicForm = canonicForm(mc),
    recurrentClasses = recurrentClasses(mc),
    transientClasses = transientClasses(mc),
    recurrentStates = recurrentStates(mc),
    transientStates = transientStates(mc),
    absorbingStates = absorbingStates(mc),
    hittingProbabilities = hittingProbabilities(mc),
    meanNumVisits = meanNumVisits(mc),
    meanRecurrenceTime = meanRecurrenceTime(mc),
    communicatingClasses = communicatingClasses(mc),
    steadyStates = steadyStates(mc),
    reachabilityMatrix = is.accessible(mc)
  )
}

precomputeSteadyStates <- function(mc) {
  list(
    object = mc,
    expected = steadyStates(mc)
  )
}