Research Article

Spectroscopic Detection of Caries Lesions

Pseudocode 3

Pseudocode for computing the threshold options for a rule at a given measured wavelength . The wavelength is defined by its index, .
GET-THRESHOLDS( , )
  // Get the threshold options for a rule, given a set of samples and
  // an index of wavelength.
  // Use local variables, arrays and
  for     to  X.sampleCount
       =  // Intensity at for sample
   = SORT( ) // Ascending or descending
  for     to  A.length − 1
       = ( + )/2
  return