14 #ifndef __SGSPARSEVECTOR_H__
15 #define __SGSPARSEVECTOR_H__
26 template <
class T>
struct SGSparseVectorEntry
52 bool ref_counting=
true);
73 T
dense_dot(T alpha, T* vec, int32_t dim, T b);
173 const char* prefix=
"");
229 #endif // __SGSPARSEVECTOR_H__
T get_feature(int32_t index)
void sort_features(bool stable_pointer=false)
static T dot_prod_symmetric(const SGSparseVector< T > &a, const SGSparseVector< T > &b)
virtual void copy_data(const SGReferencedData &orig)
int32_t get_num_dimensions()
T sparse_dot(const SGSparseVector< T > &v)
SGVector< T > get_dense()
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...
shogun reference count managed data
SGSparseVector< T > clone() const
A File access base class.
static int32_t cmp_dot_prod_symmetry_fast(index_t alen, index_t blen)
void display_vector(const char *name="vector", const char *prefix="")
static T dot_prod_asymmetric(const SGSparseVector< T > &a, const SGSparseVector< T > &b)
T dense_dot(T alpha, T *vec, int32_t dim, T b)
virtual ~SGSparseVector()
SGSparseVectorEntry< T > * features