/*
# %M% %Y% %I%
# The latest update : %G% at %U%
#
#%Z% eosBayesWrite ver %I%
#%Z% Created by 
#%Z%
#%Z% Usage : eosBayesWrite 
#%Z% Attention
#%Z%
*/
static char __sccs_id[] = "%Z%eosBayesWrite ver%I%; Date:%D% %Z%";


#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../inc/eosBayes.h"


void eosBayesDistributionWrite(FILE* fpt, eosBayesDistribution* d, int mode){

	int i;
	
	switch(mode){
	
		case 1:
				fprintf(fpt,"#dist: %f\t%f\t%f\t%d\n",d->min,d->max,d->delta,d->n);
				for(i=0;i<d->n;i++){
					fprintf(fpt,"%f\n",d->prob[i]);
				}
				fprintf(fpt,"\n");

				break;
		case 2:
				break;

		default:
				fprintf(stderr,"");
				break;

	}

}


void eosBayesPriorWrite(FILE* fpt, eosBayes* d, int mode){

	int i;

	for(i=0;i<d->numDistribution;i++){
		eosBayesDistributionWrite(fpt,&(d->prior[i]),1);
	}


}

void eosBayesPosteriorWrite(FILE* fpt, eosBayes* d, int mode){

	int i;

	for(i=0;i<d->numDistribution;i++){
		eosBayesDistributionWrite(fpt,&(d->posterior[i]),1);
	}


}



void eosBayesLikelihoodWrite(FILE* fpt, eosBayes* d, int mode){

	int i;

	for(i=0;d->numLikelihood;i++){
		eosBayesDistributionWrite(fpt,&(d->likelihood[i]),2);
	}


}



void eosBayesWrite(FILE* fpt, eosBayes* d, int mode){
}
