//
// ApplyGcf.h
//
// A module to reduce the frequency values by their GCF.
//
#ifndef APPLY_GCF_H
#define APPLY_GCF_H
#include "Constants.h"
//
// applyGcf1
// applyGcf2
// applyGcf3
//
// Purpose: To divide all the values in the frequiency array
// by their greatest common factor (GCF). This puts
// the complex ratio expressed by the array into
// simplest terms. The advantages of this are that it
// is easier for humans to read it and that
// calculations with smaller numbers are faster and
// less likely to overflow.
// Parameter(s):
// <1> a_frequencies
// <1> aa_frequencies
// <1> aaa_frequencies: The array of frequencies
// <2> a_value_count: The array of the dimensions of the
// portion of the a/aa/aaa_frequencies
// array that is used
// Precondition(s):
// <1> a_frequencies != NULL
// <1> aa_frequencies != NULL
// <1> aaa_frequencies != NULL
// <2> a_value_count != NULL
// Returns: The summation of the array after the division is
// applied.
// Side Effect: The GCF of a/aa/aaa_frequencies is calculated.
// Each element of a/aa/aaa_frequencies is divided
// by the GCF.
//
unsigned int applyGcf1 (unsigned int a_frequencies[POSSIBLE_VALUE_COUNT],
unsigned int a_value_count[1]);
unsigned int applyGcf2 (unsigned int aa_frequencies[POSSIBLE_VALUE_COUNT][POSSIBLE_VALUE_COUNT],
unsigned int a_value_count[2]);
unsigned int applyGcf3 (unsigned int aa_frequencies[POSSIBLE_VALUE_COUNT][POSSIBLE_VALUE_COUNT][POSSIBLE_VALUE_COUNT],
unsigned int a_value_count[3]);
#endif