Added snark14m distribution examples
[snark14.git] / examples / b2 / src / art_tset.cpp
1 /* 
2  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3  *                                                                           *
4  *                              S N A R K   1 4                              *
5  *                                                                           *
6  *                     A PICTURE RECONSTRUCTION PROGRAM                      *
7  *                                                                           *
8  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
9
10  art_tset.cpp,v 1.2 2008/09/06 15:18:05 rdavidi Exp
11
12 */
13
14 //    Example 2  user-written tolerance function
15 //    This function returns RAYSUM/(10*ITER) as tolerance.
16
17 #include <stdio.h>
18
19 #include "blkdta.h"
20 #include "uiod.h"
21
22 #include "art.h"
23
24 REAL art_class::tset(REAL* recon, INTEGER iter, INTEGER np, INTEGER nr,INTEGER i, REAL raysum, INTEGER* list, REAL* weight, BOOLEAN* flag)
25 {  
26   REAL tmp = raysum / ((REAL)(10 * iter));
27   *flag = FALSE;
28   if(trace >= 1) {
29     fprintf(output, "\n          TOLERANCE IS %19.10f \n", tmp);
30   }
31   return tmp;
32 }