Ejemplo n.º 1
0
 // Prototype for specialize methods (can and should be overloaded)
 void Matrix::AddMSinvZImpl(Number alpha, const Vector& S, const Vector& Z,
                            Vector& X) const
 {
   SmartPtr<Vector> tmp = S.MakeNew();
   tmp->AddVectorQuotient(1., Z, S, 0.);
   MultVector(alpha, *tmp, 1., X);
 }
Ejemplo n.º 2
0
  void ScaledMatrix::AddMSinvZImpl(Number alpha, const Vector& S,
                                   const Vector& Z, Vector& X) const
  {
    DBG_ASSERT(false && "Got the ScaledMatrix::AddMSinvZImpl.  Should implement specialized method!");

    SmartPtr<Vector> tmp = S.MakeNew();
    tmp->AddVectorQuotient(1., Z, S, 0.);
    MultVector(alpha, *tmp, 1., X);
  }