--- /dev/null
+/*
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * *
+ * S N A R K 1 4 *
+ * *
+ * A PICTURE RECONSTRUCTION PROGRAM *
+ * *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ art_tset.cpp,v 1.2 2008/09/06 15:18:05 rdavidi Exp
+
+*/
+
+// Example 2 user-written tolerance function
+// This function returns RAYSUM/(10*ITER) as tolerance.
+
+#include <stdio.h>
+
+#include "blkdta.h"
+#include "uiod.h"
+
+#include "art.h"
+
+REAL art_class::tset(REAL* recon, INTEGER iter, INTEGER np, INTEGER nr,INTEGER i, REAL raysum, INTEGER* list, REAL* weight, BOOLEAN* flag)
+{
+ REAL tmp = raysum / ((REAL)(10 * iter));
+ *flag = FALSE;
+ if(trace >= 1) {
+ fprintf(output, "\n TOLERANCE IS %19.10f \n", tmp);
+ }
+ return tmp;
+}