Parameters
-
struct PoisParams
typedef struct PoisParams { size_t m_states; scalar *lambda; scalar *gamma; scalar *delta; } PoisParams;
-
size_t PoisParams.m_states
Integral value specifying the number of states in the HMM.
-
scalar *PoisParams.lambda
Pointer to memory for state-dependend means. The object pointed to by
PoisParams.lambdamust hold enough memory forPoisParams.m_statesvalues of typescalar.
-
scalar *PoisParams.gamma
Pointer to memory for transition probability matrix. The object pointed to by
PoisParams.gammamust hold enough memory for two timesPoisParams.m_statesvalues of typescalar.
-
scalar *PoisParams.delta
Pointer to memory for initial distribution. The object pointed to by
PoisParams.deltamust hold enough memory forPoisParams.m_statesvalues of typescalar.
-
size_t PoisParams.m_states
Object creation
-
PoisParams *PoisParams_New(const size_t m_states)
Allocate memory fro a new
PoisParamsstructure for a HMM withm_statesstates.
-
PoisParams *PoisParams_NewFromFile(const char *fpath)
Allocate a new
PoisParamsstructure and initialize it with the data read form file. The data file in location pathfpathmust conform to the data file specification.
-
PoisParams *PoisParams_NewRandom(const size_t m_states)
Allocate memory for a new
PoisParamsfor a HMM withm_statesstates and initialize it with random data. Internally callsPoisParams_SetLambdaRnd(),PoisParams_SetGammaRnd(), andPoisParams_SetDeltaRnd().
-
PoisParams_Delete(this)
Delete a
PoisParamsstruct from memory.
Initialization
-
extern void PoisParams_SetLambda(PoisParams *restrict const params, const scalar *restrict const lambda)
-
extern void PoisParams_SetGamma(PoisParams *restrict const params, const scalar *restrict const gamma)
-
extern void PoisParams_SetDelta(PoisParams *restrict const params, const scalar *restrict const delta)
-
void PoisParams_SetLambdaRnd(PoisParams *restrict const this)
Sample the state-dependend means of
thisuniformly from the interval [1, 100].
-
void PoisParams_SetGammaRnd(PoisParams *restrict const this)
Sample the transition probability matrix (tpm) of
thisrandomly. This function guaratees that each row of the tpm is indeed a discrete probability distribution.
-
void PoisParams_SetDeltaRnd(PoisParams *restrict const this)
Sample the initial distribution of
thisrandomly. This function guaratees that the initial distribution is indeed a discrete probability distributions.
Utilities
-
extern void PoisParams_Copy(const PoisParams *restrict const this, PoisParams *restrict const other)
-
extern void PoisParams_CopyLog(const PoisParams *restrict this, PoisParams *restrict other)
Copy paramters from
thistootherand transformgammaanddeltato log domain.