42 #ifndef SP_VECTOR_OP_H
43 #define SP_VECTOR_OP_H
45 #include "AbstractLinAlgPack_SparseVectorSliceOp.hpp"
46 #include "AbstractLinAlgPack_SparseElement.hpp"
48 namespace AbstractLinAlgPack {
61 void add_elements( SpVector* sv_lhs, value_type alpha,
const DVectorSlice& vs_rhs
62 ,
size_type offset = 0,
bool add_zeros =
true );
76 void add_elements( SpVector* sv_lhs, value_type alpha,
const SpVectorSlice& sv_rhs
77 ,
size_type offset = 0,
bool add_zeros =
true );
89 DVectorSlice dense_view( SpVectorSlice& sv_rhs );
93 const DVectorSlice dense_view(
const SpVectorSlice& sv_rhs );
101 DenseLinAlgPack::DVectorSlice
102 AbstractLinAlgPack::dense_view( SpVectorSlice& sv_rhs )
105 ? DVectorSlice( &sv_rhs.begin()->value(), sv_rhs.nz(), 2 )
106 : DVectorSlice( NULL, 0, 0 );
110 const DenseLinAlgPack::DVectorSlice
111 AbstractLinAlgPack::dense_view(
const SpVectorSlice& sv_rhs )
114 ? DVectorSlice( &const_cast<SpVectorSlice&>(sv_rhs).begin()->value(), sv_rhs.nz(), 2 )
115 : DVectorSlice( NULL, 0, 0 );
118 #endif // SP_VECTOR_CLASS_H