Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Table::Bayes::DumpMatrix ( char *  name,
double **  matrix,
int  nRow,
int  nCol,
const char *  file 
) [inline]

Definition at line 340 of file Bayes.h.

00341     {
00342         std::cout << std::endl << name <<" (" << nRow << " x " << nCol << "):" << std::endl;
00343 
00344         FILE* fp = fopen(file, "wt");
00345         fprintf(fp,"%d\t%d\n",nRow,nCol);
00346 
00347         if (NULL == file)
00348         {
00349             std::cout << "File path deos NOT exist: " << file << std::endl;
00350             return;
00351         }
00352 
00353         for (int i=0; i<nRow; i++)
00354         {
00355             for (int j=0; j<nCol; j++)
00356             {
00357                 fprintf(fp,"%.2f\t", matrix[i][j]);
00358             }
00359             fprintf(fp,"\n");
00360         }
00361 
00362         fclose(fp);
00363     }


Generated on Fri Mar 19 11:20:13 2010 for ImpalaSrc by  doxygen 1.5.1