|
|
typedef struct xtract_last_n_state_ | xtract_last_n_state |
Functions that extract a feature over multiple frames
◆ xtract_last_n()
| int xtract_last_n |
( |
const xtract_last_n_state * | state, |
|
|
const double * | data, |
|
|
const int | N, |
|
|
const void * | argv, |
|
|
double * | result ) |
Write a vector of the last N input values to result
- Parameters
-
| state | a pointer to an xtract_last_n_state struct as allocated by xtract_last_n_state_new(); NULL is an argument error |
| data | a pointer to a double representing the current input value |
| N | an integer representing 'N' the number of values to be written to *result, at least 1 (fewer is an argument error) and equal to the capacity the state was created with (any other positive size is a bad state) |
| argv | a pointer to NULL |
| result | a pointer to an array of doubles representing the last N values, where the nth value is the current one. The array must have been allocated to size N elements and initialised by the caller |
◆ xtract_last_n_state_delete()
| void xtract_last_n_state_delete |
( |
xtract_last_n_state * | last_n_state | ) |
|
◆ xtract_last_n_state_new()
| xtract_last_n_state * xtract_last_n_state_new |
( |
size_t | capacity | ) |
|
Allocate the state for xtract_last_n() over frames of capacity values
- Parameters
-
- Returns
- a pointer to the new state, or NULL if memory cannot be allocated