#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include "decision-tree.h"
Go to the source code of this file.
Classes | |
struct | DTNodeStruct |
struct | DTTableStruct |
Defines | |
#define | DT_TABLE_DEPTH (4) |
#define | WILDCARD_SPEC (-1) /* redundant definition with imm-reward.h */ |
Typedefs | |
typedef struct DTNodeStruct | DTNode |
typedef struct DTTableStruct | DTTable |
Enumerations | |
enum | { DT_VAL, DT_TABLE } |
Functions | |
void | dtAdd (int action, int cur_state, int next_state, int obs, REAL_VALUE val) |
DTNode * | dtAddInternal (DTNode *node, int *vec, int index, REAL_VALUE val) |
static DTNode * | dtConvertToTable (DTNode *in, int numEntries) |
void | dtDeallocate (void) |
void | dtDebugPrint (const char *header) |
static void | dtDebugPrintNode (DTNode *n, int indent) |
static void | dtDebugPrintTable (DTTable *t, int indent) |
static DTNode * | dtDeepCopyNode (const DTNode *in) |
static void | dtDeepCopyTable (DTTable *out, const DTTable *in) |
static void | dtDestroyNode (DTNode *n) |
static void | dtDestroyTable (DTTable *t) |
REAL_VALUE | dtGet (int action, int cur_state, int next_state, int obs) |
static REAL_VALUE | dtGetInternal (DTNode *node, int *vec, int index) |
void | dtInit (int numActions, int numStates, int numObservations) |
static void | dtInitTable (DTTable *t, int numEntries) |
static DTNode * | dtNewNodeTable (int numEntries) |
static DTNode * | dtNewNodeVal (REAL_VALUE val) |
static void | dtSpaces (int indent) |
Variables | |
static int * | gTableSizes = NULL |
static DTNode * | gTree = NULL |
#define DT_TABLE_DEPTH (4) |
Definition at line 40 of file decision-tree.c.
#define WILDCARD_SPEC (-1) /* redundant definition with imm-reward.h */ |
Definition at line 41 of file decision-tree.c.
typedef struct DTNodeStruct DTNode |
Definition at line 69 of file decision-tree.c.
typedef struct DTTableStruct DTTable |
Definition at line 70 of file decision-tree.c.
anonymous enum |
Definition at line 43 of file decision-tree.c.
void dtAdd | ( | int | action, |
int | cur_state, | ||
int | next_state, | ||
int | obs, | ||
REAL_VALUE | val | ||
) |
Definition at line 365 of file decision-tree.c.
DTNode* dtAddInternal | ( | DTNode * | node, |
int * | vec, | ||
int | index, | ||
REAL_VALUE | val | ||
) |
Definition at line 222 of file decision-tree.c.
static DTNode * dtConvertToTable | ( | DTNode * | in, |
int | numEntries | ||
) | [static] |
Definition at line 200 of file decision-tree.c.
void dtDeallocate | ( | void | ) |
Definition at line 387 of file decision-tree.c.
void dtDebugPrint | ( | const char * | header | ) |
Definition at line 395 of file decision-tree.c.
static void dtDebugPrintNode | ( | DTNode * | n, |
int | indent | ||
) | [static] |
Definition at line 304 of file decision-tree.c.
static void dtDebugPrintTable | ( | DTTable * | t, |
int | indent | ||
) | [static] |
Definition at line 325 of file decision-tree.c.
static DTNode * dtDeepCopyNode | ( | const DTNode * | in | ) | [static] |
Definition at line 164 of file decision-tree.c.
static void dtDeepCopyTable | ( | DTTable * | out, |
const DTTable * | in | ||
) | [static] |
Definition at line 187 of file decision-tree.c.
static void dtDestroyNode | ( | DTNode * | n | ) | [static] |
Definition at line 134 of file decision-tree.c.
static void dtDestroyTable | ( | DTTable * | t | ) | [static] |
Definition at line 152 of file decision-tree.c.
REAL_VALUE dtGet | ( | int | action, |
int | cur_state, | ||
int | next_state, | ||
int | obs | ||
) |
Definition at line 376 of file decision-tree.c.
static REAL_VALUE dtGetInternal | ( | DTNode * | node, |
int * | vec, | ||
int | index | ||
) | [static] |
Definition at line 273 of file decision-tree.c.
void dtInit | ( | int | numActions, |
int | numStates, | ||
int | numObservations | ||
) |
Definition at line 349 of file decision-tree.c.
static void dtInitTable | ( | DTTable * | t, |
int | numEntries | ||
) | [static] |
Definition at line 125 of file decision-tree.c.
static DTNode * dtNewNodeTable | ( | int | numEntries | ) | [static] |
Definition at line 112 of file decision-tree.c.
static DTNode * dtNewNodeVal | ( | REAL_VALUE | val | ) | [static] |
Definition at line 99 of file decision-tree.c.
static void dtSpaces | ( | int | indent | ) | [static] |
Definition at line 295 of file decision-tree.c.
int* gTableSizes = NULL [static] |
Definition at line 92 of file decision-tree.c.
Definition at line 93 of file decision-tree.c.