openModeller  Version 1.5.0
environmental_distance.cpp
Go to the documentation of this file.
1 //
2 // Generic environmental distance algorithm
3 //
4 // Description: Generic algorithm based on distances.
5 //
6 // Authors: Danilo J. S. Bellini <danilo.estagio@gmail.com>
7 // Renato De Giovanni <renato@cria.org.br>
8 // Copyright: See COPYING file that comes with this distribution
9 // Date: 2006-09-18
10 //
11 
15 
16 //
17 // METADATA
18 //
19 #define DATA_MIN 0.0
20 #define DATA_MAX 1.0
21 #define NUM_PARAM 3
22 
23 #define PARDISTTYPE "DistanceType"
24 #define PARPOINTQNT "NearestPoints"
25 #define PARDIST "MaxDistance"
26 #define PARDISTMIN 0.0
27 #define PARDISTMAX 1.0
28 
29 #define LOG_SQRT_PI 0.5723649429247000870717135 /* log (sqrt (pi)) */
30 #define I_SQRT_PI 0.5641895835477562869480795 /* 1 / sqrt (pi) */
31 #define BIGX 20.0 /* max value to represent exp (x) */
32 #define ex(x) (((x) < -BIGX) ? 0.0 : exp (x))
33 #define Z_MAX 6.0 /* maximum meaningful z value */
34 
35 static AlgParamMetadata parameters[NUM_PARAM] = { // Parameters
36  { // 1st parameter
37  PARDISTTYPE, // Id
38  "Metric", // Name
39  Integer, // Type
40  "Metric used to calculate distances: " // Overview
41  "1=Euclidean, "
42  "2=Mahalanobis, "
43  "3=Manhattan/Gower, "
44  "4=Chebyshev.",
45  "Metric used to calculate distances: " // Description
46  "1=Euclidean, "
47  "2=Mahalanobis, "
48  "3=Manhattan/Gower, "
49  "4=Chebyshev",
50  1, // Not zero if the parameter has lower limit
51  FIRST_DISTANCE_TYPE, // Parameter's lower limit
52  1, // Not zero if the parameter has upper limit
53  FIRST_DISTANCE_TYPE + AMOUNT_DISTANCE_TYPES - 1, // Parameter's upper limit
54  "1" // Parameter's typical (default) value
55  },
56  { // 2nd parameter
57  PARPOINTQNT, // Id
58  "Nearest \'n\' points", // Name
59  Integer, // Type
60  "Nearest \'n\' points whose mean value will be the reference when calculating environmental distances.", // Overview
61  "Nearest \'n\' points whose mean value will be the reference when calculating environmental distances. When set to 1, distances will be measured to the closest point, which is the same behavior of the previously existing minimum distance algorithm. When set to 0, distances will be measured to the average of all presence points, which is the same behavior of the previously existing distance to average algorithm. Intermediate values between 1 and the total number of presence points are now accepted.", // Description
62  1, // Not zero if the parameter has lower limit
63  0, // Parameter's lower limit
64  1, // Not zero if the parameter has upper limit
65  1000, // Parameter's upper limit
66  "1" // Parameter's typical (default) value
67  },
68  { // 3rd parameter
69  PARDIST, // Id
70  "Maximum distance", // Name
71  Real, // Type
72  "Maximum distance to the reference in the environmental space.", // Overview
73  "Maximum distance to the reference in the environmental space, above which the conditions will be considered unsuitable for presence. Since 1 corresponds to the biggest possible distance between any two points in the environment space, setting the maximum distance to this value means that all points in the environmental space will have an associated probability. The probability of presence for points that fall within the range of the maximum distance is inversely proportional to the distance to the reference point (linear decay). The only exception is when the maximum distance is 1 and the metric is Mahalanobis, which will produce probabilities following the chi-square distribution.", // Description
74  1, // Not zero if the parameter has lower limit
75  PARDISTMIN, // Parameter's lower limit
76  1, // Not zero if the parameter has upper limit
77  PARDISTMAX, // Parameter's upper limit
78  "0.1" // Parameter's typical (default) value
79  },
80 };
81 
82 static AlgMetadata metadata = { // General metadata
83  "ENVDIST", // Id
84  "Environmental Distance", // Name
85  "0.5", // Version
86  "Generic algorithm based on environmental dissimilarity metrics.", // Overview
87  "Generic algorithm based on environmental dissimilarity metrics. When used with the Gower metric and maximum distance 1, this algorithm should produce the same result of the algorithm known as DOMAIN.", // Description
88  "Mauro E. S. Muņoz, Renato De Giovanni, Danilo J. S. Bellini", // Algorithm author
89  "Carpenter G, Gillison AN, Winter J (1993) DOMAIN: A flexible modeling procedure for mapping potential distributions of animals and plants. Biodiversity and Conservation 2: 667-680. Farber O & Kadmon R 2003. Assessment of alternative approaches for bioclimatic modeling with special emphasis on the Mahalanobis distance. Ecological Modelling 160: 115-130.", // Bibliography
90  "Danilo J. S. Bellini, Renato De Giovanni", // Code author
91  "danilo . estagio [at] gmail . com, renato [at] cria . org . br", // Code author's contact
92  0, // Does not accept categorical data
93  0, // Does not need (pseudo)absence points
94  NUM_PARAM, parameters // Algorithm's parameters
95 };
96 
97 
98 //
99 // LINK TO OM
100 //
101 
102 // Needed code to link this algorithm to oM
103 OM_ALG_DLL_EXPORT
105  return new EnvironmentalDistance(); // Create an instance of the algorithm's class
106 }
107 OM_ALG_DLL_EXPORT
109  return &metadata;
110 }
111 
112 
113 //
114 // ALGORITHM CONSTRUCTOR/DESTRUCTOR
115 //
116 
117 // Constructor for the algorithm class
119  _cov_matrix = _cov_matrix_inv = NULL;
121 }
122 
123 // Destructor for the algorithm class
125 {
126  switch(_par_dist_type){
127  case MahalanobisDistance:
128  if(_cov_matrix!=NULL){
129  delete _cov_matrix;
130  delete _cov_matrix_inv;
131  }
132  break;
133  //case ManhattanDistance:
134  //case ChebyshevDistance:
135  //case EuclideanDistance:
136  //default:
137  }
138 }
139 
140 
141 //
142 // ALGORITHM GENERIC METHODS (virtual AlgorithmImpl methods)
143 //
144 
145 // Initialize the algorithm
147 
148  // Test the parameters' data types
150  Log::instance()->error("Parameter '" PARDIST "' was not passed.\n");
151  return 0;
152  }
154  Log::instance()->error("Parameter '" PARDISTTYPE "' was not passed.\n");
155  return 0;
156  }
158  Log::instance()->error("Parameter '" PARPOINTQNT "' was not passed.\n");
159  return 0;
160  }
161 
162  // Impose limits to the parameters, if somehow the user don't obey
165 
166  // Check distance type
167  switch(_par_dist_type){
168  case EuclideanDistance:
169  Log::instance()->debug("Using Euclidean distance\n");
170  break;
171  case MahalanobisDistance:
172  Log::instance()->debug("Using Mahalanobis distance\n");
173  break;
174  case ManhattanDistance:
175  Log::instance()->debug("Using Manhattan distance\n");
176  break;
177  case ChebyshevDistance:
178  Log::instance()->debug("Using Chebyshev distance\n");
179  break;
180  default:
181  Log::instance()->error("Parameter '" PARDISTTYPE "' wasn't set properly. It should be an integer between 1 and 4.\n");
182  return 0;
183  }
184 
185  //_samp->environmentallyUnique(); // Debug
186 
187  // Initialize some common-use attributes
188  _layer_count = _samp->numIndependent();
189  _presence_count = _samp->numPresence();
190 
191  // Load all environmental data of presence points
192  if(_presence_count == 0){
193  Log::instance()->error("There is no presence point.\n");
194  return 0;
195  }
196 
197  // Check number of nearest points parameter
199  Log::instance()->warn("Parameter '" PARPOINTQNT "' is greater than the number of presence points\n");
200  else if (_par_point_qnt < 0) _par_point_qnt = 0;
201 
202  OccurrencesPtr presences = _samp->getPresences();
203  for(int i = 0 ; i < _presence_count ; i++)
204  _presence_points.push_back((*presences)[i]->environment());
205  // Calcs the mean of all presence points
206  _average_point = _presence_points[0]; // There is at least one presence point
207  for(int i = 1 ; i < _presence_count ; i++)
210 
211  _use_chisq = false;
212 
213  // Allow using "Distance" method and normalize _par_dist
214  if(!_init_distance_type()){
215  Log::instance()->error("Could not determine maximum distance in the environmental space.\n");
216  return 0;
217  }
218 
219  _done = true; // Needed for not-iterative algorithms
220  return 1; // There was no problem in initialization
221 }
222 
223 // Returns the occurrence probability
225  Scalar dist;
226 
227  //
228  // Distance to average
229  //
231  dist = _distance(x, _average_point);
232 
233  //
234  // Minimum distance (not really needed)
235  //
236  else if(_par_point_qnt == 1){
237  Scalar distIterator;
238  dist = -1;
239  for(int i = 0 ; i < _presence_count ; i++){ // Iterate for each presence point
240  distIterator = _distance(x, _presence_points[i]);
241  if((distIterator < dist || dist < 0)){
242  dist = distIterator;
243  }
244  }
245 
246  //
247  // Mean of _par_point_qnt nearest points
248  //
249  }else{
250  Scalar distIterator, distTmp;
251  int indexIterator, indexTmp;
252  Sample nearMean;
253  std::vector<int> nearestIndex(_par_point_qnt);
254  std::vector<Scalar> nPdist(_par_point_qnt);
255  //Log::instance()->debug("Starting with distances:\n"); // Debug
256  for(int i = 0 ; i < _par_point_qnt ; i++){ // We know that _par_point_qnt < _presence_count
257  nPdist[i] = _distance(x, _presence_points[i]);
258  //x.dump(); // debug
259  //_presence_points[i].dump(); // debug
260  nearestIndex[i] = i;
261  //Log::instance()->debug(" dist[%d]=%.8g\n", nearestIndex[i], nPdist[i]); // Debug
262  }
263 
264  //Log::instance()->debug("Nearest points:\n"); // Debug
265  for(int i = _par_point_qnt ; i < _presence_count ; i++){ // This loop finds the nearest points
266  distIterator = _distance(x, _presence_points[i]);
267  indexIterator = i;
268  //Log::instance()->debug("dist[%d] = %.8g:\n", indexIterator, distIterator); // Debug
269  for(int j = 0 ; j < _par_point_qnt ; j++){ // Trade pointIterator with the first smaller point
270  if(nPdist[j] > distIterator){
271  distTmp = distIterator;
272  indexTmp = indexIterator;
273  distIterator = nPdist[j];
274  indexIterator = nearestIndex[j];
275  nPdist[j] = distTmp;
276  nearestIndex[j] = indexTmp;
277  j = -1; // Re-start the for loop for the new value
278  }
279  }
280  //for(int j = 0 ; j < _par_point_qnt ; j++) // Debug
281  // Log::instance()->debug(" dist[%d]=%.8g\n", nearestIndex[j], nPdist[j]);
282  }
283 
284  // Now we have the nearest points. Let's get its mean:
285  nearMean = _presence_points[nearestIndex[0]]; // There is at least one point
286  for(int i = 1 ; i < _par_point_qnt ; i++)
287  nearMean += _presence_points[nearestIndex[i]];
288  nearMean /= _par_point_qnt;
289 
290  dist = _distance(x, nearMean);
291  }
292 
293  //Log::instance()->debug("distance=%.8g\n\n", dist); // Debug
294  //Log::instance()->debug("max dist=%.8g\n\n", _par_dist); // Debug
295 
296  // Now finishes the algorithm calculating the probability
297  if(dist < 0) // There isn't any occurrence
298  return 0.0;
299  else if(_use_chisq) // Only for Mahalanobis distance when maxdist == 1
300  return _pochisq(dist, _layer_count-1 );
301  else if(dist > _par_dist) // Point is too faraway from nearest point
302  return 0.0;
303  else
304  return 1.0 - (dist / _par_dist);
305 }
306 
307 // Initialize _cov_matrix and _cov_matrix_inv
309  if(_cov_matrix!=NULL){ // Garbage collector
310  delete _cov_matrix;
311  delete _cov_matrix_inv;
312  }
313  _cov_matrix = new Matrix(_layer_count,_layer_count); // Alloc memory for new matrices
315 
316  if(_presence_count > 1){
317  // Calcs the cross-covariance for each place in the matrix
318  for(int i = 0 ; i < _layer_count ; i++)
319  for(int j = i ; j < _layer_count ; j++){
320  (*_cov_matrix)(i,j) = 0;
321  for(int k = 0 ; k < _presence_count ; k++)
322  (*_cov_matrix)(i,j) += (_presence_points[k][i]-_average_point[i]) *
323  (_presence_points[k][j]-_average_point[j]);
324  (*_cov_matrix)(i,j) /= _presence_count;
325  (*_cov_matrix)(j,i) = (*_cov_matrix)(i,j);
326  }
327  }
328  else{
329  // Use an identity matrix if there's only one point
330  for(int i = 0 ; i < _layer_count ; i++)
331  for(int j = i ; j < _layer_count ; j++){
332  (*_cov_matrix)(i,j) = (i == j) ? 1 : 0;
333  }
334  }
335  //Log::instance()->debug("Cov matrix:\n");
336  //std::cout << (*_cov_matrix); // Debug
337 
338  try{
339  (*_cov_matrix_inv) = !(*_cov_matrix);
340  }
341  catch ( std::exception& e ) {
342  string msg = e.what();
343  msg.append( "\nExperiment has no solution using Mahalanobis distance.\n" );
344  Log::instance()->error( "%s", msg.c_str() );
345  throw AlgorithmException( msg.c_str() );
346  }
347  //Log::instance()->debug("Inv cov matrix:\n");
348  //std::cout << (*_cov_matrix_inv); // Debug
349 }
350 
351 // Calcs the distance between x and y using _par_dist_type
352 inline Scalar EnvironmentalDistance::_distance(const Sample& x, const Sample& y) const{
353  Scalar dist=0;
354  switch(_par_dist_type){
355 
356  //
357  // Mahalanobis Distance
358  //
359  case MahalanobisDistance:{
360  Matrix lineMatrix(1,_layer_count);
361  // Make lineMatrix = x - y
362  for(int i=0; i<_layer_count; i++)
363  lineMatrix(0,i) = x[i] - y[i];
364  // Definition of Mahalanobis distance
365  dist = (lineMatrix * (*_cov_matrix_inv) * (~lineMatrix))(0,0); // Operator () of a 1x1 matrix
366  if(!_use_chisq)
367  dist = sqrt(dist);
368  //Log::instance()->info("\nDISTANCE: %g\n",dist); // Debug
369  }break;
370 
371  //
372  // Manhattan Distance
373  //
374  case ManhattanDistance:{
375  Scalar tmp;
376  for(int k=0;k<_layer_count;k++){
377  tmp = x[k] - y[k];
378  // We don't need this because we did that in _par_dist normalization:
379  // tmp /= DATA_MAX - DATA_MIN; // range(k)
380  if(tmp < 0)
381  dist -= tmp;
382  else
383  dist += tmp;
384  }
385  dist /= _layer_count;
386  }break;
387 
388  //
389  // ChebyshevDistance
390  //
391  case ChebyshevDistance:
392  {
393  Scalar tmp;
394  for(int i=0; i<_layer_count; i++){
395  tmp = x[i] - y[i];
396  if(tmp < 0)
397  tmp = -tmp;
398  if(tmp > dist)
399  dist = tmp;
400  }
401  }break;
402 
403  //
404  // Euclidean Distance
405  //
406  case EuclideanDistance:
407  default:{
408  Sample delta = x;
409  delta -= y;
410  dist = delta.norm(); // The usual norm of the "delta" vector have
411  }break; // Euclidean distance for a n-dimensional space
412  }
413 
414  return dist;
415 }
416 
417 // Initialize the data structures of a distance type and normalize _par_dist
419  Scalar distMax;
420 
421  // Calcs the maximum distance (distMax)
422  switch(_par_dist_type){
423 
424  case MahalanobisDistance:{
425  _calc_covariance_matrix(); // Initialize _cov_matrix_inv
426  if(_par_dist < 1.0) {
427  Log::instance()->info("Using normalized maximum distance\n"); // Debug
428  Scalar distIterator;
429  Sample x,y;
430  x.resize(_layer_count);
431  y.resize(_layer_count);
432  distMax = 0.0;
433  bool foundDist = false;
434  // Distance between oposite edges (vertex) of the hypercube
435  for(int i=0; i<(1<<(_layer_count-1)); i++){ // for(i FROM 0 TO 2 "power" (_layer_count - 1))
436  for(int k=0; k<_layer_count; k++) // This is the same loop used to create
437  if((i & (1<<k)) != 0){ // binary numbers, but with "max" and
438  x[k] = DATA_MAX; // "min" instead of "1" and "0"
439  y[k] = DATA_MIN; // y is the oposite of x
440  }else{
441  x[k] = DATA_MIN;
442  y[k] = DATA_MAX;
443  }
444  distIterator = _distance(x,y);
445  if(distIterator > distMax){
446  distMax = distIterator;
447  foundDist = true;
448  }
449  }
450  if(!foundDist)
451  return false;
452  }
453  else {
454  // In this case, chi-square probabilities will be used,
455  // so no need to find the max distance
456  Log::instance()->info("Using chi-square probabilities\n");
457  _use_chisq = true;
458  return true;
459  }
460  }break;
461 
462  case ManhattanDistance:
463  // Manhattan maximum value is always DATA_MAX - DATA_MIN, even for n
464  // dimensions, so there's no real initialization for Manhattan
465  case ChebyshevDistance:
466  // Chebyshev and Manhattan distances has the same maximum value
467  distMax = DATA_MAX - DATA_MIN;
468  break;
469 
470  case EuclideanDistance:
471  default:
472  // For a 1 dimensional world, we impose a size limit of L
473  // For a 2D world, we have a square, with size limit of L*sqrt(2)
474  // since each side is a 1 dimensional world with max = 1
475  // In a 3D world, size limit is L*sqrt(3) because we have a cube
476  // For a n-dimensional world, we have the maximum dist equals
477  // L*sqrt(n), because sqrt((L*sqrt(n-1))^2 + L^2) = L*sqrt(n)
478  // (indution using Pythagoras).
479  distMax = sqrt((double)_layer_count) * (DATA_MAX - DATA_MIN);
480  }
481 
482  // Normalize _par_dist for its limits
483  _par_dist = (_par_dist - PARDISTMIN)/(PARDISTMAX - PARDISTMIN); // Now _par_dist is in [0,1]
484  _par_dist *= distMax; // Now _par_dist is in [0,distMax]
485  return true;
486 }
487 
489  Scalar y, x, w;
490  if (z == 0.0)
491  x = 0.0;
492  else {
493  y = 0.5 * fabs (z);
494  if (y >= (Z_MAX * 0.5))
495  x = 1.0;
496  else if (y < 1.0) {
497  w = y*y;
498  x = ((((((((0.000124818987 * w
499  -0.001075204047) * w +0.005198775019) * w
500  -0.019198292004) * w +0.059054035642) * w
501  -0.151968751364) * w +0.319152932694) * w
502  -0.531923007300) * w +0.797884560593) * y * 2.0;
503  }
504  else {
505  y -= 2.0;
506  x = (((((((((((((-0.000045255659 * y
507  +0.000152529290) * y -0.000019538132) * y
508  -0.000676904986) * y +0.001390604284) * y
509  -0.000794620820) * y -0.002034254874) * y
510  +0.006549791214) * y -0.010557625006) * y
511  +0.011630447319) * y -0.009279453341) * y
512  +0.005353579108) * y -0.002141268741) * y
513  +0.000535310849) * y +0.999936657524;
514  }
515  }
516  return (z > 0.0 ? ((x + 1.0) * 0.5) : ((1.0 - x) * 0.5));
517 }
518 
520  Scalar a, y = 0, s;
521  Scalar e, c, z;
522  int even; /* true if df is an even number */
523  if (x <= 0.0 || df < 1)
524  return (0.0);
525  a = 0.5 * x;
526  even = (2*(df/2)) == df;
527  if (df > 1)
528  y = ex (-a);
529  s = (even ? y : (2.0 * _poz(-sqrt (x))));
530  if (df > 2) {
531  x = 0.5 * (df - 1.0);
532  z = (even ? 1.0 : 0.5);
533  if (a > BIGX) {
534  e = (even ? 0.0 : LOG_SQRT_PI);
535  c = log (a);
536  while (z <= x) {
537  e = log (z) + e;
538  s += ex (c*z-a-e);
539  z += 1.0;
540  }
541  return (s);
542  }
543  else {
544  e = (even ? 1.0 : (I_SQRT_PI / sqrt(a)));
545  c = 0.0;
546  while (z <= x) {
547  e = e * (a / z);
548  c = c + e;
549  z += 1.0;
550  }
551  return (c * y + s);
552  }
553  }
554  else
555  return (s);
556 }
557 
558 // Alg serializer
560  if (!_done ) return;
561 
562  ConfigurationPtr model_config( new ConfigurationImpl("EnvironmentalDistance") );
563  config->addSubsection(model_config);
564  model_config->addNameValue("MaxDistance",_par_dist);
565  ConfigurationPtr envpoints_config(new ConfigurationImpl("EnvironmentalReferences"));
566  model_config->addSubsection(envpoints_config);
567  for(unsigned int i=0; i<_presence_points.size(); i++) {
568  ConfigurationPtr point_config(new ConfigurationImpl("Reference"));
569  envpoints_config->addSubsection(point_config);
570  point_config->addNameValue("Value", _presence_points[i]);
571  }
572  model_config->addNameValue("Average",_average_point);
573 }
574 
575 // Alg deserializer
577  ConstConfigurationPtr model_config = config->getSubsection("EnvironmentalDistance",false);
578 
579  if (!model_config) return;
580 
581  // Metric
583  Log::instance()->error("Parameter '" PARDISTTYPE "' was not found in serialized model.\n");
584  return;
585  }
586  // "n" closest points
588  Log::instance()->error("Parameter '" PARPOINTQNT "' was not found in serialized model.\n");
589  return;
590  }
591  Scalar max_distance;
592  if(!getParameter(PARDIST,&max_distance)){
593  Log::instance()->error("Parameter '" PARDIST "' was not found in serialized model.\n");
594  return;
595  }
596  _use_chisq = false;
597  if (_par_dist_type == MahalanobisDistance && max_distance == 1.0) {
598  _use_chisq = true;
599  }
600  // Maximum distance
601  _par_dist = model_config->getAttributeAsDouble("MaxDistance", 0.0);
602  // Environmental points
603  ConstConfigurationPtr envpoints_config = model_config->getSubsection("EnvironmentalReferences",false);
604  Configuration::subsection_list subs = envpoints_config->getAllSubsections();
605  Configuration::subsection_list::iterator begin = subs.begin();
606  Configuration::subsection_list::iterator end = subs.end();
607  for (; begin != end; ++begin) {
608  if ((*begin)->getName() != "Reference") continue;
609  Sample point = (*begin)->getAttributeAsSample("Value");
610  _presence_points.push_back(point);
611  }
612  // Average
613  _average_point = model_config->getAttributeAsSample("Average");
614 
616  _presence_count = (int)_presence_points.size();
617 
619  _calc_covariance_matrix(); // Initialize _cov_matrix_inv
620  }
621 
622  _done = true;
623 }
#define PARDISTTYPE
#define NUM_PARAM
void warn(const char *format,...)
'Warn' level.
Definition: Log.cpp:273
std::vector< ConfigurationPtr > subsection_list
matrix< Scalar > Matrix
double Scalar
Type of map values.
Definition: om_defs.hh:39
Scalar _pochisq(Scalar x, int df) const
#define AMOUNT_DISTANCE_TYPES
OM_ALG_DLL_EXPORT AlgMetadata const * algorithmMetadata()
static Log * instance()
Returns the instance pointer, creating the object on the first call.
Definition: Log.cpp:45
static AlgMetadata metadata
#define LOG_SQRT_PI
Scalar _poz(Scalar z) const
void error(const char *format,...)
'Error' level.
Definition: Log.cpp:290
int getParameter(std::string const &name, std::string *value)
OM_ALG_DLL_EXPORT AlgorithmImpl * algorithmFactory()
#define PARDISTMIN
void resize(std::size_t size)
Definition: Sample.cpp:153
#define FIRST_DISTANCE_TYPE
#define PARDISTMAX
static AlgParamMetadata parameters[NUM_PARAM]
virtual void _setConfiguration(const ConstConfigurationPtr &)
Scalar norm() const
Definition: Sample.cpp:457
#define DATA_MIN
std::size_t size() const
Definition: Sample.hh:70
std::vector< Sample > _presence_points
#define PARDIST
Scalar _distance(const Sample &x, const Sample &y) const
#define PARPOINTQNT
SamplerPtr _samp
Definition: Algorithm.hh:245
#define I_SQRT_PI
void info(const char *format,...)
'Info' level.
Definition: Log.cpp:256
#define BIGX
#define DATA_MAX
#define ex(x)
#define Z_MAX
void debug(const char *format,...)
'Debug' level.
Definition: Log.cpp:237
Normalizer * _normalizerPtr
Definition: Algorithm.hh:247
Definition: Sample.hh:25
virtual void _getConfiguration(ConfigurationPtr &) const
Scalar getValue(const Sample &x) const