Extract a constant
DenseLinAlgPack::DVectorSlice view of a
This class is only to be used with
Vector objects that store all of their elements in the local address space or can easily access all of the vector elements in this process (or thread). It is generally to be used in serial applications but might also find use in parallel appliations where a vector is replicated across processes.
This utility class is defined purly in terms of the abstract interfaces. It is only to be used as an automatic variable on the stack. For example, to extract a
DVectorSlice view of an abstract vector and use it to copy to another
DVectorSlice object you could write a function like:
In the above code, if the underlying
Vector object does not have to perform any dynamic memory allocations and copy in the method
Vector::get_sub_vector() then the above code will only have a constant time overhead. However, the above approach will work for any
Vector object (no matter how inefficient it may be).
Definition at line 78 of file AbstractLinAlgPack_VectorDenseEncap.hpp.