BlockVector<Number> & operator *= (const Number factor);
/**
- * U=a*V. Replacing.
+ * U=a*V. Assignment.
*/
- void equ (const Number a, const BlockVector<Number>& V);
+ template <typename Number2>
+ void equ (const Number a, const BlockVector<Number2>& V);
/**
* U=a*V+b*W.
template <typename Number>
+template <typename Number2>
void BlockVector<Number>::equ (const Number a,
- const BlockVector<Number>& v)
+ const BlockVector<Number2>& v)
{
Assert (num_blocks == v.num_blocks,
ExcDimensionMismatch(num_blocks, v.num_blocks));
void scale (const Vector<Number> &scaling_factors);
/**
- * U=a*V. Replacing.
+ * U=a*V. Assignment.
*/
- void equ (const Number a, const Vector<Number>& V);
+ template <typename Number2>
+ void equ (const Number a, const Vector<Number2>& V);
/**
* U=a*V+b*W.
template <typename Number>
-void Vector<Number>::equ (const Number a, const Vector<Number>& u)
+template <typename Number2>
+void Vector<Number>::equ (const Number a, const Vector<Number2>& u)
{
Assert (dim!=0, ExcEmptyVector());
Assert (dim == u.dim, ExcDimensionMismatch(dim, u.dim));
iterator i_ptr = begin(),
i_end = end();
- const_iterator u_ptr = u.begin();
+ typename Vector<Number2>::const_iterator u_ptr = u.begin();
while (i_ptr!=i_end)
*i_ptr++ = a * *u_ptr++;
}
const BlockVector<float>&);
template void BlockVector<double>::reinit(const BlockVector<double>&, bool);
template void BlockVector<double>::reinit(const BlockVector<float>&, bool);
+template void BlockVector<double>::equ(double, const BlockVector<double>&);
+template void BlockVector<double>::equ(double, const BlockVector<float>&);
template class BlockVector<float>;
template BlockVector<float>& BlockVector<float>::operator=(
const BlockVector<double>&);
template void BlockVector<float>::reinit(const BlockVector<double>&, bool);
template void BlockVector<float>::reinit(const BlockVector<float>&, bool);
+template void BlockVector<float>::equ(float, const BlockVector<double>&);
+template void BlockVector<float>::equ(float, const BlockVector<float>&);
namespace BlockVectorIterators
{
template double Vector<double>::operator*(const Vector<double>&) const;
template void Vector<double>::reinit(const Vector<double>&, bool);
template void Vector<double>::reinit(const Vector<float>&, bool);
+template void Vector<double>::equ(double, const Vector<double>&);
+template void Vector<double>::equ(double, const Vector<float>&);
template class Vector<float>;
template Vector<float>& Vector<float>::operator=(const Vector<double>&);
template float Vector<float>::operator*(const Vector<double>&) const;
template void Vector<float>::reinit(const Vector<double>&, bool);
template void Vector<float>::reinit(const Vector<float>&, bool);
+template void Vector<float>::equ(float, const Vector<double>&);
+template void Vector<float>::equ(float, const Vector<float>&);
// see the .h file for why these functions are disabled.
// template Vector<float>::Vector (const Vector<double>& v);
// explicit instantiations
template class Vector<long double>;
-template Vector<long double>& Vector<long double>::operator=(const Vector<float>&);
template Vector<long double>& Vector<long double>::operator=(const Vector<double>&);
+template Vector<long double>& Vector<long double>::operator=(const Vector<float>&);
+template long double Vector<long double>::operator * (const Vector<long double> &) const;
+template long double Vector<long double>::operator * (const Vector<double> &) const;
+template long double Vector<long double>::operator * (const Vector<float> &) const;
+template void Vector<long double>::reinit(const Vector<long double>&, bool);
+template void Vector<long double>::reinit(const Vector<double>&, bool);
+template void Vector<long double>::reinit(const Vector<float>&, bool);
+template void Vector<long double>::equ(long double, const Vector<long double>&);
+template void Vector<long double>::equ(long double, const Vector<double>&);
+template void Vector<long double>::equ(long double, const Vector<float>&);
+
template Vector<double>& Vector<double>::operator=(const Vector<long double>&);
-template Vector<float>& Vector<float>::operator=(const Vector<long double>&);
+template double Vector<double>::operator * (const Vector<long double> &) const;
+template void Vector<double>::reinit(const Vector<long double>&, bool);
+template void Vector<double>::equ(double, const Vector<long double>&);
+template Vector<float>& Vector<float>::operator=(const Vector<long double>&);
template float Vector<float>::operator * (const Vector<long double> &) const;
-template double Vector<double>::operator * (const Vector<long double> &) const;
-template long double Vector<long double>::operator * (const Vector<float> &) const;
-template long double Vector<long double>::operator * (const Vector<double> &) const;
-template long double Vector<long double>::operator * (const Vector<long double> &) const;
+template void Vector<float>::reinit(const Vector<long double>&, bool);
+template void Vector<float>::equ(float, const Vector<long double>&);
+
// see the .h file for why these functions are disabled.
// template Vector<float>::Vector (const Vector<double>& v);
// template Vector<double>::Vector (const Vector<float>& v);