2 ***********************************************************
3 $SNARK_Header: S N A R K 1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/quad_blurck.cpp $
5 $LastChangedRevision: 80 $
6 $Date: 2014-07-01 21:01:54 -0400 (Tue, 01 Jul 2014) $
8 ***********************************************************
20 void quad_class::blurck(REAL b1, REAL b2, REAL b3, INTEGER bcon, INTEGER npow,
24 static const INTEGER hsnar = CHAR2INT('s', 'n', 'a', 'r');
25 static const INTEGER hkami = CHAR2INT('k', 'a', 'm', 'i');
26 static const INTEGER hsajz = CHAR2INT('s', 'a', 'j', 'z');
27 static const INTEGER hsajc = CHAR2INT('s', 'a', 'j', 'c');
33 if (!((bcon == hsnar) || (bcon == hkami) || (bcon == hsajz)
38 "\n\n ***unrecognized parameter %4s, program stops***",
43 bsum = b1 + (REAL) 4.0 * (b2 + b3);
44 fprintf(output, "\n\n variance of density in an arbitrary pixel is %9.5f", b1);
45 fprintf(output, "\n covariance of densities in neighboring pixels is %9.5f", b2);
46 fprintf(output, "\n covariance of densities in diagonally neighboring pixels is %9.5f", b3);
48 fprintf(output, "\n\n %4s boundary conditions", int2str(bcon));
49 fprintf(output, "\n sum of weights %9.4f", bsum);
51 if (!((bcon != hkami) || (npow == 1)))
54 "\n\n ***for kami only first power is allowed, program stops***");
62 // CHECKING ON POSITIVE-DEFINITENESS OF SMOOTHING MATRIX
66 if ((b1 - 4.0 * b2 + 4.0 * b3) <= -.000001)
68 if ((b1 - 4.0 * b3) <= -.000001)
74 "\n\n ***warning, smoothing matrix is not positive semi definite");
79 // PERFORMING TRADITIONAL SNARK CHECK ON POSITIVITY
81 if ((b1 > Consts.zero) && (b2 >= 0.0) && (b3 >= 0.0))
86 fprintf(output, "\n\n ***elements of smoothing matrix too small or negative, program stops***"); //hstau