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

详细描述

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

shogun vector

在文件 base/Parameter.h 第 28 行定义.

类 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
 
T * data () 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)
 
T product ()
 Return product(vec) 更多...
 
void display_size () const
 
void display_vector (const char *name="vector", const char *prefix="") const
 
SGVector< index_t > find (T elem)
 
template<typename Predicate >
SGVector< index_t > find_if (Predicate p)
 
void scale (T alpha)
 Scale vector inplace. 更多...
 
void load (CFile *loader)
 
void save (CFile *saver)
 
SGVector< float64_t > get_real ()
 
SGVector< float64_t > get_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.h 第 47 行定义.

构造及析构函数说明

SGVector ( )

Default constructor

在文件 SGVector.cpp 第 73 行定义.

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

Constructor for setting params

在文件 SGVector.cpp 第 79 行定义.

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

Wraps a vector around an existing memory segment with an offset

在文件 SGVector.h 第 56 行定义.

SGVector ( index_t  len,
bool  ref_counting = true 
)

Constructor to create new vector in memory

在文件 SGVector.cpp 第 85 行定义.

SGVector ( const SGVector< T > &  orig)

Copy constructor

在文件 SGVector.cpp 第 92 行定义.

SGVector ( EigenVectorXt &  vec)

Wraps a matrix around the data of an Eigen3 column vector

在文件 SGVector.cpp 第 111 行定义.

Wraps a matrix around the data of an Eigen3 row vector

在文件 SGVector.cpp 第 118 行定义.

~SGVector ( )
virtual

Empty destructor

在文件 SGVector.cpp 第 104 行定义.

成员函数说明

void add ( const SGVector< T >  x)

Add vector to current vector

参数
xadd vector x to current vector

在文件 SGVector.cpp 第 281 行定义.

void add ( const SGSparseVector< T > &  x)

Add sparse vector to current vector

参数
xadd sparse vector x to current vector

在文件 SGVector.cpp 第 299 行定义.

void add ( const T  x)

Add scalar to current vector

参数
xadd vector x to current vector

在文件 SGVector.cpp 第 291 行定义.

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

target=alpha*vec1 + beta*vec2

在文件 SGVector.h 第 335 行定义.

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

Add scalar to vector inplace.

在文件 SGVector.h 第 344 行定义.

SGVector< T > clone ( ) const

Clone vector

在文件 SGVector.cpp 第 209 行定义.

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

Clone vector

在文件 SGVector.cpp 第 215 行定义.

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.cpp 第 900 行定义.

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.cpp 第 914 行定义.

void copy_data ( const SGReferencedData &  orig)
protectedvirtual

needs to be overridden to copy data

实现了 SGReferencedData.

在文件 SGVector.cpp 第 319 行定义.

void copy_refcount ( const SGReferencedData &  orig)
protectedinherited

copy refcount

在文件 SGReferencedData.cpp 第 55 行定义.

T* data ( ) const

Data pointer

在文件 SGVector.h 第 118 行定义.

void display_size ( ) const

Display array size

在文件 SGVector.cpp 第 313 行定义.

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

在文件 SGVector.cpp 第 370 行定义.

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

在文件 SGVector.cpp 第 381 行定义.

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

在文件 SGVector.cpp 第 392 行定义.

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

Display vector

在文件 SGVector.cpp 第 356 行定义.

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 int8_t *  vector,
int32_t  n,
const char *  name,
const char *  prefix 
)

在文件 SGVector.cpp 第 403 行定义.

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

Display vector (useful for debugging)

在文件 SGVector.cpp 第 363 行定义.

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

在文件 SGVector.cpp 第 414 行定义.

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

在文件 SGVector.cpp 第 425 行定义.

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

在文件 SGVector.cpp 第 436 行定义.

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

在文件 SGVector.cpp 第 447 行定义.

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

在文件 SGVector.cpp 第 459 行定义.

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

在文件 SGVector.cpp 第 470 行定义.

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

在文件 SGVector.cpp 第 481 行定义.

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

在文件 SGVector.cpp 第 492 行定义.

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

在文件 SGVector.cpp 第 503 行定义.

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

在文件 SGVector.cpp 第 517 行定义.

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.cpp 第 341 行定义.

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

Fill vector

在文件 SGVector.cpp 第 223 行定义.

SGVector< index_t > find ( T  elem)

Find index for occurance of an element

参数
elemthe element to find

在文件 SGVector.cpp 第 809 行定义.

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.h 第 419 行定义.

index_t find_position_to_insert ( T  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.cpp 第 189 行定义.

index_t find_position_to_insert ( complex128_t  element)

在文件 SGVector.cpp 第 201 行定义.

void free_data ( )
protectedvirtual

needs to be overridden to free data

实现了 SGReferencedData.

在文件 SGVector.cpp 第 333 行定义.

SGVector<T> get ( )

Get the vector (no copying is done here)

返回
the refcount increased vector

在文件 SGVector.h 第 99 行定义.

const T & get_element ( index_t  index)

Get vector element at index

参数
indexindex
返回
vector element at index

在文件 SGVector.cpp 第 245 行定义.

SGVector< float64_t > get_imag ( )

Imag part of a complex128_t vector

在文件 SGVector.cpp 第 891 行定义.

SGVector< float64_t > get_real ( )

Real part of a complex128_t vector

在文件 SGVector.cpp 第 883 行定义.

void init_data ( )
protectedvirtual

needs to be overridden to initialize empty data

实现了 SGReferencedData.

在文件 SGVector.cpp 第 326 行定义.

void load ( CFile *  loader)

Load vector from file

参数
loaderFile object via which to load data

在文件 SGVector.cpp 第 848 行定义.

void load ( CFile *  loader)

在文件 SGVector.cpp 第 863 行定义.

float64_t onenorm ( T *  x,
int32_t  len 
)
static

|| x ||_1

在文件 SGVector.cpp 第 715 行定义.

operator EigenRowVectorXtMap ( ) const

Wraps an Eigen3 row vector around the data of this matrix

在文件 SGVector.cpp 第 131 行定义.

operator EigenVectorXtMap ( ) const

Wraps an Eigen3 column vector around the data of this matrix

在文件 SGVector.cpp 第 125 行定义.

operator T * ( )

Cast to pointer

在文件 SGVector.h 第 124 行定义.

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

Addition operator

addition operator

在文件 SGVector.cpp 第 270 行定义.

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

Inplace addition operator

在文件 SGVector.h 第 289 行定义.

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

Inplace addition operator for sparse vector

在文件 SGVector.h 第 296 行定义.

const T& operator[] ( uint64_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h 第 192 行定义.

const T& operator[] ( int64_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h 第 202 行定义.

const T& operator[] ( uint32_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h 第 212 行定义.

const T& operator[] ( int32_t  index) const

Operator overload for vector read only access

参数
indexdimension to access

在文件 SGVector.h 第 222 行定义.

T& operator[] ( uint64_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h 第 232 行定义.

T& operator[] ( int64_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h 第 242 行定义.

T& operator[] ( uint32_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h 第 252 行定义.

T& operator[] ( int32_t  index)

Operator overload for vector r/w access

参数
indexdimension to access

在文件 SGVector.h 第 262 行定义.

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

Return the product of the vectors elements.

在文件 SGVector.h 第 370 行定义.

T product ( )

Return product(vec)

在文件 SGVector.h 第 380 行定义.

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

|| x ||_q

在文件 SGVector.cpp 第 744 行定义.

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

在文件 SGVector.cpp 第 751 行定义.

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

|| x ||_q^q

在文件 SGVector.cpp 第 726 行定义.

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

在文件 SGVector.cpp 第 736 行定义.

void random ( T  min_value,
T  max_value 
)

Create random vector

参数
min_value[min_value,max_value]
max_value

在文件 SGVector.cpp 第 181 行定义.

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

Random vector

在文件 SGVector.cpp 第 565 行定义.

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

在文件 SGVector.cpp 第 572 行定义.

void range_fill ( T  start = 0)

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

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

在文件 SGVector.cpp 第 173 行定义.

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

Range fill vector

在文件 SGVector.cpp 第 230 行定义.

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

在文件 SGVector.cpp 第 237 行定义.

int32_t ref ( )
protectedinherited

increase reference counter

返回
reference count

在文件 SGReferencedData.cpp 第 64 行定义.

int32_t ref_count ( )
inherited

display reference counter

返回
reference count

在文件 SGReferencedData.cpp 第 41 行定义.

void resize_vector ( int32_t  n)

Resize vector

参数
nnew size
返回
if resizing was successful

在文件 SGVector.cpp 第 259 行定义.

void save ( CFile *  saver)

Save vector to file

参数
saverFile object via which to save data

在文件 SGVector.cpp 第 868 行定义.

void save ( CFile *  saver)

在文件 SGVector.cpp 第 878 行定义.

void scale ( T  alpha)

Scale vector inplace.

在文件 SGVector.cpp 第 843 行定义.

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

Scale vector inplace.

在文件 SGVector.cpp 第 822 行定义.

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

在文件 SGVector.cpp 第 830 行定义.

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

在文件 SGVector.cpp 第 836 行定义.

void set ( SGVector< T >  orig)

Wrapper for the copy constructor useful for SWIG interfaces

参数
origvector to set

在文件 SGVector.cpp 第 98 行定义.

void set_const ( T  const_elem)

Set vector to a constant

参数
const_elem- value to set vector to

在文件 SGVector.cpp 第 152 行定义.

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.cpp 第 252 行定义.

int32_t size ( ) const

Size

在文件 SGVector.h 第 115 行定义.

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

Return sum(vec)

在文件 SGVector.h 第 354 行定义.

static T sum ( SGVector< T >  vec)
static

Return sum(vec)

在文件 SGVector.h 第 364 行定义.

T sum_abs ( T *  vec,
int32_t  len 
)
static

return sum(abs(vec))

返回
sum(abs(vec))

在文件 SGVector.cpp 第 759 行定义.

float64_t sum_abs ( float64_t *  vec,
int32_t  len 
)

在文件 SGVector.cpp 第 770 行定义.

float32_t sum_abs ( float32_t *  vec,
int32_t  len 
)

在文件 SGVector.cpp 第 778 行定义.

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

|| x ||_2

bool twonorm ( const bool *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 579 行定义.

char twonorm ( const char *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 586 行定义.

int8_t twonorm ( const int8_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 593 行定义.

uint8_t twonorm ( const uint8_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 603 行定义.

int16_t twonorm ( const int16_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 613 行定义.

uint16_t twonorm ( const uint16_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 623 行定义.

int32_t twonorm ( const int32_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 633 行定义.

uint32_t twonorm ( const uint32_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 643 行定义.

int64_t twonorm ( const int64_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 653 行定义.

uint64_t twonorm ( const uint64_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 663 行定义.

float32_t twonorm ( const float32_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 673 行定义.

float64_t twonorm ( const float64_t *  v,
int32_t  n 
)

在文件 SGVector.cpp 第 683 行定义.

floatmax_t twonorm ( const floatmax_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 695 行定义.

complex128_t twonorm ( const complex128_t *  x,
int32_t  len 
)

在文件 SGVector.cpp 第 705 行定义.

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.cpp 第 787 行定义.

int32_t unique ( complex128_t *  output,
int32_t  size 
)

在文件 SGVector.cpp 第 801 行定义.

int32_t unref ( )
protectedinherited

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

返回
reference count

在文件 SGReferencedData.cpp 第 84 行定义.

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

x=x+alpha*y

在文件 SGVector.cpp 第 531 行定义.

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

在文件 SGVector.cpp 第 539 行定义.

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

在文件 SGVector.cpp 第 552 行定义.

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

Compute vector multiplication.

在文件 SGVector.h 第 326 行定义.

void zero ( )

Fill vector with zeros

在文件 SGVector.cpp 第 138 行定义.

void zero ( )

在文件 SGVector.cpp 第 145 行定义.

类成员变量说明

T* vector

vector

在文件 SGVector.h 第 492 行定义.

index_t vlen

length of vector

在文件 SGVector.h 第 494 行定义.


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

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