#ifndef	EVAL_H
#define	EVAL_H

#include <v_lib.h>
#include "decomp.h"
#include "util.h"
#include "state.h"

#define	ARG_MATRIX			1
#define	ARG_VECTOR			2
#define	ARG_DECOMPOSITION	3

typedef struct arg_s
{
	char	*id; /* result of strDup() */
	int		type; /* ARG_MATRIX | ARG_VECTOR | ARG_DECOMPOSITION */
    eval_state_t state;
	vboolean evaluated;
	union	operand
	{
		matrix_p matrix;
		vector_p vector;
		bt_decomp_p	decomposition;
	} op;
}	arg_t, *arg_p;

void evalHelp();
void evalFreeAllArgs(void);
void evalFreeAllOperands(void);
void evalDestroyAllFourierTransformers(void);
vboolean evalAll(vhandle_t script);
vboolean evalOutput(char *file_name,vhandle_t script);
vboolean evalRealFunction(vhandle_t script,vec_t *result);
vboolean evalIntFunction(vhandle_t script,s32_t *result);
vboolean evalUIntFunction(vhandle_t script,u32_t *result);

#endif /* EVAL_H */
