virtual void reinit (const unsigned int N,
const bool fast=false);
+ /** This reinit function is
+ equivalent to constructing a
+ new object with the given
+ size, starting from the
+ pointer ptr. */
+ void reinit(const unsigned int N, Number * ptr);
+
+ /** This reinit function is
+ equivalent to constructing a
+ new object with the given
+ size, starting from the
+ pointer ptr. The same
+ considerations made for the
+ constructor apply here. */
+ void reinit(const unsigned int N, const Number * ptr);
/**
* This function is here to prevent
}
+template<typename Number>
+inline
+void VectorView<Number>::reinit(const unsigned int new_size, Number * ptr)
+{
+ this->vec_size = new_size;
+ this->max_vec_size = new_size;
+ this->val = ptr;
+}
+
+
+template<typename Number>
+inline
+void VectorView<Number>::reinit(const unsigned int new_size, const Number * ptr)
+{
+ this->vec_size = new_size;
+ this->max_vec_size = new_size;
+ this->val = const_cast<Number*>(ptr);
+}
+
+
template<typename Number>
inline
void VectorView<Number>::swap(Vector<Number> &)
VectorView<double> v4(N, v3.begin());
deallog << "const Vector View" << std::endl;
print(v4);
+
+ v4.reinit(N, v1.begin());
+ v4.reinit(N, v3.begin());
}