mc.cpp
void mc::write_sample(FILE *pfile, double misfit, int iteration)
{
    if (iteration==0) fprintf(pfile,"%d %d\n",Nq,iterations+1);
    
    for (int i=0; i<Nq; i++) fprintf(pfile,"%lg ",q.q[i]);
    fprintf(pfile,"%lg ",misfit);
    fprintf(pfile,"\n");
}
/* Write a sample to an open file. ------------------------------------------------*/
Write a sample to an open file.
Write a sample to an open file .
void mc::write_sample(FILE *pfile, double misfit, int iteration)
{
    if (iteration==0) fprintf(pfile,"%d %d\n",Nq,iterations+1);
    for (int i=0; i<Nq; i++) fprintf(pfile,"%lg ",q.q[i]);
    fprintf(pfile,"%lg ",misfit);
    fprintf(pfile,"\n");
}
void mc :: write_sample ( FILE * pfile , double misfit , int iteration ) { if ( iteration == 0 ) fprintf ( pfile , " \n " , Nq , iterations + 1 ) ; for ( int i = 0 ; i < Nq ; i ++ ) fprintf ( pfile , " " , q . q [ i ] ) ; fprintf ( pfile , " " , misfit ) ; fprintf ( pfile , " \n " ) ; }
Write a sample to an open file.
Write a sample to an open file .