18 template <
class T,
class ST>
24 template <
class T,
class ST>
31 template <
class T,
class ST>
36 template <
class T,
class ST>
39 const T& beta_old,
const T& beta_cur,
const T& alpha,
SGVector<ST>& zeta_sh_new)
45 ST numer=zeta_sh_old[i]*zeta_sh_cur[i]*beta_old;
47 ST denom=beta_cur*alpha*(zeta_sh_old[i]-zeta_sh_cur[i])
48 +beta_old*zeta_sh_old[i]*(1.0-beta_cur*shifts[i]);
51 if (denom==static_cast<ST>(0.0))
52 denom=
static_cast<ST
>(CMath::MACHINE_EPSILON);
54 zeta_sh_new[i]=numer/denom;
58 template <
class T,
class ST>
67 ST numer=beta_cur*zeta_sh_new[i];
68 ST denom=zeta_sh_cur[i];
71 if (denom==static_cast<ST>(0.0))
72 denom=
static_cast<ST
>(CMath::MACHINE_EPSILON);
74 beta_sh_cur[i]=numer/denom;
78 template <
class T,
class ST>
87 ST numer=alpha*zeta_sh_cur[i]*beta_sh_old[i];
88 ST denom=zeta_sh_old[i]*beta_old;
91 if (denom==static_cast<ST>(0.0))
92 denom=
static_cast<ST
>(CMath::MACHINE_EPSILON);
94 alpha_sh[i]=numer/denom;
CIterativeShiftedLinearFamilySolver()
abstract template base for all iterative linear solvers such as conjugate gradient (CG) solvers...
all of classes and functions are contained in the shogun namespace
abstract template base for CG based solvers to the solution of shifted linear systems of the form fo...