Demo entry 6783097

asdasf c 21

   

Submitted by anonymous on Jan 29, 2019 at 02:33
Language: C++. Code size: 683 Bytes.

#include <cstdlib>
#include <iostream>
#include <iomanip>      // std::setprecision
#include <fstream>
#include "f1_convolution.h"

class AAFEval : public Function1DConvolution::Function
{
public:  
  
  AAFEval(double cx, double cy, int order): _cx(cx), _cy(cy)
  {
     _order = order;
  }
    
  double operator () (const double xx[]) const
  {
    double dx = xx[0]-_cx;
    double dy = xx[1]-_cy;
    
    double dr = sqrt(dx*dx+dy*dy);
    if(2*M_PI*dr > bessel_namespace::bessel_root(1, _order) ) return 0.0;
    return 2*M_PI*bessel_namespace::bessel_j0_t1_integral(2*M_PI*dr, 1.0);
  }

 
private:
  int _order;
  double _cx;
  double _cy;
};

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).