Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bin/TwoSpect/Statistics.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2011, 2015 Evan Goetz
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19
20#ifndef __STATISTICS_H__
21#define __STATISTICS_H__
22
23#include <lal/AVFactories.h>
24#include "TwoSpectTypes.h"
25
27REAL4VectorAligned *sampleREAL4VectorAlignedArray_nozerosaccepted( const REAL4VectorAlignedArray *input, const UINT4 numberofvectors, const UINT4 sampleSize, const gsl_rng *rng );
28
31REAL8 expRandNum( const REAL8 mu, const gsl_rng *ptrToGenerator );
32REAL4VectorAligned *expRandNumVector( const UINT4 length, const REAL8 mu, const gsl_rng *ptrToGenerator );
33
36
39INT4 calcHarmonicMean( REAL4 *harmonicMean, const REAL4VectorAligned *vector, UINT4 numfbins, UINT4 numffts );
44
48
51UINT4 max_index_in_range( const REAL4VectorAligned *vector, const UINT4 startlocation, const UINT4 lastlocation );
52INT4 min_max_index_INT4Vector( const INT4Vector *inputvector, UINT4 *min_index_out, UINT4 *max_index_out );
53
54INT4 qsort_REAL4_compar( const void *a, const void *b );
55INT4 qsort_REAL8_compar( const void *a, const void *b );
56
57#endif
void sort_float_ascend(REAL4VectorAligned *vector)
Sort a REAL4VectorAligned in ascending order, modifying the input vector.
INT4 calcMedian(REAL4 *median, const REAL4VectorAligned *vector)
Calculate the median value from a REAL4VectorAligned.
INT4 sort_float_smallest(REAL4VectorAligned *output, const REAL4VectorAligned *input)
Sort a REAL4VectorAligned, keeping the smallest of the values in the output vector.
REAL4 calcMean_ignoreZeros(const REAL4VectorAligned *vector)
Compute the mean value of a REAL4VectorAligned without accepting values of zero.
INT4 qsort_REAL4_compar(const void *a, const void *b)
INT4 qsort_REAL8_compar(const void *a, const void *b)
INT4 min_max_index_INT4Vector(const INT4Vector *inputvector, UINT4 *min_index_out, UINT4 *max_index_out)
Determine the index value of the maximum and minimum values in an INT4Vector.
INT4 sampleREAL4VectorAligned(REAL4VectorAligned *output, const REAL4VectorAligned *input, const gsl_rng *rng)
Sample a number (sampleSize) of values from a REAL4VectorAligned (input) randomly.
UINT4 max_index_double(const REAL8Vector *vector)
Determine the index value of the maximum value in a REAL8Vector.
INT4 kuipers_test_exp(REAL8 *kuipervalue, const REAL4VectorAligned *vector)
Kuiper's test of data against an expected exponential distribution.
INT4 calcRms(REAL4 *rms, const REAL4VectorAligned *vector)
Compute the RMS value of a REAL4VectorAligned.
INT4 calcStddev_ignoreZeros(REAL4 *sigma, const REAL4VectorAligned *vector)
Compute the standard deviation of a REAL4VectorAligned ignoring zero values.
INT4 ks_test_exp(REAL8 *ksvalue, const REAL4VectorAligned *vector)
KS test of data against an expected exponential distribution.
REAL8 calcStddevD(const REAL8Vector *vector)
Compute the standard deviation of a REAL8Vector.
REAL8 expRandNum(const REAL8 mu, const gsl_rng *ptrToGenerator)
Create a exponentially distributed noise value.
UINT4 max_index(const REAL4VectorAligned *vector)
Determine the index value of the maximum value in a REAL4VectorAligned.
void sort_double_ascend(REAL8Vector *vector)
Sort a REAL8Vector in ascending order, modifying the input vector.
INT4 calcStddev(REAL4 *sigma, const REAL4VectorAligned *vector)
Compute the standard deviation of a REAL4VectorAligned.
REAL4VectorAligned * expRandNumVector(const UINT4 length, const REAL8 mu, const gsl_rng *ptrToGenerator)
INT4 calcHarmonicMean(REAL4 *harmonicMean, const REAL4VectorAligned *vector, UINT4 numfbins, UINT4 numffts)
Compute the harmonic mean value of a REAL4VectorAligned of SFT values.
UINT4 max_index_in_range(const REAL4VectorAligned *vector, const UINT4 startlocation, const UINT4 lastlocation)
Determine the index value of the maximum value between elements of a REAL4VectorAligned (inclusive)
REAL4 calcMean(const REAL4VectorAligned *vector)
Compute the mean value of a REAL4VectorAligned, computed via recursion like in GSL.
REAL4VectorAligned * sampleREAL4VectorAlignedArray_nozerosaccepted(const REAL4VectorAlignedArray *input, const UINT4 numberofvectors, const UINT4 sampleSize, const gsl_rng *rng)
Sample a number (sampleSize) of values from an REAL4VectorAlignedArray (input) randomly from vector 0...
REAL8 calcMeanD(const REAL8Vector *vector)
Compute the mean value of a REAL8Vector.
double REAL8
uint32_t UINT4
int32_t INT4
float REAL4
static const INT4 a