11 #include <shogun/lib/config.h> 59 void CRationalApproximation::init()
69 SG_ADD(&
m_shifts,
"complex_shifts",
"Complex shifts in the linear system",
72 SG_ADD(&
m_weights,
"complex_weights",
"Complex weights of the linear system",
76 "Constant multiplier in the rational approximation",
119 "Minimum eigenvalue is negative, please provide a Hermitian matrix\n");
126 compute_shifts_weights_const();
140 int32_t num_shifts=
static_cast<index_t>(-1.5*(log_cond_number+6.0)
146 void CRationalApproximation::compute_shifts_weights_const()
208 SG_WARNING(
"Operator function is undefined!\n")
std::complex< float64_t > complex128_t
const float64_t get_max_eigenvalue() const
float64_t get_constant_multiplier() const
virtual void precompute()
#define SG_NOTIMPLEMENTED
static void ellipKKp(Real L, Real &K, Real &Kp)
SGVector< complex128_t > m_shifts
static void ellipJC(Complex u, Real m, Complex &sn, Complex &cn, Complex &dn)
int32_t compute_num_shifts_from_accuracy()
virtual const char * get_name() const
Class SGObject is the base class of all shogun objects.
Abstract template base class for computing for a linear operator C and a vector s. submit_jobs method creates a bunch of jobs needed to solve for this particular and attaches one unique job aggregator to each of them, then submits them all to the computation engine.
virtual ~CRationalApproximation()
float64_t m_constant_multiplier
#define M_PI
workaround for log2 being a define on cygwin
SGVector< complex128_t > m_weights
SGVector< complex128_t > get_shifts() const
void set_num_shifts(index_t num_shifts)
Abstract base class that provides an abstract compute method for computing eigenvalues of a real valu...
all of classes and functions are contained in the shogun namespace
SGVector< complex128_t > get_weights() const
const float64_t get_min_eigenvalue() const
Abstract base class for solving multiple independent instances of CIndependentJob. It has one method, submit_job, which may add the job to an internal queue and might block if there is yet not space in the queue. After jobs are submitted, it might not yet be ready. wait_for_all waits until all jobs are completed, which *must be* called to guarantee that all jobs are finished.
static float64_t log(float64_t v)
index_t get_num_shifts() const
CEigenSolver * m_eigen_solver
const EOperatorFunction m_function_type
static int32_t pow(bool x, int32_t n)
float64_t m_desired_accuracy