SHOGUN  4.0.0
所有成员列表 | Public 类型 | Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 成员函数
SGVector< T > 模板类 参考

详细描述

template<class T>
class shogun::SGVector< T >

shogun vector

在文件 Parameter.h28 行定义.

类 SGVector< T > 继承关系图:
Inheritance graph
[图例]

Public 类型

typedef T Scalar
 

Public 成员函数

 SGVector ()
 
 SGVector (T *v, index_t len, bool ref_counting=true)
 
 SGVector (T *m, index_t len, index_t offset)
 
 SGVector (index_t len, bool ref_counting=true)
 
 SGVector (const SGVector &orig)
 
 SGVector (EigenVectorXt &vec)
 
 SGVector (EigenRowVectorXt &vec)
 
 operator EigenVectorXtMap () const
 
 operator EigenRowVectorXtMap () const
 
void set_const (T const_elem)
 
SGVector< T > get ()
 
void set (SGVector< T > orig)
 
virtual ~SGVector ()
 
int32_t size () const
 
 operator T * ()
 
void zero ()
 
void range_fill (T start=0)
 
void random (T min_value, T max_value)
 
index_t find_position_to_insert (T element)
 
SGVector< T > clone () const
 
const T & get_element (index_t index)
 
void set_element (const T &p_element, index_t index)
 
void resize_vector (int32_t n)
 
const T & operator[] (uint64_t index) const
 
const T & operator[] (int64_t index) const
 
const T & operator[] (uint32_t index) const
 
const T & operator[] (int32_t index) const
 
T & operator[] (uint64_t index)
 
T & operator[] (int64_t index)
 
T & operator[] (uint32_t index)
 
T & operator[] (int32_t index)
 
void add (const SGVector< T > x)
 
void add (const SGSparseVector< T > &x)
 
void add (const T x)
 
SGVector< T > operator+ (SGVector< T > x)
 
SGVector< T > operator+= (SGVector< T > x)
 
SGVector< T > operator+= (SGSparseVector< T > &x)
 
bool equals (SGVector< T > &other)
 
product ()
 Return product(vec) 更多...
 
void display_size () const
 
void display_vector (const char *name="vector", const char *prefix="") const
 
SGVector< index_tfind (T elem)
 
template<typename Predicate >
SGVector< index_tfind_if (Predicate p)
 
void scale (T alpha)
 Scale vector inplace. 更多...
 
void load (CFile *loader)
 
void save (CFile *saver)
 
SGVector< float64_tget_real ()
 
SGVector< float64_tget_imag ()
 
template<>
void zero ()
 
template<>
index_t find_position_to_insert (complex128_t element)
 
template<>
void range_fill_vector (complex128_t *vec, int32_t len, complex128_t start)
 
template<>
void display_vector (const bool *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const char *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const uint8_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const int8_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const uint16_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const int16_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const int32_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const uint32_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const int64_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const uint64_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const float32_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const float64_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const floatmax_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void display_vector (const complex128_t *vector, int32_t n, const char *name, const char *prefix)
 
template<>
void vec1_plus_scalar_times_vec2 (float64_t *vec1, float64_t scalar, const float64_t *vec2, int32_t n)
 
template<>
void vec1_plus_scalar_times_vec2 (float32_t *vec1, float32_t scalar, const float32_t *vec2, int32_t n)
 
template<>
void random_vector (complex128_t *vec, int32_t len, complex128_t min_value, complex128_t max_value)
 
template<>
bool twonorm (const bool *x, int32_t len)
 
template<>
char twonorm (const char *x, int32_t len)
 
template<>
int8_t twonorm (const int8_t *x, int32_t len)
 
template<>
uint8_t twonorm (const uint8_t *x, int32_t len)
 
template<>
int16_t twonorm (const int16_t *x, int32_t len)
 
template<>
uint16_t twonorm (const uint16_t *x, int32_t len)
 
template<>
int32_t twonorm (const int32_t *x, int32_t len)
 
template<>
uint32_t twonorm (const uint32_t *x, int32_t len)
 
template<>
int64_t twonorm (const int64_t *x, int32_t len)
 
template<>
uint64_t twonorm (const uint64_t *x, int32_t len)
 
template<>
float32_t twonorm (const float32_t *x, int32_t len)
 
template<>
float64_t twonorm (const float64_t *v, int32_t n)
 
template<>
floatmax_t twonorm (const floatmax_t *x, int32_t len)
 
template<>
complex128_t twonorm (const complex128_t *x, int32_t len)
 
template<>
complex128_t qsq (complex128_t *x, int32_t len, float64_t q)
 
template<>
complex128_t qnorm (complex128_t *x, int32_t len, float64_t q)
 
template<>
float64_t sum_abs (float64_t *vec, int32_t len)
 
template<>
float32_t sum_abs (float32_t *vec, int32_t len)
 
template<>
int32_t unique (complex128_t *output, int32_t size)
 
template<>
void scale_vector (float64_t alpha, float64_t *vec, int32_t len)
 
template<>
void scale_vector (float32_t alpha, float32_t *vec, int32_t len)
 
template<>
void load (CFile *loader)
 
template<>
void save (CFile *saver)
 
int32_t ref_count ()
 

静态 Public 成员函数

static T * clone_vector (const T *vec, int32_t len)
 
static void fill_vector (T *vec, int32_t len, T value)
 
static void range_fill_vector (T *vec, int32_t len, T start=0)
 
static void random_vector (T *vec, int32_t len, T min_value, T max_value)
 
static T twonorm (const T *x, int32_t len)
 || x ||_2 更多...
 
static float64_t onenorm (T *x, int32_t len)
 || x ||_1 更多...
 
static T qsq (T *x, int32_t len, float64_t q)
 || x ||_q^q 更多...
 
static T qnorm (T *x, int32_t len, float64_t q)
 || x ||_q 更多...
 
static void vec1_plus_scalar_times_vec2 (T *vec1, const T scalar, const T *vec2, int32_t n)
 x=x+alpha*y 更多...
 
static void vector_multiply (T *target, const T *v1, const T *v2, int32_t len)
 Compute vector multiplication. 更多...
 
static void add (T *target, T alpha, const T *v1, T beta, const T *v2, int32_t len)
 target=alpha*vec1 + beta*vec2 更多...
 
static void add_scalar (T alpha, T *vec, int32_t len)
 Add scalar to vector inplace. 更多...
 
static void scale_vector (T alpha, T *vec, int32_t len)
 Scale vector inplace. 更多...
 
static T sum (T *vec, int32_t len)
 Return sum(vec) 更多...
 
static T sum (SGVector< T > vec)
 Return sum(vec) 更多...
 
static T product (T *vec, int32_t len)
 Return the product of the vectors elements. 更多...
 
static T sum_abs (T *vec, int32_t len)
 return sum(abs(vec)) 更多...
 
static int32_t unique (T *output, int32_t size)
 
static void display_vector (const T *vector, int32_t n, const char *name="vector", const char *prefix="")
 Display vector (useful for debugging) 更多...
 
static void display_vector (const SGVector< T >, const char *name="vector", const char *prefix="")
 Display vector (useful for debugging) 更多...
 
static SGMatrix< T > convert_to_matrix (SGVector< T > vector, index_t nrows, index_t ncols, bool fortran_order)
 
static void convert_to_matrix (T *&matrix, index_t nrows, index_t ncols, const T *vector, int32_t vlen, bool fortran_order)
 

Public 属性

T * vector
 
index_t vlen
 

Protected 成员函数

virtual void copy_data (const SGReferencedData &orig)
 
virtual void init_data ()
 
virtual void free_data ()
 
void copy_refcount (const SGReferencedData &orig)
 
int32_t ref ()
 
int32_t unref ()
 

成员类型定义说明

typedef T Scalar

The scalar type of the vector

在文件 SGVector.h47 行定义.

构造及析构函数说明

SGVector ( )

Default constructor

在文件 SGVector.cpp73 行定义.

SGVector ( T *  v,
index_t  len,
bool  ref_counting = true 
)

Constructor for setting params

在文件 SGVector.cpp79 行定义.

SGVector ( T *  m,
index_t  len,
index_t  offset 
)

Wraps a vector around an existing memory segment with an offset

在文件 SGVector.h56 行定义.

SGVector ( index_t  len,
bool  ref_counting = true 
)

Constructor to create new vector in memory

在文件 SGVector.cpp85 行定义.

SGVector ( const SGVector< T > &  orig)

Copy constructor

在文件 SGVector.cpp92 行定义.

SGVector ( EigenVectorXt vec)

Wraps a matrix around the data of an Eigen3 column vector

在文件 SGVector.cpp111 行定义.

Wraps a matrix around the data of an Eigen3 row vector

在文件 SGVector.cpp118 行定义.

~SGVector ( )
virtual

Empty destructor

在文件 SGVector.cpp104 行定义.

成员函数说明

void add ( const SGVector< T >  x)

Add vector to current vector

参数
xadd vector x to current vector

在文件 SGVector.cpp281 行定义.

void add ( const SGSparseVector< T > &  x)

Add sparse vector to current vector

参数
xadd sparse vector x to current vector

在文件 SGVector.cpp300 行定义.

void add ( const T  x)

Add scalar to current vector

参数
xadd vector x to current vector

在文件 SGVector.cpp291 行定义.

static void add ( T *  target,
alpha,
const T *  v1,
beta,
const T *  v2,
int32_t  len 
)
static

target=alpha*vec1 + beta*vec2

在文件 SGVector.h322 行定义.

static void add_scalar ( alpha,
T *  vec,
int32_t  len 
)
static

Add scalar to vector inplace.

在文件 SGVector.h331 行定义.

SGVector< T > clone ( ) const

Clone vector

在文件 SGVector.cpp209 行定义.

T * clone_vector ( const T *  vec,
int32_t  len 
)
static

Clone vector

在文件 SGVector.cpp215 行定义.

SGMatrix< T > convert_to_matrix ( SGVector< T >  vector,
index_t  nrows,
index_t  ncols,
bool  fortran_order 
)
static

Create SGMatrix from linear vector

参数
vectorsource vector
nrowsnumber of rows
ncolsnumber of cols
fortran_orderorder of stroing matrix in linear vector true - column-major order (FORTRAN, MATLAB, R) false - row-major order (C, Python)
返回
matrix

在文件 SGVector.cpp901 行定义.

void convert_to_matrix ( T *&  matrix,
index_t  nrows,
index_t  ncols,
const T *  vector,
int32_t  vlen,
bool  fortran_order 
)
static

Create matrix from linear vector

参数
matrixdestination memory
nrowsnumber of rows
ncolsnumber of cols
vectorsource vector
vlenlenght of source vector
fortran_orderorder of stroing matrix in linear vector true - column-major order (FORTRAN, MATLAB, R) false - row-major order (C, Python)
返回
matrix

在文件 SGVector.cpp915 行定义.

void copy_data ( const SGReferencedData orig)
protectedvirtual

needs to be overridden to copy data

实现了 SGReferencedData.

在文件 SGVector.cpp320 行定义.

void copy_refcount ( const SGReferencedData orig)
protectedinherited

copy refcount

在文件 SGReferencedData.cpp55 行定义.

void display_size ( ) const

Display array size

在文件 SGVector.cpp314 行定义.

void display_vector ( const bool *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp371 行定义.

void display_vector ( const char *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp382 行定义.

void display_vector ( const char *  name = "vector",
const char *  prefix = "" 
) const

Display vector

在文件 SGVector.cpp357 行定义.

static void display_vector ( const T *  vector,
int32_t  n,
const char *  name = "vector",
const char *  prefix = "" 
)
static

Display vector (useful for debugging)

void display_vector ( const uint8_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp393 行定义.

void display_vector ( const SGVector< T >  vector,
const char *  name = "vector",
const char *  prefix = "" 
)
static

Display vector (useful for debugging)

在文件 SGVector.cpp364 行定义.

void display_vector ( const int8_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp404 行定义.

void display_vector ( const uint16_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp415 行定义.

void display_vector ( const int16_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp426 行定义.

void display_vector ( const int32_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp437 行定义.

void display_vector ( const uint32_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp448 行定义.

void display_vector ( const int64_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp460 行定义.

void display_vector ( const uint64_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp471 行定义.

void display_vector ( const float32_t vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp482 行定义.

void display_vector ( const float64_t vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp493 行定义.

void display_vector ( const floatmax_t vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp504 行定义.

void display_vector ( const complex128_t vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp518 行定义.

bool equals ( SGVector< T > &  other)

Equals method up to precision for vectors (element-wise)

参数
othervector to compare with
返回
false if any element differs or if sizes are different, true otherwise

在文件 SGVector.cpp342 行定义.

void fill_vector ( T *  vec,
int32_t  len,
value 
)
static

Fill vector

在文件 SGVector.cpp223 行定义.

SGVector< index_t > find ( elem)

Find index for occurance of an element

参数
elemthe element to find

在文件 SGVector.cpp810 行定义.

SGVector<index_t> find_if ( Predicate  p)

Find index for elements where the predicate returns true

参数
pthe predicate, it should accept the value of the element and return a bool

在文件 SGVector.h406 行定义.

index_t find_position_to_insert ( element)

For a sorted (ascending) vector, gets the index after the first element that is smaller than the given one

参数
elementelement to find index for
返回
index of the first element greater than given one

在文件 SGVector.cpp189 行定义.

index_t find_position_to_insert ( complex128_t  element)

在文件 SGVector.cpp201 行定义.

void free_data ( )
protectedvirtual

needs to be overridden to free data

实现了 SGReferencedData.

在文件 SGVector.cpp334 行定义.

SGVector<T> get ( )

Get the vector (no copying is done here)

返回
the refcount increased vector

在文件 SGVector.h92 行定义.

const T & get_element ( index_t  index)

Get vector element at index

参数
indexindex
返回
vector element at index

在文件 SGVector.cpp245 行定义.

SGVector< float64_t > get_imag ( )

Imag part of a complex128_t vector

在文件 SGVector.cpp892 行定义.

SGVector< float64_t > get_real ( )

Real part of a complex128_t vector

在文件 SGVector.cpp884 行定义.

void init_data ( )
protectedvirtual

needs to be overridden to initialize empty data

实现了 SGReferencedData.

在文件 SGVector.cpp327 行定义.

void load ( CFile loader)

Load vector from file

参数
loaderFile object via which to load data

在文件 SGVector.cpp849 行定义.

void load ( CFile loader)

在文件 SGVector.cpp864 行定义.

float64_t onenorm ( T *  x,
int32_t  len 
)
static

|| x ||_1

在文件 SGVector.cpp716 行定义.

operator EigenRowVectorXtMap ( ) const

Wraps an Eigen3 row vector around the data of this matrix

在文件 SGVector.cpp131 行定义.

operator EigenVectorXtMap ( ) const

Wraps an Eigen3 column vector around the data of this matrix

在文件 SGVector.cpp125 行定义.

operator T * ( )

Cast to pointer

在文件 SGVector.h111 行定义.

SGVector< T > operator+ ( SGVector< T >  x)

Addition operator

addition operator

在文件 SGVector.cpp270 行定义.

SGVector<T> operator+= ( SGVector< T >  x)

Inplace addition operator

在文件 SGVector.h276 行定义.

SGVector<T> operator+= ( SGSparseVector< T > &  x)

Inplace addition operator for sparse vector

在文件 SGVector.h283 行定义.

const T& operator[] ( uint64_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h179 行定义.

const T& operator[] ( int64_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h189 行定义.

const T& operator[] ( uint32_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h199 行定义.

const T& operator[] ( int32_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h209 行定义.

T& operator[] ( uint64_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h219 行定义.

T& operator[] ( int64_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h229 行定义.

T& operator[] ( uint32_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h239 行定义.

T& operator[] ( int32_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h249 行定义.

static T product ( T *  vec,
int32_t  len 
)
static

Return the product of the vectors elements.

在文件 SGVector.h357 行定义.

T product ( )

Return product(vec)

在文件 SGVector.h367 行定义.

T qnorm ( T *  x,
int32_t  len,
float64_t  q 
)
static

|| x ||_q

在文件 SGVector.cpp745 行定义.

complex128_t qnorm ( complex128_t x,
int32_t  len,
float64_t  q 
)

在文件 SGVector.cpp752 行定义.

T qsq ( T *  x,
int32_t  len,
float64_t  q 
)
static

|| x ||_q^q

在文件 SGVector.cpp727 行定义.

complex128_t qsq ( complex128_t x,
int32_t  len,
float64_t  q 
)

在文件 SGVector.cpp737 行定义.

void random ( min_value,
max_value 
)

Create random vector

参数
min_value[min_value,max_value]
max_value

在文件 SGVector.cpp181 行定义.

void random_vector ( T *  vec,
int32_t  len,
min_value,
max_value 
)
static

Random vector

在文件 SGVector.cpp566 行定义.

void random_vector ( complex128_t vec,
int32_t  len,
complex128_t  min_value,
complex128_t  max_value 
)

在文件 SGVector.cpp573 行定义.

void range_fill ( start = 0)

Range fill a vector with start...start+len-1

参数
start- value to be assigned to first element of vector

在文件 SGVector.cpp173 行定义.

void range_fill_vector ( T *  vec,
int32_t  len,
start = 0 
)
static

Range fill vector

在文件 SGVector.cpp230 行定义.

void range_fill_vector ( complex128_t vec,
int32_t  len,
complex128_t  start 
)

在文件 SGVector.cpp237 行定义.

int32_t ref ( )
protectedinherited

increase reference counter

返回
reference count

在文件 SGReferencedData.cpp64 行定义.

int32_t ref_count ( )
inherited

display reference counter

返回
reference count

在文件 SGReferencedData.cpp41 行定义.

void resize_vector ( int32_t  n)

Resize vector

参数
nnew size
返回
if resizing was successful

在文件 SGVector.cpp259 行定义.

void save ( CFile saver)

Save vector to file

参数
saverFile object via which to save data

在文件 SGVector.cpp869 行定义.

void save ( CFile saver)

在文件 SGVector.cpp879 行定义.

void scale ( alpha)

Scale vector inplace.

在文件 SGVector.cpp844 行定义.

void scale_vector ( alpha,
T *  vec,
int32_t  len 
)
static

Scale vector inplace.

在文件 SGVector.cpp823 行定义.

void scale_vector ( float64_t  alpha,
float64_t vec,
int32_t  len 
)

在文件 SGVector.cpp831 行定义.

void scale_vector ( float32_t  alpha,
float32_t vec,
int32_t  len 
)

在文件 SGVector.cpp837 行定义.

void set ( SGVector< T >  orig)

Wrapper for the copy constructor useful for SWIG interfaces

参数
origvector to set

在文件 SGVector.cpp98 行定义.

void set_const ( const_elem)

Set vector to a constant

参数
const_elem- value to set vector to

在文件 SGVector.cpp152 行定义.

void set_element ( const T &  p_element,
index_t  index 
)

Set vector element at index 'index' return false in case of trouble

参数
p_elementvector element to set
indexindex
返回
if setting was successful

在文件 SGVector.cpp252 行定义.

int32_t size ( ) const

Size

在文件 SGVector.h108 行定义.

static T sum ( T *  vec,
int32_t  len 
)
static

Return sum(vec)

在文件 SGVector.h341 行定义.

static T sum ( SGVector< T >  vec)
static

Return sum(vec)

在文件 SGVector.h351 行定义.

T sum_abs ( T *  vec,
int32_t  len 
)
static

return sum(abs(vec))

返回
sum(abs(vec))

在文件 SGVector.cpp760 行定义.

float64_t sum_abs ( float64_t vec,
int32_t  len 
)

在文件 SGVector.cpp771 行定义.

float32_t sum_abs ( float32_t vec,
int32_t  len 
)

在文件 SGVector.cpp779 行定义.

static T twonorm ( const T *  x,
int32_t  len 
)
static

|| x ||_2

bool twonorm ( const bool *  x,
int32_t  len 
)

在文件 SGVector.cpp580 行定义.

char twonorm ( const char *  x,
int32_t  len 
)

在文件 SGVector.cpp587 行定义.

int8_t twonorm ( const int8_t *  x,
int32_t  len 
)

在文件 SGVector.cpp594 行定义.

uint8_t twonorm ( const uint8_t *  x,
int32_t  len 
)

在文件 SGVector.cpp604 行定义.

int16_t twonorm ( const int16_t *  x,
int32_t  len 
)

在文件 SGVector.cpp614 行定义.

uint16_t twonorm ( const uint16_t *  x,
int32_t  len 
)

在文件 SGVector.cpp624 行定义.

int32_t twonorm ( const int32_t *  x,
int32_t  len 
)

在文件 SGVector.cpp634 行定义.

uint32_t twonorm ( const uint32_t *  x,
int32_t  len 
)

在文件 SGVector.cpp644 行定义.

int64_t twonorm ( const int64_t *  x,
int32_t  len 
)

在文件 SGVector.cpp654 行定义.

uint64_t twonorm ( const uint64_t *  x,
int32_t  len 
)

在文件 SGVector.cpp664 行定义.

float32_t twonorm ( const float32_t x,
int32_t  len 
)

在文件 SGVector.cpp674 行定义.

float64_t twonorm ( const float64_t v,
int32_t  n 
)

在文件 SGVector.cpp684 行定义.

floatmax_t twonorm ( const floatmax_t x,
int32_t  len 
)

在文件 SGVector.cpp696 行定义.

complex128_t twonorm ( const complex128_t x,
int32_t  len 
)

在文件 SGVector.cpp706 行定义.

int32_t unique ( T *  output,
int32_t  size 
)
static

Performs a inplace unique of a vector of type T using quicksort returns the new number of elements

在文件 SGVector.cpp788 行定义.

int32_t unique ( complex128_t output,
int32_t  size 
)

在文件 SGVector.cpp802 行定义.

int32_t unref ( )
protectedinherited

decrement reference counter and deallocate object if refcount is zero before or after decrementing it

返回
reference count

在文件 SGReferencedData.cpp84 行定义.

void vec1_plus_scalar_times_vec2 ( T *  vec1,
const T  scalar,
const T *  vec2,
int32_t  n 
)
static

x=x+alpha*y

在文件 SGVector.cpp532 行定义.

void vec1_plus_scalar_times_vec2 ( float64_t vec1,
float64_t  scalar,
const float64_t vec2,
int32_t  n 
)

在文件 SGVector.cpp540 行定义.

void vec1_plus_scalar_times_vec2 ( float32_t vec1,
float32_t  scalar,
const float32_t vec2,
int32_t  n 
)

在文件 SGVector.cpp553 行定义.

static void vector_multiply ( T *  target,
const T *  v1,
const T *  v2,
int32_t  len 
)
static

Compute vector multiplication.

在文件 SGVector.h313 行定义.

void zero ( )

Fill vector with zeros

在文件 SGVector.cpp138 行定义.

void zero ( )

在文件 SGVector.cpp145 行定义.

类成员变量说明

T* vector

vector

在文件 SGVector.h479 行定义.

index_t vlen

length of vector

在文件 SGVector.h481 行定义.


该类的文档由以下文件生成:

SHOGUN 机器学习工具包 - 项目文档