double canberra (species1, species2, small_value, num_species)
{
replacement_for_zero = small_value * 0.20;
non_doublezeros = 0;
sigma_dif = 0.0;
sigma_sum = 0.0;
for (x = 0; x < num_species; x++)
{
2. The "*" in front of the variables "species1" and "species2" are pointers to the start of a one-dimensional array that contains the abundances of each species in a sample/station (discussion of pointers is a pretty complex aspect of the C language - suffice it to say, it works when complied)
3. Each of the "species1" and "species2" arrays are the same length, and at each position in the array is the number of individuals of that species observed (zero counts are not only acceptable, they are required space holders in the array)
4. the variables "sigma_dif" and "sigma_sum" are accumulators, representing the sum of the absolute differences between the number of individuals of a specific species at each site/station (sigma_dif) and the sum total of the number of individuals of a specific species at the same site/station (sigma_sum)
5. In C, the phrase "+=" means to take the current value of the variable and add the value of the other variable
6. In C, the phrase "++" means to increment the value of the variable by the integer value "1"
Other indices of similarity/dissimilarity that were coded in the original application included: Bray-Curtis, Squared Euclidean Distance, Percent Similarity, Mountford, Dice, Kendall, Morisita, Simplified Morisita, Sorensen, Product Moment Correlation Coefficient, Horns Index, and Whittaker.
For questions or comments regarding the above, please contact Michael D. Noah, President, Physalia Ocean Sciences, Inc.