コード例 #1
0
ファイル: ComplexFft.C プロジェクト: EricDoug/queso
void
Fft<std::complex<double> >::forward(
  const std::vector<std::complex<double> >& data,
        unsigned int                        fftSize,
        std::vector<std::complex<double> >& forwardResult)
{
  queso_not_implemented();

  std::complex<double> z = data[0]; z += 0.; // just to avoid icpc warnings
  unsigned int         f = fftSize; f += 1;  // just to avoid icpc warnings
  forwardResult[0] = 0.;                     // just to avoid icpc warnings
#if 0
  if (forwardResult.size() != fftSize) {
    forwardResult.resize(fftSize,std::complex<double>(0.,0.));
    std::vector<std::complex<double> >(forwardResult).swap(forwardResult);
  }

  std::vector<double> internalData(fftSize,0.);
  unsigned int minSize = std::min((unsigned int) data.size(),fftSize);
  for (unsigned int j = 0; j < minSize; ++j) {
    internalData[j] = data[j];
  }

  gsl_fft_real_workspace* realWkSpace = gsl_fft_real_workspace_alloc(fftSize);
  gsl_fft_real_wavetable* realWvTable = gsl_fft_real_wavetable_alloc(fftSize);

  gsl_fft_real_transform(&internalData[0],
                         1,
                         fftSize,
                         realWvTable,
                         realWkSpace);

  gsl_fft_real_wavetable_free(realWvTable);
  gsl_fft_real_workspace_free(realWkSpace);

  unsigned int halfFFTSize = fftSize/2;
  double realPartOfFFT = 0.;
  double imagPartOfFFT = 0.;
  for (unsigned int j = 0; j < internalData.size(); ++j) {
    if (j == 0) {
      realPartOfFFT = internalData[j];
      imagPartOfFFT = 0.;
    }
    else if (j < halfFFTSize) {
      realPartOfFFT = internalData[2*j-1];
      imagPartOfFFT = internalData[2*j  ];
    }
    else if (j == halfFFTSize) {
      realPartOfFFT = internalData[2*j-1];
      imagPartOfFFT = 0.;
    }
    else {
      realPartOfFFT =  internalData[2*(fftSize-j)-1];
      imagPartOfFFT = -internalData[2*(fftSize-j)  ];
    }
    forwardResult[j] = std::complex<double>(realPartOfFFT,imagPartOfFFT);
  }
#endif
  return;
}
コード例 #2
0
ファイル: WignerVectorRealizer.C プロジェクト: libqueso/queso
void
WignerVectorRealizer<V,M>::realization(V& nextValues) const
{
  queso_not_implemented();

  nextValues.cwSet(0.);
  return;
}
コード例 #3
0
void
InvLogitGaussianJointPdf<V,M>::distributionVariance(M & covMatrix) const
{
  // AFAIK there's no simple closed form here, and taking the inverse
  // transformation of the variance in the transformed space probably
  // isn't accurate enough in cases where the mean is too near the
  // bounds.
  queso_not_implemented();
}
コード例 #4
0
ファイル: JointPdf.C プロジェクト: libqueso/queso
void
BaseJointPdf<V,M>::distributionVariance(M & covMatrix) const
{
  queso_not_implemented();
}
コード例 #5
0
ファイル: JointPdf.C プロジェクト: libqueso/queso
void
BaseJointPdf<V,M>::distributionMean(V & meanVector) const
{
  queso_not_implemented();
}