3 #include "../include/Matematica.h" 4 #define DIS_IF_TYPE(c,t) ( ((c)&(t))==(t) ) 5 #define DIS_ADD_TYPE(c,t) ( (c)|=(t) ) 6 #define DIS_REM_TYPE(c,t) ( (c)&=(~t) ) 90 VarDatFile(
int ExtNMax,
int ExtNVar,
int ExtNBin);
92 VarDatFile(
double **ExtSt,
int ExtNMax,
int ExtNVar,
int ExtNBin);
94 VarDatFile(
char **FileList,
int *Pos,
int NFile,
int Values);
100 int FileInfo(FILE *InFIle,
int *NCol);
102 int ReadLine(
char *cLine,
double *Value);
104 int ReadLine(FILE *InFile,
const char *Format, ...);
122 void DistrSignSample(
int ElMin,
int ElMax,
double **Distr,
int NSample,
int IfNorm,
double *xBound);
126 void SpeLine(
int ElMin,
int ElMax,
int NBin,
double *Spe);
136 double SumSegnale(
int CoordY,
int NElMin,
int NElMax);
142 void AverageOrdinate(
int ElMin,
int ElMax,
double *Distr,
double *xBound);
146 void Punta(
double **ExtSt,
int n);
187 void ScriviFile(
char *file,
int CoordY,
int LogLog,
int NVisMin,
int NVisMax);
189 void ScriviTutto(
char *file,
int LogLog,
int NVisMin,
int NVisMax);
193 void ExportTxvl(
char *FName,
int NElMin,
int NElMax);
207 int pNRow(
int CoordY);
209 void pGlobBorder(
double *xMin,
double *xMax,
double *yMin,
double *yMax){
216 double Val(
int CoordY,
int n);
226 double pMaxGlob(
int NVisMin,
int NVisMax);
228 double pMinGlob(
int NVisMin,
int NVisMax);
230 double pxMinGlob(
int NVisMin,
int NVisMax);
232 double pxMaxGlob(
int NVisMin,
int NVisMax);
234 double pMax(
int CoordY,
int NVisMin,
int NVisMax);
236 double pMin(
int CoordY,
int NVisMin,
int NVisMax);
242 double pMaxLog(
int CoordY,
int NVisMin,
int NVisMax);
244 double pMinLog(
int CoordY,
int NVisMin,
int NVisMax);
257 if(RefAbsc[Col] == Col)
return 1;
return 0;};
281 int Smooth(
double Fact,
int CoordY,
int NVisMin,
int NVisMax);
283 void SmoothGauss(
double Fact,
int CoordY,
int NVisMin,
int NVisMax);
293 #endif //VARELEMENTIGRAFICI_H void Sort()
Sort with respect to a coordinate.
double pPunti(int n)
Value of the elaborated array at position.
int SpettroSegnale(int NElMin, int NElMax)
Calculate the spectrum.
int pNRow(int CoordY)
Print the maximum number of data for the column.
void ScriviPunti(char *file)
Writes the content of the elaborated array.
double pMinLog(int CoordY, int NVisMin, int NVisMax)
Print the minimum of the column.
void SommaSegnali()
Sums all the yCoordinates.
void SquareGradient(double *st, double *sw, int NMass)
Square of the gradient.
int pNMax()
Print the maximum number of data in the array.
VarDatFile(char *file, int NBin)
Moltiplication factor for a scaled set (MediaMob)
int ElabSegnale(int NElMin, int NElMax)
Do a generic elaboration.
void DerO4(double *st, double *sw, int NMass)
Derivate O(4) of.
int FileInfo(FILE *InFIle, int *NCol)
Reads information contained in the file.
void AverageOrdinate(int ElMin, int ElMax, double *Distr, double *xBound)
Average of all ordinate.
double pInter1(int n)
Print the postion.
double pMinGlobLog(int NVisMin, int NVisMax)
Print the minimum of all sets.
int IsSequence(int Col)
If the column is an ascissa.
void Print()
Prints the content in memory.
MOMENTI InterGaussSegnale(int CoordY, int NElMin, int NElMax, int LogLog)
Computes a Gaussian fit.
double pPuntiErr(int n)
Value of the error array at postion.
int AutocorSegnale(int NElMin, int NElMax)
Autocorrelation of the signal.
RETTA InterRettSegnale(int CoordY, int NElMin, int NElMax, int LogLog)
Computes a liner fit.
double pMinGlob(int NVisMin, int NVisMax)
Print the minimum of all sets.
void Punta(int n)
Points to a different column.
void SpeLine(int ElMin, int ElMax, int NBin, double *Spe)
Spectrum of a sequence of lines.
int WeightHistoSign(int NHisto)
Weighted histogram analysis.
double * sp
Points to a column of st.
double PuntiMax()
Print the maximum of.
void WriteFormula(char *Exit)
Execute a formula defined in XFormula and YFormula.
double pMaxGlob(int NVisMin, int NVisMax)
Print the maximum of all sets.
MOMENTI WeightAverageSet(int CoordY, int ElMin, int ElMax)
Weighted distribution.
double pMax(int CoordY, int NVisMin, int NVisMax)
Print the maximum of the column.
char * PrintHeader()
Print the header.
int pRefAbsc(int Col)
If the column is an ascissa.
void PuntaInt(double *sp)
Point the internal pointer to an external memory.
int ReadLine(char *cLine, double *Value)
Reads a single line.
void Modulo(double *st, double *sw, int NMass)
Compute the modulus.
double PuntiMin()
Print the minimum of.
Moments of a distribution.
void pGlobBorder(double *xMin, double *xMax, double *yMin, double *yMax)
Print global borders.
void ImpCoordY(int Ext)
Set the column for the y array.
void VarieSegnale()
Points the function Elab to the square gradient, probably not working.
void DoubleDistFluct()
Distribution of distances.
double pMaxLog(int CoordY, int NVisMin, int NVisMax)
Print the maximum of the column.
void ImpSequence()
Set the natural sequence as abscissa for all sets.
PARABOLA ParabolaSegnale(int CoordY, int NElMin, int NElMax, int LogLog)
Computes a parabolic fit.
double pMaxGlobLog(int NVisMin, int NVisMax)
Print the maximum of all sets.
void ModuloSegnale()
Points the function Elab to the module, probably not working.
void setXFormula(char *str)
Set the value of XFormula.
bool RadiceSegnale()
Transforms the signal into its square root.
void DistrSignSample(int ElMin, int ElMax, double **Distr, int NSample, int IfNorm, double *xBound)
Distributions of data organized in different samples.
double IntSegnale()
Numerical integration of the signal.
double pInter(int n)
Print the postion.
void ImpCoordX(int vAbs)
Set the columns for the x array.
void RescaleToBulk(char *FName)
Rescale to bulk.
MOMENTI DistrExpSegnale(int NElMin, int NElMax, int IfNorm)
Exponential distribution of a signal.
MOMENTI DistrGaussSegnale(int ElMin, int ElMax, int IfNorm)
Tests a gaussian distribution of the signal.
int pNVar()
Print the number of variables.
int NBin
Number of point of the distribution.
void Reverse()
Reverse the sets.
void AutosimilaritaSegnale(int)
Selfsimilarity.
double pError(int n)
Print the postion.
double Val(int CoordY, int n)
Value at the position.
int IsAbscissa(int Col)
If the column is an ascissa.
void ScriviFile(char *file, int CoordY, int LogLog, int NVisMin, int NVisMax)
Writes the content of the pointed vector.
Reads and stores a data file to be elaborated via Matematica.
void ExportTxvl(char *FName, int NElMin, int NElMax)
Export in the txvl file format.
void DerivataSegnale()
Points the function Elab to the derivative, probably not working.
void setYFormula(char *str)
Set the value of YFormula.
void SmoothGauss(double Fact, int CoordY, int NVisMin, int NVisMax)
Smooth the line.
int NormalizzaInter()
Normalize the intervals.
void CambiaNBin(int)
Reallocate the pointer dInter dInter1.
double pxMinGlob(int NVisMin, int NVisMax)
Print the abscissa minimum of all sets.
int CorrelaADuePunti(int dist)
To point correlation at a distance dist.
int Smooth(double Fact, int CoordY, int NVisMin, int NVisMax)
Smooth the line.
void TecPlot(char *FName)
Export a contour plot.
Implementation of useful algorythms.
int pSetNMax(int Col)
If the column is an ascissa.
double pxMaxGlob(int NVisMin, int NVisMax)
Print the abscissa maximum of all sets.
double SumSegnale(int CoordY, int NElMin, int NElMax)
Sum the values between ElMin and ElMax.
void CambiaPunti()
Copies Punti in Punti1 to store the information of the already elaborated array, to be fixed...
MOMENTI DistrLogSegnale(int NElMin, int NElMax, int IfNorm)
Logarithmic distribution of a signal.
int Aggiungi(char *file)
Add the content of the file into the memory.
void pMinMaxGlob(int NVisMin, int NVisMax)
Find the borders globally.
void PuntiFree()
Free Punti if it is allocated.
double Abscissa(int CoordY, int n)
Value of the Abscissa at position.
int NormalizzaSegnale(int NElMin, int NElMax)
Normalize the signal.
RETTA InterExpSegnale(int CoordY, int NElMin, int NElMax, int LogLog)
Computes a exponential fit.
double pMin(int CoordY, int NVisMin, int NVisMax)
Print the minimum of the column.
MOMENTI DistrSignErr(int NElMin, int NElMax, double *Border, int IfNorm)
Distribution of a signal with error.
MOMENTI DistrSegnale(int NElMin, int NElMax, int IfNorm)
Distribution of a signal.
void PuntiAlloc()
Allocates.
void ScriviTutto(char *file, int LogLog, int NVisMin, int NVisMax)
Writes all the content in memory.
int MediaMobSegnale(int)
Running average.