47 template<
int N,
class T>
48 class assert_compile_time {
63 class assert_compile_time<0,double> {
74 validate_value_stride;
81 validate_index_stride;
88 const bool assume_sorted = !sv_lhs->
nz() || ( sv_lhs->
nz() && sv_lhs->
is_sorted() );
93 sv_lhs->
add_element( ele_t( i + offset, alpha * (*itr++) ) );
98 sv_lhs->
add_element( ele_t( i + offset, alpha * (*itr) ) );
107 const bool assume_sorted = ( !sv_lhs->
nz() || ( sv_lhs->
nz() && sv_lhs->
is_sorted() ) )
108 && ( !sv_rhs.
nz() || ( sv_rhs.
nz() || sv_rhs.
is_sorted() ) );
111 sv_lhs->
add_element( ele_t( itr->index() + sv_rhs.
offset() + offset, alpha * (itr->value()) ) );
115 if(itr->value() != 0.0 )
116 sv_lhs->
add_element( ele_t( itr->index() + sv_rhs.
offset() + offset, alpha * (itr->value()) ) );
difference_type offset() const
Return the offset for the indexes (ith real index = begin()[i-1]->index() + offset()# ...
size_type dim() const
Returns the number of elements of the VectorSliceTmpl.
Teuchos::Ordinal index_type
Typedef for the index type of elements that are used by the library.
RTOp_value_type value_type
Sparse Vector Slice class template.
bool is_sorted() const
Return true if the sequence is sorted.
void add_element(element_type ele)
Add an unsorted element.
C++ Standard Library compatable iterator class for accesing nonunit stride arrays of data...
bool is_sorted() const
Return true if the sequence is assumed sorted.
RTOp_index_type size_type
size_type nz() const
Return the number of non-zero elements.
void assume_sorted(bool assume_is_sorted)
Called by the client to inform this sparse vector object that the elements be assumed to be in sequen...
Sparse Vector class template.
Sparse storage element type.
FortranTypes::f_dbl_prec value_type
Typedef for the value type of elements that is used for the library.
void add_elements(SpVector *sv_lhs, value_type alpha, const DVectorSlice &vs_rhs, size_type offset=0, bool add_zeros=true)
Add elements from a dense vector to a sparse vector.
size_type nz() const
Return the number of non-zero elements.