14 #ifndef __SGSPARSEVECTOR_H__
15 #define __SGSPARSEVECTOR_H__
27 template <
class T>
struct SGSparseVectorEntry
53 bool ref_counting=
true);
74 T
dense_dot(T alpha, T* vec, int32_t dim, T b);
182 void add_to_dense(T alpha, T * vec, int32_t dim,
bool abs_val =
false);
190 const char* prefix=
"");
221 #endif // __SGSPARSEVECTOR_H__
void sort_features(bool stable_pointer=false)
T sparse_dot(const SGSparseVector< T > &v)
virtual void copy_data(const SGReferencedData &orig)
static T dot_prod_expensive_unsorted(const SGSparseVector< T > &a, const SGSparseVector< T > &b)
void display_vector(const char *name="vector", const char *prefix="")
void add_to_dense(T alpha, T *vec, int32_t dim, bool abs_val=false)
shogun reference count managed data
A File access base class.
virtual ~SGSparseVector()
SGSparseVectorEntry< T > * features
T dense_dot(T alpha, T *vec, int32_t dim, T b)
all of classes and functions are contained in the shogun namespace
template class SGSparseVectorEntry
T get_feature(int32_t index)
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...
SGVector< T > get_dense()
int32_t get_num_dimensions()
SGSparseVector< T > clone() const