CHROMA
remez_stub.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Remez algorithm for finding nth roots
4  */
5 
6 #ifndef __remez_stub_h__
7 #define __remez_stub_h__
8 
9 #include "chromabase.h"
11 
12 namespace Chroma
13 {
14 
15  //! Dummy class for case when gmp is not present
16  /*! @ingroup monomial
17  *
18  */
19  class RemezStub
20  {
21  public:
22  RemezStub(const Real& lower, const Real& upper, long prec)
23  {
24  QDPIO::cerr << "RemezStub: Remez algorithm not supported without at least GMP (Gnu Muli-Precision library)" << std::endl;
25  QDP_abort(1);
26  }
28  void setBounds(const Real& lower, const Real& upper) {}
29  const Real generateApprox(int num_degree, int den_degree,
30  unsigned long power_num, unsigned long power_den) {return 0;}
31  const Real generateApprox(int degree,
32  unsigned long power_num, unsigned long power_den) {return 0;}
33 
34  //! Return the partial fraction expansion of the approximation x^(pnum/pden)
36  {
37  QDP_error_exit("RemezStub not implemented");
38  return RemezCoeff_t();
39  }
40 
41  //! Return the partial fraction expansion of the approximation x^(-pnum/pden)
43  {
44  QDP_error_exit("RemezStub not implemented");
45  return RemezCoeff_t();
46  }
47 
48  //! Given a partial fraction expansion, evaluate it at x
49  Real evalPFE(const Real& x, const RemezCoeff_t& coeff)
50  {QDP_error_exit("RemezStub not implemented"); return Real(0);}
51 
52  };
53 } // end namespace Chroma
54 
55 #endif // Include guard
56 
57 
58 
Primary include file for CHROMA library code.
Dummy class for case when gmp is not present.
Definition: remez_stub.h:20
Real evalPFE(const Real &x, const RemezCoeff_t &coeff)
Given a partial fraction expansion, evaluate it at x.
Definition: remez_stub.h:49
RemezStub(const Real &lower, const Real &upper, long prec)
Definition: remez_stub.h:22
RemezCoeff_t getPFE()
Return the partial fraction expansion of the approximation x^(pnum/pden)
Definition: remez_stub.h:35
RemezCoeff_t getIPFE()
Return the partial fraction expansion of the approximation x^(-pnum/pden)
Definition: remez_stub.h:42
void setBounds(const Real &lower, const Real &upper)
Definition: remez_stub.h:28
const Real generateApprox(int degree, unsigned long power_num, unsigned long power_den)
Definition: remez_stub.h:31
const Real generateApprox(int num_degree, int den_degree, unsigned long power_num, unsigned long power_den)
Definition: remez_stub.h:29
int x
Definition: meslate.cc:34
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
Remez algorithm coefficients.
Convenient structure to package Remez coeffs.
Definition: remez_coeff.h:19