Defines | Functions | Variables

ocsTools.cc File Reference

#include "ocsTools.hh"
#include "ocsConst.hh"
#include <math.h>
#include "nrutil.h"
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>

Defines

#define IM1   2147483563
#define IM2   2147483399
#define AM   (1.0/IM1)
#define IMM1   (IM1-1)
#define IA1   40014
#define IA2   40692
#define IQ1   53668
#define IQ2   52774
#define IR1   12211
#define IR2   3791
#define NTAB   32
#define NDIV   (1+IMM1/NTAB)
#define EPS   1.2e-7
#define RNMX   (1.0-EPS)
#define IA   16807
#define IM   2147483647
#define AM   (1.0/IM)
#define IQ   127773
#define IR   2836
#define NTAB   32
#define NDIV   (1+(IM-1)/NTAB)
#define EPS   1.2e-7
#define RNMX   (1.0-EPS)
#define NRANSI
#define ITMAX   200
#define NRANSI
#define TOL   2.0e-4
#define NRANSI
#define NRANSI
#define GOLD   1.618034
#define GLIMIT   100.0
#define TINY   1.0e-20
#define SHFT(a, b, c, d)   (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   100
#define CGOLD   0.3819660
#define ZEPS   1.0e-10
#define SHFT(a, b, c, d)   (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   200
#define EPS   1.0e-10
#define FREEALLD   free_dvector(xi,1,n);free_dvector(h,1,n);free_dvector(g,1,n);
#define NRANSI
#define TOL   2.0e-4
#define NRANSI
#define NRANSI
#define GOLD   1.618034
#define GLIMIT   100.0
#define TINY   1.0e-20
#define SHFT(a, b, c, d)   (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   100
#define CGOLD   0.3819660
#define ZEPS   1.0e-10
#define SHFT(a, b, c, d)   (a)=(b);(b)=(c);(c)=(d);
#define NRANSI
#define ITMAX   200
#define EPS   1.0e-10
#define FREEALL   free_nrvector(xi,1,n);free_nrvector(h,1,n);free_nrvector(g,1,n);
#define NR_END   1
#define FREE_ARG   char*
#define NRANSI
#define SWAP(a, b)   {temp=(a);(a)=(b);(b)=temp;}
#define NRANSI
#define SWAP(a, b)   {temp=(a);(a)=(b);(b)=temp;}
#define ITMAX   100
#define EPS   3.0e-7
#define FPMIN   1.0e-30
#define ITMAX   100
#define EPS   3.0e-7
#define NRANSI
#define ITMAX   100
#define EPS   3.0e-8

Functions

double GetRadiusCircle (double *PointA, double *PointB, double *PointC)
double GetDistance2Points (double *PointA, double *PointB, int FirstCoord)
int Periodicity (int ii, int Periodicity)
void TransRzRyV3toXhat (double *Vector, double *thetaZthetaY)
void TransRzRyV3to_Xhat (double *Vector, double *thetaZthetaY)
void TransRyV3to_YZ (double *Vector, double *thetaY)
void TransRzRxV3toXhat (double *Vector, double *thetaZthetaY)
void TransRzRxV3to_Xhat (double *Vector, double *thetaZthetaX)
void TransRzRxV3to_Xhat (double *Vector, double *thetaZ, double *thetaX)
void Multiply (double Left[][3], double Right[][3])
void Multiply (double Left[][3], double Right[3])
void Multiply (cplx Left[][2], cplx Right[][2])
void URotatesAboutZ (double angle, cplx UMatrix[][2])
void URotatesAboutY (double angle, cplx UMatrix[][2])
void URotatesAboutX (double angle, cplx UMatrix[][2])
void MRotatesAboutZ (double angle, double MMatrix[][3])
void MRotatesAboutX (double angle, double MMatrix[][3])
void MRotatesAboutY (double angle, double MMatrix[][3])
void MGeneralRotation (double angle, double *r_vec, double MMatrix[][3])
void CrossProduct (double *Left, double *Right, int FirstCoord)
void CrossProduct (double *Left, double *Right, double *Product)
void RotatesAboutZ (double angle, double *Vector)
void RotatesAboutX (double angle, double *Vector)
void RotatesAboutY (double angle, double *Vector)
double ScalarProduct (double *VectorA, double *VectorB)
double GetVectorLength (double *Vector, int Dimension)
void RotatesAboutX (double angle, cplx *JonesVector)
void RotatesAboutY (double angle, cplx *JonesVector)
void RotatesAboutZ (double angle, cplx *JonesVector)
double dB2Linear (double dBvalue)
double dBm2Linear (double dBmPower)
double Linear2dB (double LinearValue)
double Linear2dBm (double LinearPower)
double Linear2dB_Limited (double LinearValue, double MaxValue_dB)
double GetDegreeOfPolarization (double *StokesVector)
double GetPhase (const cplx Phasor)
void Stokes2Jones (const double *Stokes, cplx *Jones)
void Stokes2JonesKeepPower (const double *Stokes, cplx *Jones)
void Jones2Stokes (const cplx *Jones, double *Stokes)
void Jones2StokesKeepPower (const cplx *Jones, double *Stokes)
void JonesPair2MixedStokes (const cplx *Jones1, const cplx *Jones2, cplx *MixedStokes)
double Frequency2Wavelength (double Frequency)
double Wavelength2Frequency (double Wavelength)
double MaxOfArray (double *Array, int Length)
 Returns the maximum element of the array Array.
double MinOfArray (double *Array, int Length)
 Returns the minimum element of the array Array.
void MinAndArgMin (double *Vec, int Length, double &MinValue, int &ArgMin)
void MaxAndArgMax (double *Vec, int Length, double &MaxValue, int &ArgMax)
double Quadrature (double *Data, int NumPts, double LeftEndPt, double RightEndPt)
void gaussian_pdf (int N, double stan_dev, double *vec)
cplx bessel5 (double omega, double omega_0, double FWHM)
void electrical_filter (cplx *my_power_time, cfftw *fft, double fwhm_norm)
void optical_filter (cplx *my_field_time, cplx *my_field_freq, cfftw *fft, double fwhm_norm)
int lock_or_unlock_mosix (int what)
int cpujob_mosix (void)
int slow_mosix (void)
double peak_power (cplx *in, int N)
double pulse_energy (cplx *in, int N, double width)
float ranG (long *idum)
float ran1 (long *idum)
float Gaussian_pdf (long *idum)
void powell (float p[], float xi[][4], int n, float ftol, int *iter, float *fret, float(*func)(float[]))
void linmin (float p[], float xi[], int n, float *fret, float(*func)(float[]))
float f1dim (float x)
void mnbrak (float *ax, float *bx, float *cx, float *fa, float *fb, float *fc, float(*func)(float))
float brent (float ax, float bx, float cx, float(*f)(float), float tol, float *xmin)
void frprmnd (double p[], int n, double ftol, int *iter, double *fret, double(*func)(double[]), void(*dfunc)(double[], double[]))
void linmind (double p[], double xi[], int n, double *fret, double(*func)(double[]))
double f1dim (double x)
void mnbrakd (double *ax, double *bx, double *cx, double *fa, double *fb, double *fc, double(*func)(double))
double brentd (double ax, double bx, double cx, double(*f)(double), double tol, double *xmin)
void frprmn (float p[], int n, float ftol, int *iter, float *fret, float(*func)(float[]), void(*dfunc)(float[], float[]))
void nrerror (char error_text[])
float * nrvector (long nl, long nh)
int * ivector (long nl, long nh)
unsigned char * cvector (long nl, long nh)
unsigned long * lvector (long nl, long nh)
double * dvector (long nl, long nh)
float ** matrix (long nrl, long nrh, long ncl, long nch)
double ** dmatrix (long nrl, long nrh, long ncl, long nch)
cplx ** cmatrix (long nrl, long nrh, long ncl, long nch)
int ** imatrix (long nrl, long nrh, long ncl, long nch)
float ** submatrix (float **a, long oldrl, long oldrh, long oldcl, long oldch, long newrl, long newcl)
float ** convert_matrix (float *a, long nrl, long nrh, long ncl, long nch)
float *** f3tensor (long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
void free_dvector (double *v, long nl, long nh)
void free_nrvector (float *v, long nl, long nh)
void free_ivector (int *v, long nl, long nh)
void free_cvector (unsigned char *v, long nl, long nh)
void free_lvector (unsigned long *v, long nl, long nh)
void free_matrix (float **m, long nrl, long nrh, long ncl, long nch)
void free_dmatrix (double **m, long nrl, long nrh, long ncl, long nch)
void free_cmatrix (cplx **m, long nrl, long nrh, long ncl, long nch)
void free_imatrix (int **m, long nrl, long nrh, long ncl, long nch)
void free_submatrix (float **b, long nrl, long nrh, long ncl, long nch)
void free_convert_matrix (float **b, long nrl, long nrh, long ncl, long nch)
void free_f3tensor (float ***t, long nrl, long nrh, long ncl, long nch, long ndl, long ndh)
void gaussj (double **a, int n, double **b, int m)
void gaussj_complex (cplx **a, int n, cplx **b, int m)
float erffc (float x)
float gammp (float a, float x)
void gcf (float *gammcf, float a, float x, float *gln)
void gser (float *gamser, float a, float x, float *gln)
float gammln (float xx)
float gammq (float a, float x)
double erfccExtendedRange (double x)
float erfcc (float x)
float zbrent (float(*func)(float), float x1, float x2, float tol)
void spline (double *x, double *y, int n, double yp1, double ypn, double *y2)
double splint (double *xa, double *ya, double *y2a, int n, double x)

Variables

ofstream * LogFile
int ncom
float * pcom
float * xicom
float(* nrfunc )(float[])
double * pcomd
double * xicomd
double(* nrfuncd )(double[])

Define Documentation

#define AM   (1.0/IM1)

Referenced by ran1(), and ranG().

#define AM   (1.0/IM)
#define CGOLD   0.3819660
#define CGOLD   0.3819660
#define EPS   3.0e-7
#define EPS   3.0e-7
#define EPS   3.0e-8
#define EPS   1.2e-7
#define EPS   1.0e-10
#define EPS   1.2e-7
#define EPS   1.0e-10
#define FPMIN   1.0e-30

Referenced by gcf().

#define FREE_ARG   char*
#define FREEALL   free_nrvector(xi,1,n);free_nrvector(h,1,n);free_nrvector(g,1,n);

Referenced by frprmn().

#define FREEALLD   free_dvector(xi,1,n);free_dvector(h,1,n);free_dvector(g,1,n);

Referenced by frprmnd().

#define GLIMIT   100.0
#define GLIMIT   100.0

Referenced by mnbrak(), and mnbrakd().

#define GOLD   1.618034
#define GOLD   1.618034

Referenced by mnbrak(), and mnbrakd().

#define IA   16807

Referenced by ran1().

#define IA1   40014

Referenced by ranG().

#define IA2   40692

Referenced by ranG().

#define IM   2147483647
#define IM1   2147483563
#define IM2   2147483399
#define IMM1   (IM1-1)
#define IQ   127773
#define IQ1   53668
#define IQ2   52774
#define IR   2836

Referenced by ran1().

#define IR1   12211

Referenced by ranG().

#define IR2   3791

Referenced by ranG().

#define ITMAX   100
#define ITMAX   100
#define ITMAX   100
#define ITMAX   100
#define ITMAX   200
#define ITMAX   200
#define ITMAX   100
#define ITMAX   200
#define NDIV   (1+(IM-1)/NTAB)
#define NDIV   (1+IMM1/NTAB)
#define NR_END   1
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NRANSI
#define NTAB   32
#define NTAB   32

Referenced by ran1(), and ranG().

#define RNMX   (1.0-EPS)
#define RNMX   (1.0-EPS)

Referenced by ran1(), and ranG().

#define SHFT (   a,
  b,
  c,
  d 
)    (a)=(b);(b)=(c);(c)=(d);
#define SHFT (   a,
  b,
  c,
  d 
)    (a)=(b);(b)=(c);(c)=(d);
#define SHFT (   a,
  b,
  c,
  d 
)    (a)=(b);(b)=(c);(c)=(d);
#define SHFT (   a,
  b,
  c,
  d 
)    (a)=(b);(b)=(c);(c)=(d);
#define SWAP (   a,
  b 
)    {temp=(a);(a)=(b);(b)=temp;}

Referenced by gaussj(), and gaussj_complex().

#define SWAP (   a,
  b 
)    {temp=(a);(a)=(b);(b)=temp;}
#define TINY   1.0e-20
#define TINY   1.0e-20
#define TOL   2.0e-4

Referenced by linmin(), and linmind().

#define TOL   2.0e-4
#define ZEPS   1.0e-10
#define ZEPS   1.0e-10

Function Documentation

cplx bessel5 ( double  omega,
double  omega_0,
double  FWHM 
)

Referenced by electrical_filter().

float brent ( float  ax,
float  bx,
float  cx,
float(*)(float)  f,
float  tol,
float *  xmin 
)

References CGOLD, nrerror(), SHFT, and SIGN.

Referenced by linmin().

double brentd ( double  ax,
double  bx,
double  cx,
double(*)(double)  f,
double  tol,
double *  xmin 
)

References CGOLD, nrerror(), SHFT, and SIGN.

Referenced by linmind().

cplx** cmatrix ( long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References nrerror().

Referenced by ElecEqualizer::AllocateMemory().

float** convert_matrix ( float *  a,
long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References nrerror().

int cpujob_mosix ( void   ) 
void CrossProduct ( double *  Left,
double *  Right,
double *  Product 
)
void CrossProduct ( double *  Left,
double *  Right,
int  FirstCoord 
)
unsigned char* cvector ( long  nl,
long  nh 
)

References nrerror().

double dB2Linear ( double  dBvalue  ) 
double dBm2Linear ( double  dBmPower  ) 
double** dmatrix ( long  nrl,
long  nrh,
long  ncl,
long  nch 
)
double* dvector ( long  nl,
long  nh 
)

References nrerror().

Referenced by f1dim(), frprmnd(), and linmind().

void electrical_filter ( cplx my_power_time,
cfftw fft,
double  fwhm_norm 
)
float erfcc ( float  x  ) 

Referenced by erfccExtendedRange().

double erfccExtendedRange ( double  x  ) 
float erffc ( float  x  ) 

References gammp(), and gammq().

double f1dim ( double  x  ) 

References dvector(), and free_dvector().

float f1dim ( float  x  ) 

References free_nrvector(), and nrvector().

Referenced by linmin(), and linmind().

float*** f3tensor ( long  nrl,
long  nrh,
long  ncl,
long  nch,
long  ndl,
long  ndh 
)

References nrerror().

void free_cmatrix ( cplx **  m,
long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References FREE_ARG, and NR_END.

Referenced by ElecEqualizer::~ElecEqualizer().

void free_convert_matrix ( float **  b,
long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References FREE_ARG, and NR_END.

void free_cvector ( unsigned char *  v,
long  nl,
long  nh 
)

References FREE_ARG, and NR_END.

void free_dmatrix ( double **  m,
long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References FREE_ARG, and NR_END.

Referenced by ElecEqualizer::~ElecEqualizer().

void free_dvector ( double *  v,
long  nl,
long  nh 
)

References FREE_ARG, and NR_END.

Referenced by f1dim(), and linmind().

void free_f3tensor ( float ***  t,
long  nrl,
long  nrh,
long  ncl,
long  nch,
long  ndl,
long  ndh 
)

References FREE_ARG, and NR_END.

void free_imatrix ( int **  m,
long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References FREE_ARG, and NR_END.

void free_ivector ( int *  v,
long  nl,
long  nh 
)

References FREE_ARG, and NR_END.

Referenced by gaussj(), and gaussj_complex().

void free_lvector ( unsigned long *  v,
long  nl,
long  nh 
)

References FREE_ARG, and NR_END.

void free_matrix ( float **  m,
long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References FREE_ARG, and NR_END.

void free_nrvector ( float *  v,
long  nl,
long  nh 
)

References FREE_ARG, and NR_END.

Referenced by f1dim(), linmin(), and powell().

void free_submatrix ( float **  b,
long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References FREE_ARG, and NR_END.

double Frequency2Wavelength ( double  Frequency  ) 

References LightSpeed.

void frprmn ( float  p[],
int  n,
float  ftol,
int *  iter,
float *  fret,
float(*)(float[])  func,
void(*)(float[], float[])  dfunc 
)

References EPS, FREEALL, linmin(), nrerror(), and nrvector().

void frprmnd ( double  p[],
int  n,
double  ftol,
int *  iter,
double *  fret,
double(*)(double[])  func,
void(*)(double[], double[])  dfunc 
)

References dvector(), EPS, FREEALLD, linmind(), and nrerror().

float gammln ( float  xx  ) 

References log().

float gammp ( float  a,
float  x 
)

References gcf(), gser(), and nrerror().

float gammq ( float  a,
float  x 
)

References gcf(), gser(), and nrerror().

void gaussian_pdf ( int  N,
double  stan_dev,
double *  vec 
)

References log(), sq(), and sqrt().

float Gaussian_pdf ( long *  idum  ) 

References log(), ranG(), and sqrt().

void gaussj ( double **  a,
int  n,
double **  b,
int  m 
)
void gaussj_complex ( cplx **  a,
int  n,
cplx **  b,
int  m 
)
void gcf ( float *  gammcf,
float  a,
float  x,
float *  gln 
)

References FPMIN, gammln(), ITMAX, log(), and nrerror().

double GetDegreeOfPolarization ( double *  StokesVector  ) 

References NEAR_ZERO, sq(), and sqrt().

double GetDistance2Points ( double *  PointA,
double *  PointB,
int  FirstCoord 
)

References sq(), and sqrt().

Referenced by GetRadiusCircle().

double GetPhase ( const cplx  Phasor  ) 

References jc, and sgn().

double GetRadiusCircle ( double *  PointA,
double *  PointB,
double *  PointC 
)
double GetVectorLength ( double *  Vector,
int  Dimension 
)

References sq(), and sqrt().

void gser ( float *  gamser,
float  a,
float  x,
float *  gln 
)

References EPS, gammln(), log(), and nrerror().

int** imatrix ( long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References nrerror().

int* ivector ( long  nl,
long  nh 
)

References nrerror().

Referenced by gaussj(), and gaussj_complex().

void Jones2Stokes ( const cplx Jones,
double *  Stokes 
)

References jc, and sq().

void Jones2StokesKeepPower ( const cplx Jones,
double *  Stokes 
)

References Jones2Stokes(), and sq().

void JonesPair2MixedStokes ( const cplx Jones1,
const cplx Jones2,
cplx MixedStokes 
)

Converts a pair of Jones vectors v_1, v_2 into the mixed Stokes vector S_12 = ConjugateTranspose(v_1)*Sigma*v_2 where Sigma is the Pauli Spin 4-vector

Converts a pair of Jones vectors v_1, v_2 into the mixed Stokes vector S_12 = ConjugateTranspose(v_1)*Sigma*v_2 where Sigma is the Pauli Spin 4-vector.

Here the Jones vectors are complex 2x1 column vectors and S_12 is a complex 4-vector.

If v_1 = v_2, then the Mixed Stokes vector is just the standard Stokes vector of v_1, and is in particular real.

In general, the complex conjugate of S_12 is S_21.

If v_1 and v_2 form an orthonormal basis, then the zero-th entry of S_12 is zero

We do not normalize by the zero-th entry of S_12, as it may be 0!

Written by JZ, Dec 2005

References jc.

Referenced by GaussianReceiver::ComputeFirstOrderPMDParameters(), and GaussianReceiver::ReceiveSignalDGD_NoisePartiallyPolarized().

double Linear2dB ( double  LinearValue  ) 
double Linear2dB_Limited ( double  LinearValue,
double  MaxValue_dB 
)
double Linear2dBm ( double  LinearPower  ) 
void linmin ( float  p[],
float  xi[],
int  n,
float *  fret,
float(*)(float[])  func 
)

References brent(), f1dim(), free_nrvector(), mnbrak(), nrfunc, nrvector(), and TOL.

Referenced by frprmn(), and powell().

void linmind ( double  p[],
double  xi[],
int  n,
double *  fret,
double(*)(double[])  func 
)

References brentd(), dvector(), f1dim(), free_dvector(), mnbrakd(), nrfuncd, and TOL.

Referenced by frprmnd().

int lock_or_unlock_mosix ( int  what  ) 
unsigned long* lvector ( long  nl,
long  nh 
)

References nrerror().

float** matrix ( long  nrl,
long  nrh,
long  ncl,
long  nch 
)

References nrerror().

void MaxAndArgMax ( double *  Vec,
int  Length,
double &  MaxValue,
int &  ArgMax 
)
double MaxOfArray ( double *  Array,
int  Length 
)

Returns the maximum element of the array Array.

Referenced by ChiSquareReceiver::ComputePDFAtTimeValue().

void MGeneralRotation ( double  angle,
double *  r_vec,
double  MMatrix[][3] 
)

References Multiply(), sq(), and sqrt().

void MinAndArgMin ( double *  Vec,
int  Length,
double &  MinValue,
int &  ArgMin 
)
double MinOfArray ( double *  Array,
int  Length 
)

Returns the minimum element of the array Array.

Referenced by ChiSquareReceiver::ComputePDFAtTimeValue().

void mnbrak ( float *  ax,
float *  bx,
float *  cx,
float *  fa,
float *  fb,
float *  fc,
float(*)(float)  func 
)

References FMAX, GLIMIT, GOLD, SHFT, and SIGN.

Referenced by linmin().

void mnbrakd ( double *  ax,
double *  bx,
double *  cx,
double *  fa,
double *  fb,
double *  fc,
double(*)(double)  func 
)

References FMAX, GLIMIT, GOLD, SHFT, and SIGN.

Referenced by linmind().

void MRotatesAboutX ( double  angle,
double  MMatrix[][3] 
)
void MRotatesAboutY ( double  angle,
double  MMatrix[][3] 
)
void MRotatesAboutZ ( double  angle,
double  MMatrix[][3] 
)
void Multiply ( cplx  Left[][2],
cplx  Right[][2] 
)
void Multiply ( double  Left[][3],
double  Right[][3] 
)
void Multiply ( double  Left[][3],
double  Right[3] 
)
void nrerror ( char  error_text[]  ) 
float* nrvector ( long  nl,
long  nh 
)

References nrerror().

Referenced by f1dim(), frprmn(), linmin(), and powell().

void optical_filter ( cplx my_field_time,
cplx my_field_freq,
cfftw fft,
double  fwhm_norm 
)
double peak_power ( cplx in,
int  N 
)
int Periodicity ( int  ii,
int  Periodicity 
)
void powell ( float  p[],
float  xi[][4],
int  n,
float  ftol,
int *  iter,
float *  fret,
float(*)(float[])  func 
)
double pulse_energy ( cplx in,
int  N,
double  width 
)
double Quadrature ( double *  Data,
int  NumPts,
double  LeftEndPt,
double  RightEndPt 
)

Computes $^RightEndPt f(x) dx, where function is given by Data[k] = f(LeftEndPt + k*Delta) with Delta = (RightEndPt - LeftEndPt)/(NumPts-1)

So Data[0] = f(LeftEndPt) and Data[NumPts-1] = RightEndPt The method uses Simpson's rule, which estimates the integral as

Integral = Delta/3( f(x_0) + 4[f(x_1) + f(x_3) +... f(x_{n-3}) + f(x_{n-1})] + 2[f(x_2) + f(x_4) +... f(x_{n-2})] + f(x_n) )

where n is even.

For us if NumPts is odd then n=NumPts-1, and if NumPts is even then n=NumPts-2, and we use Simpson on the subarray of the first NumPts-1 points, with the final part of the integral being done using trapezoid rule with 2 points.

If NumPts < 5 then Simpson's rule doesn't really apply and so we just use Trapezoid rule.

Integral=0.0;

for(int ii=0;ii < NumPts;ii++) Integral+=Data[ii];

Integral *= Delta;

Referenced by ElecSignalStat::ComputeAveragePDFs(), GaussianReceiver::ComputeAveragePDFs(), ChiSquareReceiver::ComputeGaussianPDFsAndBER(), Histogram2D::ComputeIntegralPDF(), OptSignal::ComputeMeanFreqSignal(), OptSignal::ComputeMeanPhasePulse(), OptSignal::ComputeMeanTimePulse(), Histogram2D::ComputeMeanX_PDF(), Histogram2D::ComputeMeanY_PDF(), ElecSignalStat::ComputeMinimumBERAndDecisionThreshold(), GaussianReceiver::ComputeMinimumBERAndDecisionThreshold(), ChiSquareReceiver::ComputeMinimumBERAndDecisionThreshold(), ChiSquareReceiver::ComputeMomentsInEachBit(), ChiSquareReceiver::ComputePDFAtTimeValue(), OptSignal::ComputeRMSPulseWidth(), Histogram2D::ComputeXMarginalPDF(), Histogram2D::ComputeYMarginalPDF(), and OptSignal::GetEnergyInTimeRange().

float ran1 ( long *  idum  ) 

References AM, IA, IR, NTAB, and RNMX.

float ranG ( long *  idum  ) 

References AM, IA1, IA2, IR1, IR2, NTAB, and RNMX.

Referenced by Gaussian_pdf().

void RotatesAboutX ( double  angle,
double *  Vector 
)
void RotatesAboutX ( double  angle,
cplx JonesVector 
)

References jc.

void RotatesAboutY ( double  angle,
double *  Vector 
)
void RotatesAboutY ( double  angle,
cplx JonesVector 
)

References jc.

void RotatesAboutZ ( double  angle,
cplx JonesVector 
)
void RotatesAboutZ ( double  angle,
double *  Vector 
)
double ScalarProduct ( double *  VectorA,
double *  VectorB 
)
int slow_mosix ( void   ) 
void spline ( double *  x,
double *  y,
int  n,
double  yp1,
double  ypn,
double *  y2 
)
double splint ( double *  xa,
double *  ya,
double *  y2a,
int  n,
double  x 
)
void Stokes2Jones ( const double *  Stokes,
cplx Jones 
)

References jc, sq(), and sqrt().

void Stokes2JonesKeepPower ( const double *  Stokes,
cplx Jones 
)

References sq(), sqrt(), and Stokes2Jones().

float** submatrix ( float **  a,
long  oldrl,
long  oldrh,
long  oldcl,
long  oldch,
long  newrl,
long  newcl 
)

References nrerror().

void TransRyV3to_YZ ( double *  Vector,
double *  thetaY 
)

References pi, RotatesAboutY(), sgn(), and sq().

void TransRzRxV3to_Xhat ( double *  Vector,
double *  thetaZthetaX 
)
void TransRzRxV3to_Xhat ( double *  Vector,
double *  thetaZ,
double *  thetaX 
)

References pi, RotatesAboutX(), RotatesAboutZ(), and sq().

void TransRzRxV3toXhat ( double *  Vector,
double *  thetaZthetaY 
)

References pi, and TransRzRxV3to_Xhat().

void TransRzRyV3to_Xhat ( double *  Vector,
double *  thetaZthetaY 
)

References pi, RotatesAboutY(), RotatesAboutZ(), and sq().

void TransRzRyV3toXhat ( double *  Vector,
double *  thetaZthetaY 
)

References pi, and TransRzRyV3to_Xhat().

void URotatesAboutX ( double  angle,
cplx  UMatrix[][2] 
)

References jc.

void URotatesAboutY ( double  angle,
cplx  UMatrix[][2] 
)

References jc.

void URotatesAboutZ ( double  angle,
cplx  UMatrix[][2] 
)
double Wavelength2Frequency ( double  Wavelength  ) 

References LightSpeed.

float zbrent ( float(*)(float)  func,
float  x1,
float  x2,
float  tol 
)

References EPS, nrerror(), and SIGN.


Variable Documentation

ofstream* LogFile
int ncom
float(* nrfunc)(float[])

Referenced by linmin().

double(* nrfuncd)(double[])

Referenced by linmind().

float * pcom
double * pcomd
float * xicom
double * xicomd