~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/file/matrix/covar_w.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2   */
  3 #include <stdio.h>
  4 #include <values.h>
  5 #include <tina/sys.h>
  6 #include <tina/sysfuncs.h>
  7 #include <tina/math.h>
  8 #include <tina/mathfuncs.h>
  9 #include <tina/vision.h>
 10 #include <tina/visionfuncs.h>
 11 
 12 extern void dmatrix_write_fp(FILE * fp, Matrix * a, int log);
 13 
 14 void    covar_write_fp(FILE * fp, Covar * cov)
 15 {
 16     int     i;
 17 
 18     if (cov == NULL)
 19         return;
 20     (void) fprintf(fp, " %d \n", cov->n);
 21     (void) fprintf(fp, " %d \n", cov->label);
 22     dmatrix_write_fp(fp, cov->mat, 0);
 23     (void) fprintf(fp, "\n");
 24     for (i = 0; i < cov->n; i++)
 25         (void) fprintf(fp, " %f", VECTOR_DOUBLE(cov->vec, i));
 26     (void) fprintf(fp, "\n");
 27 }
 28 
 29 void    covar_write(char *pathname, Covar * cov)
 30 {
 31     FILE   *fp;
 32     char    temps[1024];
 33 
 34     if ((fp = fopen(pathname, "w")) == NULL)
 35     {
 36         (void) string_append(temps, "cannot open file ", pathname, 0);
 37         error(temps, non_fatal);
 38         return;
 39     }
 40     covar_write_fp(fp, cov);
 41     (void) fclose(fp);
 42 }
 43 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.