// file: $isip_ifc/class/algo/CorrelationIntegral/corrint_06.cc
// version: $Id: corrint_06.cc 10476 2006-03-13 18:48:18Z prasad $
//

// isip include files
//
#include "CorrelationIntegral.h"

// method: setEpsilon
//
boolean CorrelationIntegral::setEpsilon(float epsilon_min, float epsilon_max,
					long epsilon_res) {
  epsilon_min_d = epsilon_min;
  epsilon_max_d = epsilon_max;
  epsilon_res_d = epsilon_res;
  
  // Loop from Epsilon_min through Epsilon_max to compute the correlation
  // integral for each neighborhood radius, epsilon.
  //
  epsilon_d.setLength(epsilon_res);
  for (long eps_index = 0 ; eps_index < epsilon_res_d ; eps_index++) {
    
    // The radius of the hypersphere
    //
    if (epsilon_res_d == (long) 1) {
      epsilon_d(eps_index) = epsilon_min_d;
    }
    else {
      epsilon_d(eps_index) = epsilon_min_d + (float)eps_index *
	( (epsilon_max_d - epsilon_min_d) / ((float)epsilon_res_d - (float) 1));
    }
  }    
  is_valid_d = false;
  return true;
}
