ELIFE-ASU / Inform

A cross platform C library for information analysis of dynamical systems
https://elife-asu.github.io/Inform
MIT License
21 stars 3 forks source link

Black Boxing Function #54

Closed dglmoore closed 7 years ago

dglmoore commented 7 years ago

When analyzing complex systems, it is often interesting to consider information processing in compound subsystems, e.g. transfer entropy between two groups of nodes instead of between to individual nodes. Instead of implementing that directly, we might want to provide a black boxing facility which essentially collapses the state of a group of nodes into a single encoded value.

Proposed API

EXPORT int* inform_black_box(int const *series, size_t l, size_t n, size_t m, int const *b,
    int const *r, int const *s, int *box, inform_error *err);

Example Usage

int *series = {
    1, 0, 0, 1, 0, 0, 1, 1, 1, 0,
    0, 0, 1, 1, 1, 0, 1, 1, 0, 0
};
int box[8];
inform_error err = INFORM_ERROR;
inform_black_box(series, 2, 1, 10, (int[]){2,2}, (int[]){2, 1}, (int[]){1,0}, box, &err);
// box == {1, 12, 10, 9, 4, 14, 15, 3}