42 #ifndef ALAP_VECTOR_HPP
43 #define ALAP_VECTOR_HPP
47 #include "AbstractLinAlgPack_Types.hpp"
48 #include "RTOpPack_RTOpT.hpp"
50 namespace AbstractLinAlgPack {
120 const RTOpPack::RTOp &op
121 ,
const size_t num_vecs
122 ,
const Vector* vecs[]
123 ,
const size_t num_targ_vecs
124 ,VectorMutable* targ_vecs[]
126 ,
const index_type first_ele = 1
127 ,
const index_type sub_dim = 0
128 ,
const index_type global_offset = 0
198 const RTOpPack::RTOp &op
199 ,
const size_t num_vecs
201 ,
const size_t num_targ_vecs
204 ,
const index_type first_ele
205 ,
const index_type sub_dim
206 ,
const index_type global_offset
241 const RTOpPack::RTOp &op
242 ,
const size_t num_vecs
244 ,
const size_t num_targ_vecs
247 ,
const index_type first_ele
248 ,
const index_type sub_dim
249 ,
const index_type global_offset
266 virtual index_type
dim()
const;
274 virtual index_type
nz()
const;
292 virtual std::ostream&
output(
293 std::ostream& out,
bool print_dim =
true,
bool newline =
true
294 ,index_type global_offset = 0
319 virtual value_type
get_ele(index_type i)
const;
374 virtual value_type
norm_1()
const;
377 virtual value_type
norm_2()
const;
380 virtual value_type
norm_inf()
const;
500 mutable index_type num_nonzeros_;
501 mutable value_type norm_1_, norm_2_, norm_inf_;
517 #endif // ALAP_VECTOR_HPP
virtual vec_ptr_t sub_view(const Range1D &rng) const
Create an abstract view of a vector object .
virtual const VectorSpace & space() const =0
Return the vector space that this vector belongs to.
virtual void get_sub_vector(const Range1D &rng, RTOpPack::SubVector *sub_vec) const
Get a non-mutable explicit view of a sub-vector.
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
virtual value_type norm_1() const
One norm. ||v||_1 = sum( |v(i)|, i = 1,,,this->dim() )
virtual void finalize_apply_op(const size_t num_targ_vecs, VectorMutable **targ_vecs) const
This method usually needs to be called by subclasses at the end of the apply_op() method implementati...
virtual vec_mut_ptr_t clone() const
Create a clone of this vector objet.
virtual value_type norm_inf() const
Infinity norm. ||v||_inf = max( |v(i)|, i = 1,,,this->dim() )
Teuchos::RCP< const Vector > vec_ptr_t
virtual value_type norm_2() const
Two norm. ||v||_2 = sqrt( sum( v(i)^2, i = 1,,,this->dim() ) )
Teuchos::RCP< VectorMutable > vec_mut_ptr_t
virtual void has_changed() const
Must be called by any vector subclass that modifies this vector object!
Abstract interface for objects that represent a space for mutable coordinate vectors.
virtual std::ostream & output(std::ostream &out, bool print_dim=true, bool newline=true, index_type global_offset=0) const
Virtual output function.
virtual void free_sub_vector(RTOpPack::SubVector *sub_vec) const
Free an explicit view of a sub-vector.
virtual index_type dim() const
Return the dimension of this vector.
virtual index_type nz() const
Return the number of nonzero elements in the vector.
virtual value_type get_ele(index_type i) const
Fetch an element in the vector.
Abstract interface for mutable coordinate vectors {abstract}.
friend void apply_op(const RTOpPack::RTOp &op, const size_t num_vecs, const Vector *vecs[], const size_t num_targ_vecs, VectorMutable *targ_vecs[], RTOpPack::ReductTarget *reduct_obj, const index_type first_ele, const index_type sub_dim, const index_type global_offset)
virtual value_type inner_product(const Vector &v) const
Return the inner product of *this with v.