message: Adding a ScaledOperator class for easy scalar multiplication of existing operators.
diff: @@ -299,6 +299,24 @@ public:
  };
  +/// Scaled Operator B: x -> a A(x).
  +class ScaledOperator : public Operator
  +{
  +private:
  + const Operator &A_;
  + double a_;
  +
  +public:
  + /// Create a scalar product operator related to A.
  + explicit ScaledOperator(const Operator *A, double a)
  + : Operator(A->Width(), A->Height()), A_(*A), a_(a) { }
  +
  + /// Operator application
  + virtual void Mult(const Vector &x, Vector &y) const
  + { A_.Mult(x, y); y *= a_; }
  +};
  +
  +
  /** @brief The transpose of a given operator. Switches the roles of the methods
  Mult() and MultTranspose(). */
  class TransposeOperator : public Operator
  