Example #1
0
        /// <summary>
        /// ctr
        /// </summary>
        /// <param name="FType">Fourier Type</param>
        /// <param name="DomainSize">Size of the Periodic Domain</param>
        /// <param name="PeriodicFunc">Function to Project</param>
        /// <param name="r_min"></param>
        /// <param name="h_min">minimal gridSize</param>
        public FourierLevSetControl(FourierType FType, double DomainSize, Func <double, double> PeriodicFunc, double r_min, double h_min)
        {
            this.FType        = FType;
            this.DomainSize   = DomainSize;
            this.PeriodicFunc = PeriodicFunc;
            this.h_min        = h_min;

            Initialize(r_min);
        }
Example #2
0
 /// <summary>
 /// ctr
 /// </summary>
 /// <param name="FType"></param>
 /// <param name="DomainSize"></param>
 /// <param name="FourierP"></param>
 /// <param name="samplP"></param>
 /// <param name="h_min">minimal gridSize</param>
 public FourierLevSetControl(FourierType FType, double DomainSize, double[] FourierP, double[] samplP, double h_min)
 {
     this.FType      = FType;
     this.DomainSize = DomainSize;
     this.FourierP   = FourierP;
     this.samplP     = samplP;
     this.numSp      = samplP.Length;
     this.h_min      = h_min;
 }
Example #3
0
 public static Complex[,] Transform(Complex[,] f, FourierType type, IProgress progress, CancellationToken ct)
 {
     switch (type)
     {
         case FourierType.SlowCalculation:
             return SlowCalculation(f, -1, progress, ct);
         case FourierType.MatrixCalculation:
             if ((phic == null) || (phir == null) || (phic.GetLength(0) != f.GetLength(0)) || (phir.GetLength(0) != f.GetLength(1)))
                 CreateMatrixes(f.GetLength(0), f.GetLength(1), ct);
             return MatrixCalculation(phic, f, phir, progress, ct);
     }
     throw new NotImplementedException("Transformation type is not implemented.");
 }
Example #4
0
 public static Complex[,] ReverseTransform(Complex[,] F, FourierType type, IProgress progress, CancellationToken ct)
 {
     switch (type)
     {
         case FourierType.SlowCalculation:
             return SlowCalculation(F, 1, progress, ct);
         case FourierType.MatrixCalculation:
             if ((phicC == null) || (phirC == null) || (phicC.GetLength(0) != F.GetLength(0)) || (phirC.GetLength(0) != F.GetLength(1)))
                 CreateMatrixes(F.GetLength(0), F.GetLength(1), ct);
             return MatrixCalculation(phicC, F, phirC, progress, ct);
     }
     throw new NotImplementedException("Transformation type is not implemented.");
 }
Example #5
0
 public Fourier(
     IWindow Window,
     double ZeroPaddingFactor,
     double SamplingFrequency,
     double SpectrumPeakStdDevs,
     IWindow FilterWindowForResults,
     FourierType FourierType,
     IScoringStrategy ScoringStrategy)
 {
     _window                 = Window;
     _zeroPaddingFactor      = ZeroPaddingFactor;
     _samplingFrequency      = SamplingFrequency;
     _spectrumPeakStdDevs    = SpectrumPeakStdDevs;
     _filterWindowForResults = FilterWindowForResults;
     _fourierType            = FourierType;
     _scoringStrategy        = ScoringStrategy;
 }