Public 成员函数 | |
SGVector () | |
SGVector (T *v, index_t len, bool ref_counting=true) | |
SGVector (index_t len, bool ref_counting=true) | |
SGVector (const SGVector &orig) | |
void | set (SGVector< T > orig) |
virtual | ~SGVector () |
int32_t | size () const |
operator T * () | |
void | zero () |
void | set_const (T const_elem) |
void | range_fill (T start=0) |
void | random (T min_value, T max_value) |
void | randperm () |
index_t | find_position_to_insert (T element) |
void | qsort () |
SGVector< index_t > | argsort () |
bool | is_sorted () const |
SGVector< T > | clone () const |
SGVector< T > | get () |
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) |
void | permute () |
void | permute (CRandom *rand) |
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 更多... | |
float64_t | mean () const |
void | load (CFile *loader) |
void | save (CFile *saver) |
void | abs () |
absolute value of vector elements 更多... | |
void | acos () |
arc cosine of vector elements 更多... | |
void | asin () |
arc sine of vector elements 更多... | |
void | atan () |
arc tangent of vector elements 更多... | |
void | atan2 (T x) |
atan2 of vector elements 更多... | |
void | cos () |
cosine of vector elements 更多... | |
void | cosh () |
hyperbolic cosine of vector elements 更多... | |
void | exp () |
exponential of vector elements 更多... | |
void | log () |
natural logarithm of vector elements 更多... | |
void | log10 () |
common logarithm of vector elements 更多... | |
void | pow (T q) |
power of vector elements 更多... | |
void | sin () |
sine of vector elements 更多... | |
void | sinh () |
hyperbolic sine of vector elements 更多... | |
void | sqrt () |
square root of vector elements 更多... | |
void | tan () |
tangent of vector elements 更多... | |
void | tanh () |
hyperbolic tangent of vector elements 更多... | |
SGVector< float64_t > | get_real () |
SGVector< float64_t > | get_imag () |
template<> | |
void | zero () |
template<> | |
SGVector< index_t > | argsort () |
template<> | |
bool | is_sorted () const |
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<> | |
SGVector< complex128_t > | randperm_vec (int32_t n) |
template<> | |
complex128_t * | randperm (int32_t n) |
template<> | |
void | randperm (complex128_t *perm, int32_t n) |
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 | max_abs (float64_t *vec, int32_t len) |
template<> | |
float32_t | max_abs (float32_t *vec, int32_t len) |
template<> | |
complex128_t | max_abs (complex128_t *vec, int32_t len) |
template<> | |
int32_t | arg_max_abs (float64_t *vec, int32_t inc, int32_t len, float64_t *maxv_ptr) |
template<> | |
int32_t | arg_max_abs (float32_t *vec, int32_t inc, int32_t len, float32_t *maxv_ptr) |
template<> | |
int32_t | arg_max_abs (complex128_t *vec, int32_t inc, int32_t len, complex128_t *maxv_ptr) |
template<> | |
int32_t | arg_max (complex128_t *vec, int32_t inc, int32_t len, complex128_t *maxv_ptr) |
template<> | |
int32_t | arg_min (complex128_t *vec, int32_t inc, int32_t len, complex128_t *minv_ptr) |
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<> | |
float64_t | mean () const |
template<> | |
void | load (CFile *loader) |
template<> | |
void | save (CFile *saver) |
template<> | |
float64_t * | linspace (complex128_t start, complex128_t end, int32_t n) |
template<> | |
void | pow (complex128_t q) |
int32_t | ref_count () |
静态 Public 成员函数 | |
static SGVector< T > | randperm_vec (int32_t n) |
static T * | randperm (int32_t n) |
static SGVector< float64_t > | linspace_vec (T start, T end, int32_t n) |
static float64_t * | linspace (T start, T end, int32_t n) |
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 void | randperm (T *perm, int32_t n) |
static void | permute (T *vec, int32_t n) |
static void | permute (T *vec, int32_t n, CRandom *rand) |
static void | permute_vector (SGVector< T > vec) |
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 float64_t | dot (const bool *v1, const bool *v2, int32_t n) |
compute dot product between v1 and v2 (blas optimized) 更多... | |
static floatmax_t | dot (const floatmax_t *v1, const floatmax_t *v2, int32_t n) |
compute dot product between v1 and v2 (blas optimized) 更多... | |
static float64_t | dot (const float64_t *v1, const float64_t *v2, int32_t n) |
compute dot product between v1 and v2 (blas optimized) 更多... | |
static float32_t | dot (const float32_t *v1, const float32_t *v2, int32_t n) |
compute dot product between v1 and v2 (blas optimized) 更多... | |
static float64_t | dot (const uint64_t *v1, const uint64_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 64bit unsigned ints) 更多... | |
static float64_t | dot (const int64_t *v1, const int64_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 64bit ints) 更多... | |
static float64_t | dot (const int32_t *v1, const int32_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 32bit ints) 更多... | |
static float64_t | dot (const uint32_t *v1, const uint32_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 32bit unsigned ints) 更多... | |
static float64_t | dot (const uint16_t *v1, const uint16_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 16bit unsigned ints) 更多... | |
static float64_t | dot (const int16_t *v1, const int16_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 16bit unsigned ints) 更多... | |
static float64_t | dot (const char *v1, const char *v2, int32_t n) |
compute dot product between v1 and v2 (for 8bit (un)signed ints) 更多... | |
static float64_t | dot (const uint8_t *v1, const uint8_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 8bit (un)signed ints) 更多... | |
static float64_t | dot (const int8_t *v1, const int8_t *v2, int32_t n) |
compute dot product between v1 and v2 (for 8bit (un)signed ints) 更多... | |
static float64_t | dot (const float64_t *v1, const char *v2, int32_t n) |
compute dot product between v1 and v2 更多... | |
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 | min (T *vec, int32_t len) |
static T | max_abs (T *vec, int32_t len) |
static T | max (T *vec, int32_t len) |
static int32_t | arg_max (T *vec, int32_t inc, int32_t len, T *maxv_ptr=NULL) |
return arg_max(vec) 更多... | |
static int32_t | arg_max_abs (T *vec, int32_t inc, int32_t len, T *maxv_ptr=NULL) |
return arg_max_abs(vec) 更多... | |
static int32_t | arg_min (T *vec, int32_t inc, int32_t len, T *minv_ptr=NULL) |
return arg_min(vec) 更多... | |
static T | sum_abs (T *vec, int32_t len) |
return sum(abs(vec)) 更多... | |
static bool | fequal (T x, T y, float64_t precision=1e-6) |
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 () |
SGVector | ( | ) |
default constructor
在文件 SGVector.cpp 第 73 行定义.
constructor for setting params
在文件 SGVector.cpp 第 79 行定义.
constructor to create new vector in memory
在文件 SGVector.cpp 第 85 行定义.
copy constructor
在文件 SGVector.cpp 第 92 行定义.
|
virtual |
empty destructor
在文件 SGVector.cpp 第 104 行定义.
void abs | ( | ) |
absolute value of vector elements
void acos | ( | ) |
arc cosine of vector elements
void add | ( | const SGVector< T > | x | ) |
void add | ( | const SGSparseVector< T > & | x | ) |
add sparse vector to current vector
x | add sparse vector x to current vector |
在文件 SGVector.cpp 第 348 行定义.
void add | ( | const T | x | ) |
|
static |
target=alpha*vec1 + beta*vec2
在文件 SGVector.h 第 487 行定义.
|
static |
add scalar to vector inplace
在文件 SGVector.h 第 496 行定义.
|
static |
return arg_max(vec)
在文件 SGVector.cpp 第 1048 行定义.
int32_t arg_max | ( | complex128_t * | vec, |
int32_t | inc, | ||
int32_t | len, | ||
complex128_t * | maxv_ptr | ||
) |
在文件 SGVector.cpp 第 1068 行定义.
|
static |
return arg_max_abs(vec)
在文件 SGVector.cpp 第 1019 行定义.
在文件 SGVector.cpp 第 994 行定义.
在文件 SGVector.cpp 第 1006 行定义.
int32_t arg_max_abs | ( | complex128_t * | vec, |
int32_t | inc, | ||
int32_t | len, | ||
complex128_t * | maxv_ptr | ||
) |
在文件 SGVector.cpp 第 1039 行定义.
|
static |
return arg_min(vec)
在文件 SGVector.cpp 第 1079 行定义.
int32_t arg_min | ( | complex128_t * | vec, |
int32_t | inc, | ||
int32_t | len, | ||
complex128_t * | minv_ptr | ||
) |
在文件 SGVector.cpp 第 1099 行定义.
get sorted index.
idx = v.argsort() is similar to Matlab [~, idx] = sort(v)
在文件 SGVector.cpp 第 194 行定义.
在文件 SGVector.cpp 第 207 行定义.
void asin | ( | ) |
arc sine of vector elements
void atan | ( | ) |
arc tangent of vector elements
void atan2 | ( | T | x | ) |
atan2 of vector elements
在文件 SGVector.cpp 第 1314 行定义.
SGVector< T > clone | ( | ) | const |
clone vector
在文件 SGVector.cpp 第 257 行定义.
|
static |
clone vector
在文件 SGVector.cpp 第 263 行定义.
|
static |
create SGMatrix from linear vector
vector | source vector |
nrows | number of rows |
ncols | number of cols |
fortran_order | order of stroing matrix in linear vector true - column-major order (FORTRAN, MATLAB, R) false - row-major order (C, Python) |
在文件 SGVector.cpp 第 1376 行定义.
|
static |
create matrix from linear vector
matrix | destination memory |
nrows | number of rows |
ncols | number of cols |
vector | source vector |
vlen | lenght of source vector |
fortran_order | order of stroing matrix in linear vector true - column-major order (FORTRAN, MATLAB, R) false - row-major order (C, Python) |
在文件 SGVector.cpp 第 1390 行定义.
|
protectedvirtual |
|
protectedinherited |
copy refcount
在文件 SGReferencedData.cpp 第 58 行定义.
void cos | ( | ) |
cosine of vector elements
void cosh | ( | ) |
hyperbolic cosine of vector elements
void display_size | ( | ) | const |
display array size
在文件 SGVector.cpp 第 362 行定义.
void display_vector | ( | const bool * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 419 行定义.
void display_vector | ( | const char * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 430 行定义.
void display_vector | ( | const uint8_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 441 行定义.
void display_vector | ( | const int8_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 452 行定义.
void display_vector | ( | const uint16_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 463 行定义.
void display_vector | ( | const int16_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 474 行定义.
void display_vector | ( | const int32_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 485 行定义.
void display_vector | ( | const uint32_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 496 行定义.
void display_vector | ( | const int64_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 508 行定义.
void display_vector | ( | const uint64_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 519 行定义.
void display_vector | ( | const float32_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 530 行定义.
void display_vector | ( | const float64_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 541 行定义.
void display_vector | ( | const floatmax_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 552 行定义.
void display_vector | ( | const complex128_t * | vector, |
int32_t | n, | ||
const char * | name, | ||
const char * | prefix | ||
) |
在文件 SGVector.cpp 第 566 行定义.
void display_vector | ( | const char * | name = "vector" , |
const char * | prefix = "" |
||
) | const |
display vector
在文件 SGVector.cpp 第 405 行定义.
|
static |
display vector (useful for debugging)
|
static |
display vector (useful for debugging)
在文件 SGVector.cpp 第 412 行定义.
|
static |
compute dot product between v1 and v2 (blas optimized)
在文件 SGVector.h 第 344 行定义.
|
static |
compute dot product between v1 and v2 (blas optimized)
在文件 SGVector.h 第 353 行定义.
compute dot product between v1 and v2 (blas optimized)
在文件 SGVector.cpp 第 614 行定义.
compute dot product between v1 and v2 (blas optimized)
在文件 SGVector.cpp 第 632 行定义.
|
static |
compute dot product between v1 and v2 (for 64bit unsigned ints)
在文件 SGVector.h 第 369 行定义.
|
static |
compute dot product between v1 and v2 (for 64bit ints)
在文件 SGVector.h 第 379 行定义.
|
static |
compute dot product between v1 and v2 (for 32bit ints)
在文件 SGVector.h 第 390 行定义.
|
static |
compute dot product between v1 and v2 (for 32bit unsigned ints)
在文件 SGVector.h 第 401 行定义.
|
static |
compute dot product between v1 and v2 (for 16bit unsigned ints)
在文件 SGVector.h 第 412 行定义.
|
static |
compute dot product between v1 and v2 (for 16bit unsigned ints)
在文件 SGVector.h 第 423 行定义.
|
static |
compute dot product between v1 and v2 (for 8bit (un)signed ints)
在文件 SGVector.h 第 434 行定义.
|
static |
compute dot product between v1 and v2 (for 8bit (un)signed ints)
在文件 SGVector.h 第 445 行定义.
|
static |
compute dot product between v1 and v2 (for 8bit (un)signed ints)
在文件 SGVector.h 第 456 行定义.
compute dot product between v1 and v2
在文件 SGVector.h 第 467 行定义.
bool equals | ( | SGVector< T > & | other | ) |
equals method up to precision for vectors (element-wise)
other | vector to compare with |
在文件 SGVector.cpp 第 390 行定义.
void exp | ( | ) |
exponential of vector elements
|
static |
return sum(abs(vec))
在文件 SGVector.cpp 第 1138 行定义.
|
static |
fill vector
在文件 SGVector.cpp 第 271 行定义.
find index for elements where the predicate returns true
p | the predicate, it should accept the value of the element and return a bool |
在文件 SGVector.h 第 592 行定义.
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
element | element to find index for |
在文件 SGVector.cpp 第 237 行定义.
index_t find_position_to_insert | ( | complex128_t | element | ) |
在文件 SGVector.cpp 第 249 行定义.
|
protectedvirtual |
SGVector<T> get | ( | ) |
const T & get_element | ( | index_t | index | ) |
imag part of a complex128_t vector
在文件 SGVector.cpp 第 1367 行定义.
real part of a complex128_t vector
在文件 SGVector.cpp 第 1359 行定义.
|
protectedvirtual |
bool is_sorted | ( | ) | const |
bool is_sorted | ( | ) | const |
在文件 SGVector.cpp 第 230 行定义.
|
static |
Returns an array with n linearly spaced elements between start and end.
start | beginning of the interval to divide |
end | upper bound of the interval to divide |
n | number of elements used to divide the interval |
在文件 SGVector.cpp 第 1336 行定义.
float64_t * linspace | ( | complex128_t | start, |
complex128_t | end, | ||
int32_t | n | ||
) |
在文件 SGVector.cpp 第 1345 行定义.
Returns a vector with n linearly spaced elements between start and end.
start | beginning of the interval to divide |
end | upper bound of the interval to divide |
n | number of elements used to divide the interval |
在文件 SGVector.cpp 第 1330 行定义.
void load | ( | CFile * | loader | ) |
void load | ( | CFile * | loader | ) |
在文件 SGVector.cpp 第 1237 行定义.
void log | ( | ) |
natural logarithm of vector elements
void log10 | ( | ) |
common logarithm of vector elements
|
static |
在文件 SGVector.cpp 第 981 行定义.
|
static |
在文件 SGVector.cpp 第 961 行定义.
在文件 SGVector.cpp 第 939 行定义.
在文件 SGVector.cpp 第 949 行定义.
complex128_t max_abs | ( | complex128_t * | vec, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 973 行定义.
float64_t mean | ( | ) | const |
float64_t mean | ( | ) | const |
在文件 SGVector.cpp 第 1216 行定义.
|
static |
在文件 SGVector.cpp 第 926 行定义.
|
static |
|| x ||_1
在文件 SGVector.cpp 第 882 行定义.
operator T * | ( | ) |
cast to pointer
在文件 SGVector.h 第 57 行定义.
addition operator
在文件 SGVector.cpp 第 318 行定义.
inplace addition operator
在文件 SGVector.h 第 298 行定义.
SGVector<T> operator+= | ( | SGSparseVector< T > & | x | ) |
inplace addition operator for sparse vector
在文件 SGVector.h 第 305 行定义.
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 | ) |
|
static |
permute
在文件 SGVector.cpp 第 710 行定义.
|
static |
permute with given CRandom state
在文件 SGVector.cpp 第 717 行定义.
void permute | ( | ) |
create a random permutation in place
在文件 SGVector.cpp 第 724 行定义.
void permute | ( | CRandom * | rand | ) |
create a random permutation with given CRandom state
在文件 SGVector.cpp 第 730 行定义.
|
static |
permute vector
在文件 SGVector.cpp 第 736 行定义.
void pow | ( | T | q | ) |
power of vector elements
在文件 SGVector.cpp 第 1323 行定义.
void pow | ( | complex128_t | q | ) |
在文件 SGVector.cpp 第 1353 行定义.
|
static |
return the product of the vectors elements
在文件 SGVector.h 第 522 行定义.
T product | ( | ) |
return product(vec)
在文件 SGVector.h 第 532 行定义.
|
static |
|| x ||_q
在文件 SGVector.cpp 第 911 行定义.
complex128_t qnorm | ( | complex128_t * | x, |
int32_t | len, | ||
float64_t | q | ||
) |
在文件 SGVector.cpp 第 918 行定义.
void qsort | ( | ) |
quicksort the vector it is sorted from in ascending (for type T)
在文件 SGVector.cpp 第 169 行定义.
|
static |
|| x ||_q^q
在文件 SGVector.cpp 第 893 行定义.
complex128_t qsq | ( | complex128_t * | x, |
int32_t | len, | ||
float64_t | q | ||
) |
在文件 SGVector.cpp 第 903 行定义.
void random | ( | T | min_value, |
T | max_value | ||
) |
|
static |
random vector
在文件 SGVector.cpp 第 650 行定义.
void random_vector | ( | complex128_t * | vec, |
int32_t | len, | ||
complex128_t | min_value, | ||
complex128_t | max_value | ||
) |
在文件 SGVector.cpp 第 657 行定义.
void randperm | ( | ) |
Returns a random permutation of number from 0 to len-1
在文件 SGVector.cpp 第 161 行定义.
|
static |
Returns a random permutation of number from 0 to n-1. Caller has to free memory.
n | range of permutation |
在文件 SGVector.cpp 第 678 行定义.
|
static |
random permatutaion
在文件 SGVector.cpp 第 695 行定义.
complex128_t * randperm | ( | int32_t | n | ) |
在文件 SGVector.cpp 第 687 行定义.
void randperm | ( | complex128_t * | perm, |
int32_t | n | ||
) |
在文件 SGVector.cpp 第 703 行定义.
|
static |
Returns a random permutation of number from 0 to n-1
在文件 SGVector.cpp 第 664 行定义.
SGVector< complex128_t > randperm_vec | ( | int32_t | n | ) |
在文件 SGVector.cpp 第 670 行定义.
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 第 145 行定义.
|
static |
range fill vector
在文件 SGVector.cpp 第 278 行定义.
void range_fill_vector | ( | complex128_t * | vec, |
int32_t | len, | ||
complex128_t | start | ||
) |
在文件 SGVector.cpp 第 285 行定义.
|
protectedinherited |
|
inherited |
void resize_vector | ( | int32_t | n | ) |
void save | ( | CFile * | saver | ) |
void save | ( | CFile * | saver | ) |
在文件 SGVector.cpp 第 1252 行定义.
void scale | ( | T | alpha | ) |
scale vector inplace
在文件 SGVector.cpp 第 1200 行定义.
|
static |
scale vector inplace
在文件 SGVector.cpp 第 1179 行定义.
在文件 SGVector.cpp 第 1187 行定义.
在文件 SGVector.cpp 第 1193 行定义.
void set | ( | SGVector< T > | orig | ) |
wrapper for the copy constructor useful for SWIG interfaces
orig | vector to set |
在文件 SGVector.cpp 第 98 行定义.
void set_const | ( | T | const_elem | ) |
void set_element | ( | const T & | p_element, |
index_t | index | ||
) |
set vector element at index 'index' return false in case of trouble
p_element | vector element to set |
index | index |
在文件 SGVector.cpp 第 300 行定义.
void sin | ( | ) |
sine of vector elements
void sinh | ( | ) |
hyperbolic sine of vector elements
int32_t size | ( | ) | const |
size
在文件 SGVector.h 第 54 行定义.
void sqrt | ( | ) |
square root of vector elements
|
static |
return sum(vec)
在文件 SGVector.h 第 506 行定义.
|
static |
return sum(vec)
在文件 SGVector.h 第 516 行定义.
|
static |
return sum(abs(vec))
在文件 SGVector.cpp 第 1109 行定义.
在文件 SGVector.cpp 第 1120 行定义.
在文件 SGVector.cpp 第 1128 行定义.
void tan | ( | ) |
tangent of vector elements
void tanh | ( | ) |
hyperbolic tangent of vector elements
|
static |
|| x ||_2
bool twonorm | ( | const bool * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 746 行定义.
char twonorm | ( | const char * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 753 行定义.
int8_t twonorm | ( | const int8_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 760 行定义.
uint8_t twonorm | ( | const uint8_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 770 行定义.
int16_t twonorm | ( | const int16_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 780 行定义.
uint16_t twonorm | ( | const uint16_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 790 行定义.
int32_t twonorm | ( | const int32_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 800 行定义.
uint32_t twonorm | ( | const uint32_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 810 行定义.
int64_t twonorm | ( | const int64_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 820 行定义.
uint64_t twonorm | ( | const uint64_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 830 行定义.
在文件 SGVector.cpp 第 840 行定义.
在文件 SGVector.cpp 第 850 行定义.
floatmax_t twonorm | ( | const floatmax_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 862 行定义.
complex128_t twonorm | ( | const complex128_t * | x, |
int32_t | len | ||
) |
在文件 SGVector.cpp 第 872 行定义.
|
static |
performs a inplace unique of a vector of type T using quicksort returns the new number of elements
在文件 SGVector.cpp 第 1144 行定义.
int32_t unique | ( | complex128_t * | output, |
int32_t | size | ||
) |
在文件 SGVector.cpp 第 1158 行定义.
|
protectedinherited |
decrement reference counter and deallocate object if refcount is zero before or after decrementing it
在文件 SGReferencedData.cpp 第 87 行定义.
|
static |
x=x+alpha*y
在文件 SGVector.cpp 第 580 行定义.
void vec1_plus_scalar_times_vec2 | ( | float64_t * | vec1, |
float64_t | scalar, | ||
const float64_t * | vec2, | ||
int32_t | n | ||
) |
在文件 SGVector.cpp 第 588 行定义.
void vec1_plus_scalar_times_vec2 | ( | float32_t * | vec1, |
float32_t | scalar, | ||
const float32_t * | vec2, | ||
int32_t | n | ||
) |
在文件 SGVector.cpp 第 601 行定义.
|
static |
compute vector multiplication
在文件 SGVector.h 第 478 行定义.
void zero | ( | ) |
fill vector with zeros
在文件 SGVector.cpp 第 110 行定义.
void zero | ( | ) |
在文件 SGVector.cpp 第 117 行定义.
T* vector |
vector
在文件 SGVector.h 第 704 行定义.
index_t vlen |
length of vector
在文件 SGVector.h 第 706 行定义.