21 using namespace Eigen;
26 CRationalApproximationCGMJob::CRationalApproximationCGMJob()
44 m_linear_solver=linear_solver;
47 m_operator=linear_operator;
54 m_const_multiplier=const_multiplier;
57 void CRationalApproximationCGMJob::init()
61 m_const_multiplier=0.0;
69 SG_ADD(&m_vector,
"trace_sample",
72 SG_ADD(&m_weights,
"complex_shifts",
75 SG_ADD(&m_weights,
"complex_weights",
78 SG_ADD(&m_const_multiplier,
"constant_multiplier",
79 "Constant multiplier to be multiplied with the final solution",
MS_NOT_AVAILABLE);
93 REQUIRE(m_operator,
"Operator is not set!\n");
98 "Dimension mismatch! %d vs %d\n", m_operator->get_dimension(), m_vector.
vlen);
100 "Number of shifts and weights are not equal!\n");
104 m_operator, m_vector, m_shifts, m_weights);
117 float64_t result=map_vector.dot(map_agg);
119 result*=m_const_multiplier;
133 #endif // HAVE_EIGEN3
Base class that stores the result of an independent job when the result is a scalar.
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 SGVector< complex128_t > solve_shifted_weighted(CLinearOperator< SGVector< float64_t >, SGVector< float64_t > > *A, SGVector< float64_t > b, SGVector< complex128_t > shifts, SGVector< complex128_t > weights)
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...
all of classes and functions are contained in the shogun namespace
Abstract template base class that represents a linear operator, e.g. a matrix.
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.
CJobResultAggregator * m_aggregator