/** @(#) mathpos/statpos.h */
/**
* Calculos estadisticos en 1D y 2D.
* Convencion: "2D" al final del nombre de las funciones bidimensionales.
* @author Omar Posada Villarreal
* @version 1.1, 25/01/2002 mathpos/
* @version 1.0, 18/01/2002
*/
#ifndef STATPOS_H
#define STATPOS_H
//----------------------------------------------------------------------------
//#include "../utilpos/interfacepos.h"
//#include "utilpos/interfacepos.h"
#include "arraypos.h"
#include <iostream>
#include <string>
#include <stdexcept>	// runtime_exception
using namespace std;

void countFrequency2D(float **f, int nr, int nc,
		float leftRange, float rightRange,
                float *pClassMark, long *pFreq, int bins)
                throw (invalid_argument);
void calculateClassMarks(int bins, float leftRange, float rightRange,
		float classMark[])
                throw (invalid_argument);
void calculateClassFrontiers(int bins, float leftRange, float rightRange,
		float classFrontier[])
                throw (invalid_argument);
void relativeFrequency2D(float **f, int nr, int nc,
		float leftRange, float rightRange,
                float *pClassMark, float *pRelFreq, int bins)
                throw (invalid_argument);
void calculateMeanMinMax2D(float **f, int nr, int nc,
	double &mean, float &min, float &max);
void findMinMax2D(float **f, int nr, int nc, float &min, float &max);
void cumulativeFrequency(float *pRelFreq, int bins, float *pCumFreq);

/**
* @author Omar Posada Villarreal
* @version 1.0, /01/2002 C++
*/
/*template <class TObj>
class : public {
public:
	// Constructor predeterminado
	// Destructor predeterminado
private:
};
*/
//----------------------------------------------------------------------------
#endif
// Fin------------------------------------------------------------------------