A numeric vector
Vector
00 Remarks
this numeric vector is based on the Vector
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| Call | 1 | Try to call target method in vector mode. |
| Sqrt | 1 | abs(x) computes the absolute value of x, sqrt(x) computes the (principal) square root of x, √{x}. |
| Exp | 2 | log computes logarithms, by default natural logarithms, log10 computes common (i.e., base 10) logarithms, and log2 computes binary (i.e., base 2) logarithms. |
| Quantile | 1 | |
| Log | 2 | |
| Trunc | 1 | Rounding of Numbers |
| BesselI | 2 | Bessel Functions of integer and fractional order, of first and second kind, J(nu) and Y(nu), and Modified Bessel functions (of first and third kind), I(nu) and K(nu). |
| Order | 2 | order()的返回值是对应排名的元素所在向量中的位置。 R x <- c(97, 93, 85, 74, 32, 100, 99, 67); sort(x) # [1] 32 67 74 85 93 97 99 100 order(x) # [1] 5 8 4 3 2 1 7 6 rank(x) # [1] 6 5 4 3… |
| .ctor | 9 | 创建一个空的向量,包含有零个元素 |
| AsDiagonal | 1 | Convert the vector as the diagonal matrix |
| CopyTo | 3 | Copies the vector instance to a specified destination array starting at a specified index position. |
| CopyFrom | 1 | Make data copy from the given source to current vector object |
| op_Addition | 3 | 两个向量加法算符重载,分量分别相加 |
| op_Subtraction | 3 | 向量减法算符重载,分量分别相减 |
| op_Multiply | 4 | 向量乘法算符重载,分量分别相乘,相当于MATLAB中的.*算符 |
| op_Division | 2 | 向量除法算符重载,分量分别相除,相当于MATLAB中的./算符 |
| op_BitwiseOr | 1 | 向量内积 |
| op_ExclusiveOr | 1 | 向量外积(相当于列向量,乘以横向量) |
| op_UnaryNegation | 1 | 负向量 |
| op_Equality | 2 | x向量之中的每一个元素是否都等于n? |
| op_Exponent | 1 | Power: Math.Pow()) |
| op_GreaterThanOrEqual | 1 | 返回一个逻辑向量,用来指示向量对象的每一个分量与目标比较的逻辑值结果 |
| op_LessThanOrEqual | 1 | x <= n |
| op_Implicit | 1 | [1,2,3,4,5,6,...] |
| slice | 1 | 进行序列切片操作 |
| DotProduct | 1 | dot + http://mathworld.wolfram.com/DotProduct.html + http://www.mathsisfun.com/algebra/vectors-dot-product.html |
| dot | 2 | helper function for vector dot product |
| Product | 1 | 返回这个向量之中的所有的元素的乘积 |
| ScaleToRange | 1 | scale elements in current vector to another value range. |
| ToString | 2 | Display member's data as json array |
| SumMagnitudes | 1 | http://math.stackexchange.com/questions/440320/what-is-magnitude-of-sum-of-two-vector |
| Ones | 1 | Returns a numeric vector with all elements is value 1 |
| rand | 2 | |
| norm | 1 | create a vector that contains the random number from the gaussian distribution |
| Call | 3 | |
| Log10 | 2 | |
| Max | 2 | |
| Min | 2 | |
| Abs | 2 | |
| floor | 1 | |
| round | 1 | |
| Sinh | 1 | |
| Sign | 1 | |
| pchisq | 1 | |
| seq | 1 | |
| AsSparse | 1 | |
| op_Inequality | 1 | |
| op_GreaterThan | 1 | |
| op_LessThan | 1 | |
| op_Explicit | 1 | |
| CumSum | 1 | |
| Scalar | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| NaN | 1 | Double.NaN |
| Inf | 1 | Double.PositiveInfinity |
| Zero | 1 | Only one number in the vector and its value is ZERO |
| IsNumeric | 1 | check of current vector is scalar? |
| IsNaN | 1 | get NaN elements |
| Item | 1 | |
| Mod | 1 | norm2() 向量模的平方,||x||是向量x=(x1,x2,…,xp)的欧几里得范数 |
| SumMagnitude | 1 | norm() http://math.stackexchange.com/questions/440320/what-is-magnitude-of-sum-of-two-vector |
| Unit | 1 | normalize |
| Range | 1 | [min, max] |
04 Members
Delegate, Argument())Try to call target method in vector mode.
| Name | Description |
|---|---|
TOut |
| Name | Type | Description |
|---|---|---|
method | Delegate | 只可以是静态的共享方法 |
args | Argument() | - |
abs(x) computes the absolute value of x, sqrt(x) computes the (principal) square root of x, √{x}.
| Name | Type | Description |
|---|---|---|
x | Vector | a numeric or complex vector or array. |
log computes logarithms, by default natural logarithms, log10 computes common (i.e., base 10) logarithms, and log2 computes binary (i.e., base 2) logarithms. The general form log(x, base) computes logarithms with base base. log1p(x) computes log(1+x) accurately also for |x| << 1. exp computes the exponential function. expm1(x) computes exp(x) - 1 accurately also for |x| << 1.
| Name | Type | Description |
|---|---|---|
x | Vector | a numeric or complex vector. |
log computes logarithms, by default natural logarithms, log10 computes common (i.e., base 10) logarithms, and log2 computes binary (i.e., base 2) logarithms. The general form log(x, base) computes logarithms with base base. log1p(x) computes log(1+x) accurately also for |x| << 1. exp computes the exponential function. expm1(x) computes exp(x) - 1 accurately also for |x| << 1.
Double())| Name | Type | Description |
|---|---|---|
percentage | Double() |
|
Double)| Name | Type | Description |
|---|---|---|
x | Vector | a numeric or complex vector. |
base | Double | a positive or complex number: the base with respect to which logarithms are computed. Defaults to e=exp(1). |
Rounding of Numbers
| Name | Type | Description |
|---|---|---|
x | Vector | - |
Bessel Functions of integer and fractional order, of first and second kind, J(nu) and Y(nu), and Modified Bessel functions (of first and third kind), I(nu) and K(nu).
Numeric vector with the (scaled, if expon.scaled = TRUE) values of the corresponding Bessel function. The length of the result is the maximum of the lengths of the parameters. All parameters are recycled to that length.
Bessel Functions of integer and fractional order, of first and second kind, J(nu) and Y(nu), and Modified Bessel functions (of first and third kind), I(nu) and K(nu).
| Name | Type | Description |
|---|---|---|
x | Vector | a numeric vector, the argument of the Bessel function. |
nu | Double | a numeric vector, the order of the Bessel function. |
ExponScaled | Boolean | if TRUE, the results are exponentially scaled in order to avoid overflow. |
Numeric vector with the (scaled) values of the modified Bessel function I(nu).
order returns a permutation which rearranges its first argument into ascending or descending order, breaking ties by further arguments. sort.list is the same, using only one argument.
order()的返回值是对应排名的元素所在向量中的位置。
x <- c(97, 93, 85, 74, 32, 100, 99, 67);
sort(x)
# [1] 32 67 74 85 93 97 99 100
order(x)
# [1] 5 8 4 3 2 1 7 6
rank(x)
# [1] 6 5 4 3 1 8 7 2Int32)Creates vector with m element and init value set to zero It creates a double-precision vector of the specified length with each element equal to 0.
equality to R expression
numeric(m)| Name | Type | Description |
|---|---|---|
m | Int32 | - |
创建一个空的向量,包含有零个元素
IEnumerable(Of Double))Creates vector with a specific value sequence.
| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of Double) | a sequence of numeric value that will fill the vector's data |
IEnumerable(Of Single))Creates vector with a specific value sequence
| Name | Type | Description |
|---|---|---|
shorts | IEnumerable(Of Single) | - |
IEnumerable(Of Double), Func(Of Double, Double))Init with transform
| Name | Type | Description |
|---|---|---|
x | IEnumerable(Of Double) | - |
apply | Func(Of Double, Double) | - |
IEnumerable(Of Int32))Creates vector with a specific value sequence
| Name | Type | Description |
|---|---|---|
integers | IEnumerable(Of Int32) | - |
Double, Int32)Creates vector with m element and init value specific by init parameter.
| Name | Type | Description |
|---|---|---|
init | Double | - |
m | Int32 | - |
Single(), Int32)Creates a vector from a specified array starting at a specified index position.
| Name | Type | Description |
|---|---|---|
values | Single() | The values to add to the vector, as an array of objects of type T. The array must contain at least Count elements from the specified index and only the first Count elements are used. |
index | Int32 | The starting index position from which to create the vector. |
Double(), Int32, Int32)Creates a vector from a specified array starting at a specified index position.
| Name | Type | Description |
|---|---|---|
values | Double() | The values to add to the vector, as an array of objects of type T. The array must contain at least Count elements from the specified index and only the first Count elements are used. |
index | Int32 | The starting index position from which to create the vector. |
Convert the vector as the diagonal matrix
returns a NxN matrix object, N size is equals to the vector dimension size
Double(), Int32)Copies the vector instance to a specified destination array starting at a specified index position.
| Name | Type | Description |
|---|---|---|
destination | Double() | The array to receive a copy of the vector values. |
startIndex | Int32 | The starting index in destination at which to begin the copy operation. |
Int32(), Int32)Copies the vector instance to a specified destination array starting at a specified index position.
| Name | Type | Description |
|---|---|---|
destination | Int32() | The array to receive a copy of the vector values. |
startIndex | Int32 | The starting index in destination at which to begin the copy operation. |
Single(), Int32)Copies the vector instance to a specified destination array starting at a specified index position.
| Name | Type | Description |
|---|---|---|
destination | Single() | The array to receive a copy of the vector values. |
startIndex | Int32 | The starting index in destination at which to begin the copy operation. |
Double(), Int32, Int32)Make data copy from the given source to current vector object
| Name | Type | Description |
|---|---|---|
source | Double() | the source vector data for copy data to current vector |
startIndex | Int32 | the start index of the data in current vector |
count | Int32 | the number of the data elements copy from the source data |
两个向量加法算符重载,分量分别相加
this operator is a safe function: if any one vector is nothing, then returns the copy of another vector directly.
Double)向量减加实数,各分量分别加实数
| Name | Type | Description |
|---|---|---|
v1 | Vector | - |
a | Double | - |
Double, Vector)实数加向量
| Name | Type | Description |
|---|---|---|
a | Double | - |
v1 | Vector | - |
向量减法算符重载,分量分别相减
Double)向量减实数,各分量分别减实数
| Name | Type | Description |
|---|---|---|
v1 | Vector | - |
a | Double | - |
Double, Vector)实数减向量
| Name | Type | Description |
|---|---|---|
a | Double | - |
v1 | Vector | - |
Double())向量乘法算符重载,分量分别相乘,相当于MATLAB中的.*算符
| Name | Type | Description |
|---|---|---|
v1 | Vector | - |
v2 | Double() | - |
向量乘法算符重载,分量分别相乘,相当于MATLAB中的.*算符
Double)向量 数乘,各分量分别乘以实数
| Name | Type | Description |
|---|---|---|
v1 | Vector | - |
a | Double | - |
Double, Vector)向量 数乘
| Name | Type | Description |
|---|---|---|
a | Double | - |
v1 | Vector | - |
向量除法算符重载,分量分别相除,相当于MATLAB中的./算符
Double)向量 数除,各分量分别除以实数
| Name | Type | Description |
|---|---|---|
v1 | Vector | - |
a | Double | - |
向量内积
向量外积(相当于列向量,乘以横向量)
负向量
| Name | Type | Description |
|---|---|---|
v1 | Vector | - |
Int32)x向量之中的每一个元素是否都等于n?
| Name | Type | Description |
|---|---|---|
x | Vector | - |
n | Int32 | - |
Double)x向量之中的每一个元素是否都等于n?
| Name | Type | Description |
|---|---|---|
x | Vector | - |
n | Double | - |
Double)Power: Math.Pow()
| Name | Type | Description |
|---|---|---|
v | Vector | - |
n | Double | - |
Double)返回一个逻辑向量,用来指示向量对象的每一个分量与目标比较的逻辑值结果
| Name | Type | Description |
|---|---|---|
x | Vector | - |
n | Double | - |
Double)x <= n
| Name | Type | Description |
|---|---|---|
x | Vector | - |
n | Double | - |
String)[1,2,3,4,5,6,...]
| Name | Type | Description |
|---|---|---|
vector$ | String | - |
Int32, Int32, Int32)进行序列切片操作
| Name | Type | Description |
|---|---|---|
start% | Int32 | - |
stop% | Int32 | - |
steps% | Int32 | - |
dot
| Name | Type | Description |
|---|---|---|
v2 | Vector | - |
Double(), Double())helper function for vector dot product
| Name | Type | Description |
|---|---|---|
lhs | Double() | - |
rhs | Double() | - |
Single(), Single())helper function for vector dot product
| Name | Type | Description |
|---|---|---|
lhs | Single() | - |
rhs | Single() | - |
返回这个向量之中的所有的元素的乘积
DoubleRange)scale elements in current vector to another value range.
| Name | Type | Description |
|---|---|---|
range | DoubleRange | - |
a new data Vector which its element value is in range of a given range.
Display member's data as json array
Int32)Returns a numeric vector with all elements is value 1
| Name | Type | Description |
|---|---|---|
n | Int32 | - |
Int32)this method can be affected by the RandomExtensions.SetSeed() method.
| Name | Type | Description |
|---|---|---|
size% | Int32 | - |
Int32, Double, Double)create a vector that contains the random number from the gaussian distribution
gaussian number generated via the RandomExtensions.NextGaussian() method.
| Name | Type | Description |
|---|---|---|
size | Int32 | - |
mu | Double | - |
sigma | Double | - |
Double.NaN
Double.PositiveInfinity
Int32)Only one number in the vector and its value is ZERO
check of current vector is scalar?
GenericVector.Dim为1?即当前的向量对象是否是只包含有一个数字?
get NaN elements
String)syntax helper
| Name | Type | Description |
|---|---|---|
rangeExpression | String | - |
norm2()
向量模的平方,||x||是向量x=(x1,x2,…,xp)的欧几里得范数
SquaredNorm 平方绝对值的总和
normalize
[min, max]
Func(Of Double, Double), Vector+Argument)Func(Of Double, Double, Double), Vector+Argument, Vector+Argument)Func(Of Double, Double, Double, Double), Vector+Argument, Vector+Argument, Vector+Argument)Double)Double)Double)Int32)Int32, Int32, Double)Int32)Double)Double)String)Double)Double, Double, Int32)