survey3debug.c: (Matching .h file)


/* survey3debug.c routines to help debug the mat package.
 * © Copyright 1999 by John Halleck
 * All rights reserved.
 */
/* Version of August 16th, 1999 */

#include <stdio.h>
  /* Standard IO */

#include "errors.h"
  /* Common error codes */

#include "survey3debug.h"
  /* And interfaces specific to this. */

/* --------------------- Printing ----------------------------------- */

/* Coordinates */

error coordprint (char *text, coordinate given) {
   if (text) printf ("%s\n", text);
   if (!given) return ERRnil;
  
   printf ("[ %f ]\n", given [0] );
   printf ("[ %f ]\n", given [1] );
   printf ("[ %f ]\n", given [2] ); 

   return NoError;
}

/* Matrices */

error s33print (char *text, double given[]) {
  if (text) printf ("%s\n", text);
  if (!given) return ERRnil;

  printf ("[ %f %f %f ]\n", given[0], given[1], given[2]);
  printf ("[ %f %f %f ]\n", given[1], given[3], given[4]);
  printf ("[ %f %f %f ]\n", given[2], given[4], given[5]);

  return NoError;
}

error covarprint (char *text, covariance given) {
  return s33print (text, given);
}

error weightprint (char *text, weight given) {
  return s33print (text, given);
}

Go to ...


This page is http://www.cc.utah.edu/~nahaj/cave/survey/code/c/survey3debug.c.html
© Copyright 2000 by John Halleck, All Rights Reserved.
This snapshot was last modified on August 23rd, 2000
And the underlying file was last modified on May 11th, 2000