Exemplo n.º 1
0
static void dumpVariables( Stream& stream, const char* inClass = NULL )
{
   const U32 hashTableSize = gEvalState.globalVars.hashTable->size;
   for( U32 i = 0; i < hashTableSize; ++ i )
      for( Dictionary::Entry* entry = gEvalState.globalVars.hashTable->data[ i ]; entry != NULL; entry = entry->nextEntry )
         dumpVariable( stream, entry, inClass );
}
Exemplo n.º 2
0
void dumpBayesNet(BayesNet* bayesnet) {
	int i;

	// Dump do grafo
	printf("Graph:");
	dumpGraph(bayesnet->graph);

	// Dump das variáveis
	for (i=0;i<bnsize(bayesnet);i++) dumpVariable(bayesnet->variables[i]);

	// Dump dos potenciais
	for (i=0;i<bnsize(bayesnet);i++) dumpPotential(bayesnet->potentials[i]);
}
Exemplo n.º 3
0
void dumpElimination(Elimination* elimination) {

	SingleLinkedListNode* current;

	fprintf(DBGOUT,"Elimination: %d\n",elimination->id);

	if (elimination->variable!=NULL) {
		dumpVariable(elimination->variable);
	} else {
		fprintf(DBGOUT,"Variable = NULL\n");
	}

	fprintf(DBGOUT,"Potenciais:\n");
	current = elimination->potentials->first;
	while (current!=NULL) {
		dumpPotential((Potential*)current->data);
		current = current->next;
	}
}