|
Allink
v0.1
|
Reads and stores a data file to be elaborated via Matematica. More...
#include <VarDatFile.h>
Public Member Functions | |
| VarDatFile (char *file, int NBin) | |
| Moltiplication factor for a scaled set (MediaMob) More... | |
| VarDatFile (int ExtNMax, int ExtNVar, int ExtNBin) | |
| Allocate the vector with a given size. | |
| VarDatFile (double **ExtSt, int ExtNMax, int ExtNVar, int ExtNBin) | |
| Point to the already allocated vector. | |
| VarDatFile (char **FileList, int *Pos, int NFile, int Values) | |
| Load list. | |
| ~VarDatFile () | |
| Freeing. | |
| int | Aggiungi (char *file) |
| Add the content of the file into the memory. | |
| int | FileInfo (FILE *InFIle, int *NCol) |
| Reads information contained in the file. | |
| int | ReadLine (char *cLine, double *Value) |
| Reads a single line. | |
| int | ReadLine (FILE *InFile, const char *Format,...) |
| Is it working? | |
| int | ElabSegnale (int NElMin, int NElMax) |
| Do a generic elaboration. | |
| MOMENTI | DistrSegnale (int NElMin, int NElMax, int IfNorm) |
| Distribution of a signal. | |
| MOMENTI | DistrLogSegnale (int NElMin, int NElMax, int IfNorm) |
| Logarithmic distribution of a signal. | |
| MOMENTI | DistrExpSegnale (int NElMin, int NElMax, int IfNorm) |
| Exponential distribution of a signal. | |
| MOMENTI | DistrSegnale (int NElMin, int NElMax, double *Border, int IfNorm) |
| Distribution of a signal. | |
| MOMENTI | DistrSignErr (int NElMin, int NElMax, double *Border, int IfNorm) |
| Distribution of a signal with error. | |
| MOMENTI | DistrGaussSegnale (int ElMin, int ElMax, int IfNorm) |
| Tests a gaussian distribution of the signal. | |
| MOMENTI | WeightAverageSet (int CoordY, int ElMin, int ElMax) |
| Weighted distribution. | |
| void | DistrSignSample (int ElMin, int ElMax, double **Distr, int NSample, int IfNorm, double *xBound) |
| Distributions of data organized in different samples. | |
| int | SpettroSegnale (int NElMin, int NElMax) |
| Calculate the spectrum. | |
| void | SpeLine (int ElMin, int ElMax, int NBin, double *Spe) |
| Spectrum of a sequence of lines. | |
| int | NormalizzaSegnale (int NElMin, int NElMax) |
| Normalize the signal. | |
| int | NormalizzaInter () |
| Normalize the intervals. | |
| bool | RadiceSegnale () |
| Transforms the signal into its square root. | |
| int | AutocorSegnale (int NElMin, int NElMax) |
| Autocorrelation of the signal. | |
| double | SumSegnale (int CoordY, int NElMin, int NElMax) |
| Sum the values between ElMin and ElMax. | |
| double | IntSegnale () |
| Numerical integration of the signal. | |
| void | SommaSegnali () |
| Sums all the yCoordinates. | |
| void | AverageOrdinate (int ElMin, int ElMax, double *Distr, double *xBound) |
| Average of all ordinate. | |
| void | Punta (int n) |
| Points to a different column. | |
| void | Punta (double **ExtSt, int n) |
| Points to an external pointer, probably not working. | |
| void | Punta (double *sp, int n) |
| Point an external pointer to the private memory. | |
| void | PuntaInt (double *sp) |
| Point the internal pointer to an external memory. | |
| void | DerivataSegnale () |
| Points the function Elab to the derivative, probably not working. | |
| void | VarieSegnale () |
| Points the function Elab to the square gradient, probably not working. | |
| void | ModuloSegnale () |
| Points the function Elab to the module, probably not working. | |
| double | VarieSegnale (int NElMin, int NElMax) |
| A generic function to be edit. | |
| RETTA | InterRettSegnale (int CoordY, int NElMin, int NElMax, int LogLog) |
| Computes a liner fit. | |
| RETTA | InterExpSegnale (int CoordY, int NElMin, int NElMax, int LogLog) |
| Computes a exponential fit. | |
| MOMENTI | InterGaussSegnale (int CoordY, int NElMin, int NElMax, int LogLog) |
| Computes a Gaussian fit. | |
| PARABOLA | ParabolaSegnale (int CoordY, int NElMin, int NElMax, int LogLog) |
| Computes a parabolic fit. | |
| int | MediaMobSegnale (int) |
| Running average. | |
| int | WeightHistoSign (int NHisto) |
| Weighted histogram analysis. More... | |
| int | CorrelaADuePunti (int dist) |
| To point correlation at a distance dist. | |
| void | AutosimilaritaSegnale (int) |
| Selfsimilarity. | |
| void | CambiaNBin (int) |
| Reallocate the pointer dInter dInter1. | |
| void | CambiaPunti () |
| Copies Punti in Punti1 to store the information of the already elaborated array, to be fixed. | |
| void | Print () |
| Prints the content in memory. | |
| void | Sort () |
| Sort with respect to a coordinate. | |
| void | ScriviPunti (char *file) |
| Writes the content of the elaborated array. | |
| void | ScriviFile (char *file, int CoordY, int LogLog, int NVisMin, int NVisMax) |
| Writes the content of the pointed vector. | |
| void | ScriviTutto (char *file, int LogLog, int NVisMin, int NVisMax) |
| Writes all the content in memory. | |
| void | RescaleToBulk (char *FName) |
| Rescale to bulk. | |
| void | ExportTxvl (char *FName, int NElMin, int NElMax) |
| Export in the txvl file format. | |
| void | TecPlot (char *FName) |
| Export a contour plot. | |
| void | PuntiAlloc () |
| Allocates. More... | |
| void | PuntiFree () |
| Free Punti if it is allocated. | |
| int | pNVar () |
| Print the number of variables. | |
| int | pNMax () |
| Print the maximum number of data in the array. | |
| int | pNRow (int CoordY) |
| Print the maximum number of data for the column. | |
| void | pGlobBorder (double *xMin, double *xMax, double *yMin, double *yMax) |
| Print global borders. | |
| double | Val (int CoordY, int n) |
| Value at the position. More... | |
| double | Abscissa (int CoordY, int n) |
| Value of the Abscissa at position. More... | |
| double | pPunti (int n) |
| Value of the elaborated array at position. More... | |
| double | pPuntiErr (int n) |
| Value of the error array at postion. More... | |
| void | pMinMaxGlob (int NVisMin, int NVisMax) |
| Find the borders globally. | |
| double | pMaxGlob (int NVisMin, int NVisMax) |
| Print the maximum of all sets. | |
| double | pMinGlob (int NVisMin, int NVisMax) |
| Print the minimum of all sets. | |
| double | pxMinGlob (int NVisMin, int NVisMax) |
| Print the abscissa minimum of all sets. | |
| double | pxMaxGlob (int NVisMin, int NVisMax) |
| Print the abscissa maximum of all sets. | |
| double | pMax (int CoordY, int NVisMin, int NVisMax) |
| Print the maximum of the column. More... | |
| double | pMin (int CoordY, int NVisMin, int NVisMax) |
| Print the minimum of the column. More... | |
| double | pMaxGlobLog (int NVisMin, int NVisMax) |
| Print the maximum of all sets. | |
| double | pMinGlobLog (int NVisMin, int NVisMax) |
| Print the minimum of all sets. | |
| double | pMaxLog (int CoordY, int NVisMin, int NVisMax) |
| Print the maximum of the column. More... | |
| double | pMinLog (int CoordY, int NVisMin, int NVisMax) |
| Print the minimum of the column. More... | |
| double | pInter (int n) |
| Print the postion. More... | |
| double | pError (int n) |
| Print the postion. More... | |
| double | pInter1 (int n) |
| Print the postion. More... | |
| double | PuntiMin () |
| Print the minimum of. More... | |
| double | PuntiMax () |
| Print the maximum of. More... | |
| int | IsAbscissa (int Col) |
| If the column is an ascissa. | |
| int | pRefAbsc (int Col) |
| If the column is an ascissa. | |
| int | pSetNMax (int Col) |
| If the column is an ascissa. | |
| int | IsSequence (int Col) |
| If the column is an ascissa. | |
| void | ImpSequence (int Col) |
| Set the natural sequence as abscissa for the column Col. | |
| void | ImpSequence () |
| Set the natural sequence as abscissa for all sets. | |
| void | ImpCoordX (int vAbs) |
| Set the columns for the x array. | |
| void | ImpCoordX (int vSet, int vAbs) |
| Set the column for the x array. | |
| void | ImpCoordY (int Ext) |
| Set the column for the y array. | |
| void | setXFormula (char *str) |
| Set the value of XFormula. | |
| void | setYFormula (char *str) |
| Set the value of YFormula. | |
| void | Reverse () |
| Reverse the sets. | |
| int | Smooth (double Fact, int CoordY, int NVisMin, int NVisMax) |
| Smooth the line. | |
| void | SmoothGauss (double Fact, int CoordY, int NVisMin, int NVisMax) |
| Smooth the line. | |
| void | DoubleDistFluct () |
| Distribution of distances. | |
| void | WriteFormula (char *Exit) |
| Execute a formula defined in XFormula and YFormula. | |
| char * | PrintHeader () |
| Print the header. | |
Public Member Functions inherited from Matematica | |
| Matematica () | |
| Constructor. | |
| int | PermuteRandomAll (int *Sequence, int NMass) |
| Permutes a sequence without repeating. | |
| int | PermuteRandomAll (PERMUTE *Sequence, int NMass) |
| Permutes a sequence without repeating. | |
| int | ApplyFilter (Matrice *Point, Matrice *Res, Matrice *Mask) |
| Applies the filter. More... | |
| int | ApplyFilter (Matrice *Res, Matrice *Mask) |
| Applies the filter. More... | |
| int | Transform (int *Out, int *In, int NEdge, int operation) |
| Boh. | |
| void | BackFold (Matrice *In, Matrice *Out, int NShift) |
| Shift all the rows upwards/downwards. | |
| void | Smooth (double *st, double *sw, int NIn, int NOut) |
| Smooth the line with BSplines. | |
| double | Evalx (double x) |
| Pointer to a generic function. | |
| double | ContactAngle (double x) |
| Definition of the contact angle. | |
| double | fProva (double x) |
| Trial function. | |
| double | F (double TD, double T) |
| Boh. | |
| double | Df (double x, double Delta) |
| Boh. | |
| void | ElabSt (double *st, double *sw, int NMass) |
| Pointer to a function which operates on. More... | |
| void | Derivata (double *st, double *sw, int NMass) |
| Derivate of. More... | |
| void | DerO4 (double *st, double *sw, int NMass) |
| Derivate O(4) of. More... | |
| double | Integrazione (double *Punti, double *sw, int NMass) |
| Integral of. More... | |
| void | IntegraA3 () |
| Perform a integration of a LJ6 Potential. | |
| void | SquareGradient (double *st, double *sw, int NMass) |
| Square of the gradient. | |
| double | Integrazione (double a, double b) |
| Integrates the function within. More... | |
| double | IntegrazioneGauss (double a, double b, double Scarto) |
| Itegrate a Gaussian. | |
| int | Zeri (double a, double b, double *Radici, int NRadici) |
| Find the. More... | |
| RADICE | RegulaFalsi (double a, double b) |
| Use regula falsi algorithm to find the roots. | |
| RADICE | Newton (double a) |
| Use Newton to find the roots. | |
| double | Estremo (double a, double b) |
| Other algorithm to find the roots. | |
| double | Fattoriale (int n) |
| Compute the factorial. | |
| double | Gamma (int n) |
| Euler's gamma. | |
| double | Elevato (double x, int Volte) |
| Integer power. | |
| double | Bessel (double Val, int Ord) |
| Bessel function. | |
| double | Neumann (double Val, int Ord) |
| Neumann function. | |
| double | Segno (int n) |
| Sign of -^n. | |
| double | QuasiBessel (double Val, int Ord) |
| A faster Bessel. | |
| double | QuasiNeumann (double Val, int Ord) |
| A faster Neumann. | |
| double | WeightFunction (double x, double a) |
| Definition of a weighting function. | |
| double | WeightFunction2 (double x, double a) |
| Definition of a weighting function. | |
| double | LJHamaker (double r, double r_np, double theta) |
| Integration of the LJ 6 term. | |
| double | LJHamakerCum (double Rad, double RadNpMin, double RadNpMax) |
| Integrate over r_np up to RadNp. | |
| double | LJHamaker (double Rad, double r_np) |
| Integrate over theta. | |
| double | LJ39 (double r, double r_np) |
| Integration of the LJ 6 term. | |
| void | ExecCommand (double *st, double *st1, int NMass, char *cmd) |
| Execute a command defined in string. | |
| double | ExecFormula (double x, double y, char *cmd) |
| Execute a formula. | |
| double | ExecFormula (double **st, int n, char *cmd) |
| Execute a formula. | |
| double | Gauss (double Media, double Scarto, double x) |
| Gaussian. | |
| bool | InizializzaGaussiano (double Scarto, int N) |
| Initialize the Gaussian number generator. | |
| double | Gaussiano (double Media, double Scarto) |
| Gaussian random number. More... | |
| void | Spettro (double *st, double *sw, int NMass) |
| Compute the spectrum. | |
| void | Spettro2d (double *st, double *sw, int NMass) |
| Compute the 2d spectrum of. More... | |
| void | Spettro2d (double *st, double **sw, int NMass) |
| Compute the 2d spectrum of. More... | |
| void | SpettroDFT (double *st, double *sw, int NMass) |
| DFT implementation of the spectrum, slow. | |
| void | Radice (double *st, double *sw, int N) |
| Compute the root of the signal. | |
| void | Autocor (bool *st, double *sAuto, int N) |
| Compute the autocorrelation of a boolean signal. | |
| void | Autocor (double *st, double *sAuto, int NMass) |
| Compute the autocorrelation of the signal. | |
| double | Norm (double *st, int NMass) |
| Norm of an array. | |
| int | NormalizeArea (double *st, int NMass) |
| Normalize. | |
| void | NormalizeVect (double *st, int NMass) |
| Normalize. | |
| int | Normalizza (double *st, int NMass) |
| Normalize. | |
| int | Normalizza (double *st, double *sw, int NMass) |
| Normalize. | |
| void | Modulo (double *st, double *sw, int NMass) |
| Compute the modulus. | |
| void | MediaMobile (double *st, int NMass, double *sw, int Parti) |
| Running average. | |
| int | MediaMobile (double *st, int NMass, double *sw, double *sErr, int Parti) |
| Running average. | |
| int | CorrelaDuePunti (double *st, int NMass, double *sw, int Punti) |
| Two points correlation. | |
| void | Autosimilarita (double *st, int NMass, double *sw, int Valori) |
| Self similarity. | |
| MOMENTI | Distribuzione (const double *st, int NMass) |
| Moments of a signal. | |
| MOMENTI | Distribuzione (const double *st, int NMass, double *Intervalli, int Valori, int IfNorm) |
| Moments and histogram of a signal. | |
| MOMENTI | Distribuzione (const double *st, int NMass, double *Intervalli, int Valori, double *Confine, int IfNorm) |
| Moments and histogram of a signal between two values. | |
| MOMENTI | DistrErr (const double *st, int NMass, double *Intervalli, double *Err, int Valori, double *Confine, int IfNorm) |
| Moments and histogram of a signal between two values. | |
| MOMENTI | DistribuzioneGauss (const double *st, int NMass, double *Intervalli, double *dInt, int Valori, int IfNorm) |
| Look for the Gaussian distribution. | |
| MOMENTI | DistribuzioneMaxwell (const double *st, int NMass, double *Intervalli, double *dInt, int Valori, int IfNorm) |
| Look for the Maxwellian distribution. | |
| void | DistrSample (double *Px, double *Py, int NMax, double **Distr, int NBin, const int NSample, int IfNorm, double *xBound) |
| Compare the distribution of a sample of data. | |
| MOMENTI | WeightAverage (const double *sx, const double *sy, int NMax) |
| Calculate the weighted average. | |
| void | WeightHisto (double **hist, double *Border, int NBin, int NHisto, double tolerance, double *OrPos, double *kSpring) |
| Weighted histogram analysis. | |
| void | Sort (double *Sign, int NMass) |
| Sort. | |
| void | Swap (int i, int j, double *Sign) |
| Swap to indices. | |
| void | Swap (double *s, int si, double *t, int ti, const int NDim) |
| Swap to arrays. | |
| void | Sort (int *Sign, int NMass) |
| Sort. | |
| void | Swap (int i, int j, int *Sign) |
| Swap to indices. | |
| void | FileSin1d (char *FName) |
| Create a file with a sign function. | |
| void | FileSin2d (char *FName) |
| Create a file with a sign function in 2d. | |
| void | ConvWeight (double *st, int NMax, double *sw, int *WIndex, int NWeight) |
| Convolute with a weight. | |
| void | FillWeightGauss (double *st, int *WIndex, int NWeight, double CutOff, double Sigma) |
| Fill the weight array with a gaussian fuction. | |
| double | LinInterp (double Px1, double Px2, double Py1, double Py2, double x) |
| Linear interpolation between two points. | |
| RETTA | InterRett (double *Px, double *Py, int NMass) |
| Linear interpolation. | |
| RETTA | InterExp (double *Px, double *Py, int NMass) |
| Exponential interpolation. | |
| MOMENTI | InterGauss (double *Px, double *Py, int NMass) |
| Gaussian interpolation. | |
| RETTA | InterRett (double *Px, double *Py, double *Peso, int NMass) |
| Linear weighted interpolation. | |
| PARABOLA | MinimoParabola (double a, double b, double *Px, double *Py, int NMass) |
| Minimum of the Parabola between. More... | |
| PARABOLA | MinimoParabola (double *Px, double *Py, int NMass) |
| Global minimum interpolating via a Parabola. | |
| SPLINE | Parab (double *P1, double *P2, double *P3, int x, int y) |
| Three points parabolic interpolation. | |
| SPLINE | Parab2 (double *PA, double *PB, double *PC, int x, int y) |
| Three points parabolic interpolation. | |
| CIRCLE | Osculante (double *PA, double *PB, double *PC, int x, int y) |
| Osculant circle. | |
| SPLINE | Cubica (double *PA, double *PB, double *PC, double *PD, int x, int y) |
| Four point cubic interpolation. | |
| SPLINE | Forth (double *PA, double *PB, double *PC, double *PD, double *PE, int x, int y) |
| Five points four order interpolation. | |
| SPLINE | Spline3 (double *P1, double *P2, double *P3, int x, int y) |
| Three order spline. | |
| SPLINE | Spline3Beg (double *P1, double *P2, double *P3, int x, int y) |
| Three order spline first boundary. | |
| SPLINE | Spline3End (double *P1, double *P2, int x, int y) |
| Three order spline last boundary. | |
| SPLINE | Spline4Beg (double *P1, double *P2, double *P3, double *P4, int x, int y) |
| Four order spline first boundary. | |
| SPLINE | Spline4 (double *P1, double *P2, double *P3, double *P4, int x, int y) |
| Four order spline. | |
| SPLINE | Spline4 (double *P1, double *P2, double *P3, int x, int y) |
| Four order spline. | |
| SPLINE | Spline4PreEnd (double *P1, double *P2, double *P3, int x, int y) |
| Four order spline just before the end. | |
| SPLINE | Spline4End (double *P1, double *P2, int x, int y) |
| Four order spline last boundary. | |
| int | Polinomio (double *P1, double *P2, int NMass, Spline *Sp) |
| Polinimial interpolation of NMass order. | |
| int | DerMatrix (double *Px, double *Py, int NMass, SPLINE Wg, Spline *Sp) |
| Boh. | |
| double | Casuale () |
| Random uniform number. | |
| double | RandDiscrProb (double *Prob, int NBin) |
| Random number following a discrete probability. | |
| double | QBezier (double *P1, double *P2, double *P3, double x, int y) |
| QBezier curve of three points. | |
| int | Factorial (int times) |
| Computes. More... | |
| double | Binomial (int times, int n) |
| For the BSpline. | |
| double | Blend (const double *dPoint, double x, int nPoint, int nOrder) |
| For the BSpline. | |
| double | Blend (double *dPoint, size_t Incr, double x, int nPoint, int nOrder) |
| For the BSpline. | |
| int | InterBSpline2D (Matrice *MaIn, Matrice *MaOut) |
| Computes the BSpline of a given. More... | |
| int | Voronoi () |
| Voronoi tassellation, in progress. | |
Public Attributes | |
| int | NBin |
| Number of point of the distribution. | |
| double * | sp |
| Points to a column of st. | |
Public Attributes inherited from Matematica | |
| FUNC | Func |
| Pointer to a function. | |
| ELAB | Elab |
| double | Ypsilon |
| External parameter to calculate the contact angle. | |
| double | PreFact |
| External parameter in the definition of the contact angle. | |
Additional Inherited Members | |
Public Types inherited from Matematica | |
| typedef double(Matematica::* | FUNC) (double x) |
| A tipical f(x) function. | |
| typedef void(Matematica::* | ELAB) (double *st, double *sw, int NMass) |
Reads and stores a data file to be elaborated via Matematica.
Definition at line 26 of file VarDatFile.h.
| VarDatFile | ( | char * | file, |
| int | NBin | ||
| ) |
Moltiplication factor for a scaled set (MediaMob)
Allocate the vectors reading from a file
| int WeightHistoSign | ( | int | NHisto | ) |
Weighted histogram analysis.
Find the borders globally
Definition at line 578 of file VarDatFile.cpp.
References IsAbscissa(), NBin, pMinMaxGlob(), and Matematica::WeightHisto().
Referenced by ModuloSegnale().
| void PuntiAlloc | ( | ) |
Allocates.
Definition at line 900 of file VarDatFile.cpp.
Referenced by AutocorSegnale(), AutosimilaritaSegnale(), CorrelaADuePunti(), DistrExpSegnale(), DistrLogSegnale(), DoubleDistFluct(), ElabSegnale(), IntSegnale(), MediaMobSegnale(), ModuloSegnale(), RadiceSegnale(), Smooth(), SmoothGauss(), SommaSegnali(), SpettroSegnale(), and VarieSegnale().
| double Val | ( | int | CoordY, |
| int | n | ||
| ) |
Value at the position.
| n | in the column |
| v |
Definition at line 657 of file VarDatFile.cpp.
References NBin.
Referenced by ExportTxvl(), pGlobBorder(), and TecPlot().
| double Abscissa | ( | int | CoordY, |
| int | n | ||
| ) |
Value of the Abscissa at position.
| n |
Definition at line 667 of file VarDatFile.cpp.
Referenced by AverageOrdinate(), ExportTxvl(), pGlobBorder(), pMinMaxGlob(), Print(), RescaleToBulk(), and TecPlot().
| double pPunti | ( | int | n | ) |
Value of the elaborated array at position.
| n |
Definition at line 673 of file VarDatFile.cpp.
Referenced by pGlobBorder().
| double pPuntiErr | ( | int | n | ) |
Value of the error array at postion.
| n |
Definition at line 680 of file VarDatFile.cpp.
Referenced by pGlobBorder().
| double pMax | ( | int | CoordY, |
| int | NVisMin, | ||
| int | NVisMax | ||
| ) |
Print the maximum of the column.
| n |
Definition at line 1108 of file VarDatFile.cpp.
Referenced by pGlobBorder().
| double pMin | ( | int | CoordY, |
| int | NVisMin, | ||
| int | NVisMax | ||
| ) |
Print the minimum of the column.
| n |
Definition at line 1116 of file VarDatFile.cpp.
Referenced by pGlobBorder().
| double pMaxLog | ( | int | CoordY, |
| int | NVisMin, | ||
| int | NVisMax | ||
| ) |
Print the maximum of the column.
| n |
Definition at line 1124 of file VarDatFile.cpp.
Referenced by pGlobBorder().
| double pMinLog | ( | int | CoordY, |
| int | NVisMin, | ||
| int | NVisMax | ||
| ) |
Print the minimum of the column.
| n |
Definition at line 1133 of file VarDatFile.cpp.
Referenced by pGlobBorder().
|
inline |
|
inline |
|
inline |
Print the postion.
| n | of array |
| dInter1 |
Definition at line 250 of file VarDatFile.h.
References PuntiMax(), and PuntiMin().
| double PuntiMin | ( | ) |
Print the minimum of.
Definition at line 690 of file VarDatFile.cpp.
Referenced by pInter1().
| double PuntiMax | ( | ) |
Print the maximum of.
Definition at line 700 of file VarDatFile.cpp.
Referenced by pInter1().
1.8.11