20 using namespace Eigen;
25 CRationalApproximationCGMJob::CRationalApproximationCGMJob()
43 m_linear_solver=linear_solver;
46 m_operator=linear_operator;
53 m_const_multiplier=const_multiplier;
56 void CRationalApproximationCGMJob::init()
60 m_const_multiplier=0.0;
68 SG_ADD(&m_vector,
"trace_sample",
71 SG_ADD(&m_weights,
"complex_shifts",
74 SG_ADD(&m_weights,
"complex_weights",
77 SG_ADD(&m_const_multiplier,
"constant_multiplier",
78 "Constant multiplier to be multiplied with the final solution",
MS_NOT_AVAILABLE);
92 REQUIRE(m_operator,
"Operator is not set!\n");
99 "Number of shifts and weights are not equal!\n");
103 m_operator, m_vector, m_shifts, m_weights);
116 float64_t result=map_vector.dot(map_agg);
118 result*=m_const_multiplier;
Base class that stores the result of an independent job when the result is a scalar.
const index_t get_dimension() const
virtual ~CRationalApproximationCGMJob()
CRationalApproximationCGMJob()
SGVector< float64_t > get_imag()
class that uses conjugate gradient method for solving a shifted linear system family where the linear...
virtual void submit_result(CJobResult *result)=0
Class SGObject is the base class of all shogun objects.
Template class that aggregates scalar job results in each submit_result call, finalize then transform...
Abstract base class that provides an interface for computing an aggeregation of the job results of in...
virtual SGVector< T > apply(SGVector< T > b) const =0
all of classes and functions are contained in the shogun namespace
Abstract base for general computation jobs to be registered in CIndependentComputationEngine. compute method produces a job result and submits it to the internal JobResultAggregator. Each set of jobs that form a result will share the same job result aggregator.
virtual SGVector< complex128_t > solve_shifted_weighted(CLinearOperator< float64_t > *A, SGVector< float64_t > b, SGVector< complex128_t > shifts, SGVector< complex128_t > weights)
CJobResultAggregator * m_aggregator