#include <stdlib.h>
#include <math.h>
#include "aibicom.h"
Include dependency graph for aibicom.c:
Go to the source code of this file.
Functions | |
| void | SS_LinSpace (void) |
| double | SS_GetD1 (int i) |
| Obtain the i-th member of the 1st dimension of the control domain (SS_DOMAIN). | |
| double | SS_GetD2 (int i) |
| Obtain the i-th member of the 2nd dimension of the control domain (SS_DOMAIN). | |
| void | SS_UpdateMask (void) |
| int | SS_FindMin (double *V) |
| void | SS_Init (void) |
| Initializes the interpreter. | |
| void | SS_ApplyDecay (double *V, double K) |
| int | SS_IfExecute (void) |
| Obtains the index of a real-time estimate of the next behavior. | |
| int | SS_Execute (void) |
| Executes the binary interface logic and obtains the index of the updated device behavior. | |
| void | SS_Clear (void) |
| Clear memory used by aibicom. | |
Variables | |
| double * | SS_DOMAIN |
| double * | SS_MASK |
| double * | SS_ESTIMATE |
| double * | ESTIMATE |
| double | SS_RD1 |
| double | SS_RD2 |
| int | SS_OUTI |
Definition in file aibicom.c.
| void SS_ApplyDecay | ( | double * | V, | |
| double | K | |||
| ) |
Definition at line 206 of file aibicom.c.
References SS_RES.
Referenced by SS_Execute(), and SS_IfExecute().
| void SS_Clear | ( | void | ) |
| uint SS_Execute | ( | void | ) |
Executes the binary interface logic and obtains the index of the updated device behavior.
This function executes the binary interface logic modifying the intention estimate accordingly. You must call this procedure only once per binary activation regardless of the number of dimensions in the control domain. The returned value should be used as a parameter in SS_GetD1() and/or SS_GetD2() to obtain the updated behavior from the control domain.
Definition at line 238 of file aibicom.c.
References SS_ApplyDecay(), SS_ESTIMATE, SS_FindMin(), SS_K, SS_MASK, SS_OUTI, SS_RES, and SS_UpdateMask().
| int SS_FindMin | ( | double * | V | ) |
Definition at line 123 of file aibicom.c.
References SS_RES.
Referenced by SS_Execute(), and SS_IfExecute().
| double SS_GetD1 | ( | int | i | ) |
Obtain the i-th member of the 1st dimension of the control domain (SS_DOMAIN).
| [in] | i | required member index. |
Definition at line 47 of file aibicom.c.
References SS_DOMAIN.
Referenced by SS_Init(), and SS_UpdateMask().
| double SS_GetD2 | ( | int | i | ) |
Obtain the i-th member of the 2nd dimension of the control domain (SS_DOMAIN).
| [in] | i | required member index. |
Definition at line 52 of file aibicom.c.
References SS_C, SS_DOMAIN, SS_MAXD1, SS_MIND1, SS_MIND2, SS_RD1, and SS_RD2.
Referenced by SS_Init(), and SS_UpdateMask().
| uint SS_IfExecute | ( | void | ) |
Obtains the index of a real-time estimate of the next behavior.
This function executes the binary interface logic without actually modifying the estimate, thus, it can be used to obtain the index of an estimate of the next behavior, in advance. To recover the actual behavior (not just the index) use SS_GetD1(SS_IfExecute()) and/or SS_GetD2(SS_IfExecute()) for 2D domains.
Definition at line 219 of file aibicom.c.
References ESTIMATE, SS_ApplyDecay(), SS_ESTIMATE, SS_FindMin(), SS_K, SS_MASK, and SS_RES.
| void SS_Init | ( | void | ) |
Initializes the interpreter.
The following parameters must be set before a call to this function:
Definition at line 180 of file aibicom.c.
References ESTIMATE, SS_DOMAIN, SS_ESTIMATE, SS_GetD1(), SS_GetD2(), SS_LinSpace(), SS_MASK, SS_MAXD1, SS_MAXD2, SS_MIND1, SS_MIND2, SS_MTYPE, SS_RD1, SS_RD2, and SS_RES.
| void SS_LinSpace | ( | void | ) |
| void SS_UpdateMask | ( | void | ) |
Definition at line 66 of file aibicom.c.
References SS_2D, SS_GetD1(), SS_GetD2(), SS_MASK, SS_MTYPE, SS_MWIDTH, SS_OUTI, SS_RD1, SS_RD2, and SS_RES.
Referenced by SS_Execute().
| double* ESTIMATE |
| double* SS_DOMAIN |
Pointer to unidimensional control domain
Definition at line 30 of file aibicom.c.
Referenced by SS_Clear(), SS_GetD1(), SS_GetD2(), SS_Init(), and SS_LinSpace().
| double* SS_ESTIMATE |
Pointer to intention estimate
Definition at line 32 of file aibicom.c.
Referenced by SS_Clear(), SS_Execute(), SS_IfExecute(), and SS_Init().
| double* SS_MASK |
Pointer to intention kernel mask
Definition at line 31 of file aibicom.c.
Referenced by SS_Clear(), SS_Execute(), SS_IfExecute(), SS_Init(), and SS_UpdateMask().
| int SS_OUTI |
Interpreter's output index
Definition at line 37 of file aibicom.c.
Referenced by SS_Execute(), and SS_UpdateMask().
| double SS_RD1 |
Range width of 1st dimension of control domain
Definition at line 34 of file aibicom.c.
Referenced by SS_GetD2(), SS_Init(), SS_LinSpace(), and SS_UpdateMask().
| double SS_RD2 |
Range width of 2nd dimension of control domain
Definition at line 35 of file aibicom.c.
Referenced by SS_GetD2(), SS_Init(), and SS_UpdateMask().
1.5.1