MOOCHO (Single Doxygen Collection) Version of the Day
Public Member Functions | Private Member Functions | Private Attributes
AbstractLinAlgPack::VectorMutableSubView Class Reference

Concrete subclass for a sub-view of a VectorMutable object. More...

#include <AbstractLinAlgPack_VectorMutableSubView.hpp>

Inheritance diagram for AbstractLinAlgPack::VectorMutableSubView:
Inheritance graph

List of all members.

Public Member Functions

 VectorMutableSubView ()
 Constructs to uninitialized.
 VectorMutableSubView (const vec_mut_ptr_t &full_vec, const Range1D &rng)
 Calls this->initialize().
void initialize (const vec_mut_ptr_t &vec, const Range1D &rng)
void set_uninitialized ()
 Set uninitialized()
const vec_mut_ptr_tfull_vec () const

Private Member Functions

VectorMutableSubViewoperator= (const VectorMutableSubView &)

Private Attributes

vec_mut_ptr_t full_vec_
 If full_vec_.get() == NULL, the vector is uninitalized (dim == 0).

Overridden from Vector

vec_ptr_t sub_view (const Range1D &rng) const
 Overridden to pick VectorSubView::sub_view().

Overridden from VectorMutable

void set_ele (index_type i, value_type val)
vec_mut_ptr_t sub_view (const Range1D &rng)
void get_sub_vector (const Range1D &rng, RTOpPack::MutableSubVector *sub_vec)
void commit_sub_vector (RTOpPack::MutableSubVector *sub_vec)
void set_sub_vector (const RTOpPack::SparseSubVector &sub_vec)

Detailed Description

Concrete subclass for a sub-view of a VectorMutable object.

Not all of the methods from VectorMutable are overridden, only those that need to be or may result in better performance.

The default constructor and copy constructors are allowd but the default assignment operator is not allowed since it does not have the correct sematics.

There is really not much to this vector subclass. The subclass is only possible because of the first_ele, sub_dim, and global_offset options with apply_op(). The vector space object returned by this->space() is of type VectorSpaceSubSpace which in turn relys on VectorSpace::sub_space().

Definition at line 63 of file AbstractLinAlgPack_VectorMutableSubView.hpp.

Constructor & Destructor Documentation

AbstractLinAlgPack::VectorMutableSubView::VectorMutableSubView ( ) [inline]

Constructs to uninitialized.

Postconditions: see set_uninitialized().

Definition at line 138 of file AbstractLinAlgPack_VectorMutableSubView.hpp.

AbstractLinAlgPack::VectorMutableSubView::VectorMutableSubView ( const vec_mut_ptr_t full_vec,
const Range1D rng 

Calls this->initialize().

Definition at line 49 of file AbstractLinAlgPack_VectorMutableSubView.cpp.

Member Function Documentation

void AbstractLinAlgPack::VectorMutableSubView::initialize ( const vec_mut_ptr_t vec,
const Range1D rng 


Constructs a view of the vector this = vec(rng).

full_vec[in] The original full vector. It is allowed for full_vec.get() == NULL in which case this is uninitialized (i.e. this->dim() == 0).
rng[in] The range of elements in full_vec that this vector will represent.

Definition at line 54 of file AbstractLinAlgPack_VectorMutableSubView.cpp.

void AbstractLinAlgPack::VectorMutableSubView::set_uninitialized ( )

Set uninitialized()


Reimplemented from AbstractLinAlgPack::VectorSubView.

Definition at line 62 of file AbstractLinAlgPack_VectorMutableSubView.cpp.

const VectorMutableSubView::vec_mut_ptr_t & AbstractLinAlgPack::VectorMutableSubView::full_vec ( ) const [inline]
Vector::vec_ptr_t AbstractLinAlgPack::VectorMutableSubView::sub_view ( const Range1D rng) const [virtual]

Overridden to pick VectorSubView::sub_view().

Reimplemented from AbstractLinAlgPack::VectorMutable.

Definition at line 71 of file AbstractLinAlgPack_VectorMutableSubView.cpp.

void AbstractLinAlgPack::VectorMutableSubView::set_ele ( index_type  i,
value_type  val 
) [virtual]

Reimplemented from AbstractLinAlgPack::VectorMutable.

Definition at line 78 of file AbstractLinAlgPack_VectorMutableSubView.cpp.

VectorMutable::vec_mut_ptr_t AbstractLinAlgPack::VectorMutableSubView::sub_view ( const Range1D rng) [virtual]

Reimplemented from AbstractLinAlgPack::VectorMutable.

Definition at line 86 of file AbstractLinAlgPack_VectorMutableSubView.cpp.

void AbstractLinAlgPack::VectorMutableSubView::get_sub_vector ( const Range1D rng,
RTOpPack::MutableSubVector sub_vec 
) [virtual]
void AbstractLinAlgPack::VectorMutableSubView::commit_sub_vector ( RTOpPack::MutableSubVector sub_vec) [virtual]
void AbstractLinAlgPack::VectorMutableSubView::set_sub_vector ( const RTOpPack::SparseSubVector sub_vec) [virtual]
VectorMutableSubView& AbstractLinAlgPack::VectorMutableSubView::operator= ( const VectorMutableSubView ) [private]

Member Data Documentation

If full_vec_.get() == NULL, the vector is uninitalized (dim == 0).

Reimplemented from AbstractLinAlgPack::VectorSubView.

Definition at line 127 of file AbstractLinAlgPack_VectorMutableSubView.hpp.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines