const Number c, const BlockVector<Number>& X);
/**
- * Scale each element of the vector by the
- * given factor. This function was
- * previously called @p{equ(Number)}, which
- * in my eyes is an extremely unintuitive
- * naming and was thus replaced.
+ * Scale each element of the
+ * vector by the given factor.
+ *
+ * This function is deprecated
+ * and will be removed in a
+ * future version. Use
+ * @p{operator *=} and
+ * @p{operator /=} instead.
*/
void scale (const Number factor);
/**
* Scale each element of the
* vector by a constant
- * value. This operator is an
- * alias to the @ref{scale}
- * function, except that it
- * returns a reference to itself.
+ * value.
*/
BlockVector<Number> & operator *= (const Number factor);
+ /**
+ * Scale each element of the
+ * vector by the inverse of the
+ * given value.
+ */
+ BlockVector<Number> & operator /= (const Number factor);
+
/**
* Multiply each element of this
* vector by the corresponding
template <typename Number>
inline
-BlockVector<Number> & BlockVector<Number>::operator *= (const Number factor)
+BlockVector<Number> &
+BlockVector<Number>::operator *= (const Number factor)
{
scale (factor);
return *this;
+template <typename Number>
+inline
+BlockVector<Number> &
+BlockVector<Number>::operator /= (const Number factor)
+{
+ scale (1./factor);
+ return *this;
+}
+
+
+
template <typename Number>
inline
Vector<Number> &
/**
* Scale each element of the
* vector by the given factor.
+ *
+ * This function is deprecated
+ * and will be removed in a
+ * future version. Use
+ * @p{operator *=} and
+ * @p{operator /=} instead.
*/
void scale (const Number factor);
+
/**
* Scale each element of the
* vector by a constant
- * value. This operator is an
- * alias to the @ref{scale}
- * function, except that it
- * returns a reference to itself.
+ * value.
*/
Vector<Number> & operator *= (const Number factor);
+
+ /**
+ * Scale each element of the
+ * vector by the inverse of the
+ * given value.
+ */
+ Vector<Number> & operator /= (const Number factor);
/**
* Scale each element of this
+template <typename Number>
+inline
+Vector<Number> & Vector<Number>::operator /= (const Number factor)
+{
+ scale (1./factor);
+ return *this;
+}
+
+
+
template <typename Number>
inline