元編程參考文件

向量

27 個節點

本頁內容 27

向量

函數

過載 1/4

簽名
向量() -> Vector
DivookaTensor1D DivookaTensor1D()

Construct empty.

返回

向量Vector

過載 2/4

簽名
向量(值: IEnumerable<數字>) -> Vector
DivookaTensor1D DivookaTensor1D(IEnumerable<double> values)

Construct from (copy of) values.

參數

名稱型別預設值說明
值IEnumerable<數字>—

返回

向量Vector

過載 3/4

簽名
向量(值: 數字陣列) -> Vector
DivookaTensor1D DivookaTensor1D(params double[] values)

Construct from param arguments (no copy).

參數

名稱型別預設值說明
值數字陣列—

返回

向量Vector

過載 4/4

簽名
向量(值: 數字陣列) -> Vector
DivookaTensor1D op_Implicit(double[] values)

此節點沒有文件說明。

參數

名稱型別預設值說明
值數字陣列—

返回

向量Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

包含

函數

Whether any element is exactly equal to Item; see DivookaTensor1D.IndexOf for what exact means.

簽名
包含(Vector: Vector, 項: 數字) -> 真否
bool Contains(DivookaTensor1D Vector, double item)

參數

名稱型別預設值說明
VectorVector—
項數字—The value to look for.

返回

結果真否
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

複製

函數

Make a copy

簽名
複製(Vector: Vector) -> Vector
DivookaTensor1D Copy(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

複製到陣列

函數

Copies every element into Array, starting at Array Index.

簽名
複製到陣列(Vector: Vector, 陣列: 數字陣列, 陣列索引: 整數)
void CopyTo(
    DivookaTensor1D Vector,
    double[] array,
    int arrayIndex)

參數

名稱型別預設值說明
VectorVector—
陣列數字陣列—The array to fill; null throws System.ArgumentNullException, and one without room for every element from Array Index on throws System.ArgumentException.
陣列索引整數—The position in Array to start writing at; a negative number throws System.ArgumentOutOfRangeException.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

項數

函數

The number of elements; the same as DivookaTensor1D.Length.

簽名
項數(Vector: Vector) -> 整數
int Count(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

索引

函數

The positions of the elements as numbers, 0, 1, 2 and so on, one per element; handy as the x values when plotting the vector.

簽名
索引(Vector: Vector) -> 數字陣列
double[] Index(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果數字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

項

函數

The element at Index, counting from zero.

簽名
項(Vector: Vector, 索引: 整數) -> 數字
double Item(DivookaTensor1D Vector, int index)

參數

名稱型別預設值說明
VectorVector—
索引整數—The zero-based position; below zero or at or past the length throws System.IndexOutOfRangeException.

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

長度

函數

Get length of vector

簽名
長度(Vector: Vector) -> 整數
int Length(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

大小

函數

Get string representation of size.

簽名
大小(Vector: Vector) -> 文字
string Size(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

取得列舉器

函數

Goes through the elements in order.

簽名
取得列舉器(Vector: Vector) -> IEnumerator<數字>
IEnumerator<double> GetEnumerator(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果IEnumerator<數字>
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

取得預覽陣列

函數

The elements as an array, for the preview display; this is the vector's own storage, not a copy.

簽名
取得預覽陣列(Vector: Vector) -> 陣列
Array GetPreviewArray(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

取得預覽文字

函數

The elements as text for the preview display, one per line, written in the current culture's number format.

簽名
取得預覽文字(Vector: Vector) -> 文字
string GetPreviewString(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

項的索引

函數

The position of the first element equal to Item, counting from zero.

簽名
項的索引(Vector: Vector, 項: 數字) -> 整數
int IndexOf(DivookaTensor1D Vector, double item)

參數

名稱型別預設值說明
VectorVector—
項數字—The value to look for.

返回

結果整數

備註

The match is exact, so a value that was computed slightly differently (0.1 + 0.2 against 0.3, for example) is not found.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

範數

函數

Another name for length

簽名
範數(Vector: Vector) -> 整數
int Norm(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

平移

函數

Moves every element along by Offset positions, giving a new vector of the same length; the original is unchanged.

簽名
平移(Vector: Vector, 偏移: 整數, 補零: 真否) -> Vector
DivookaTensor1D Shift(
    DivookaTensor1D Vector,
    int offset,
    bool fillZero = true)

參數

名稱型別預設值說明
VectorVector—
偏移整數—How many positions to move; positive toward the start, negative toward the end.
補零真否TrueTrue (the default) fills the freed places with 0; false fills them with the elements that fell off the other end, rotating the vector.

返回

結果Vector

備註

A positive offset moves elements toward the start: the element at position i + offset lands at position i, the first Offset elements fall off, and the freed places at the end are filled. A negative offset moves elements toward the end in the same way. An offset of zero gives a copy, and an offset as large as the length or larger gives all zeros whatever Fill Zero says.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

轉為陣列

函數

Defensive copy

簽名
轉為陣列(Vector: Vector) -> 數字陣列
double[] ToArray(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果數字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

轉為文字

函數

ToString override

簽名
轉為文字(Vector: Vector) -> 文字
string ToString(DivookaTensor1D Vector)

參數

名稱型別預設值說明
VectorVector—

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

累積應用

函數

過載 1/2

簽名
累積應用 -> (結果: 數字, 路徑: 數字陣列)
    基礎值: 數字
    向量: 數字陣列
    函數: Accumulate Apply Function
double AccumulateApply(
    double baseValue,
    double[] vector,
    out double[] path,
    DivookaTensor1D.AccumulateApplyFunction function)

Applies certain operation starting from base value on top of entire vector and return the resulting vector and final value

參數

名稱型別預設值說明
基礎值數字—
向量數字陣列—
函數Accumulate Apply Function—

返回

結果數字
路徑數字陣列

過載 2/2

簽名
累積應用 -> (結果: 數字, 路徑: 數字陣列)
    基礎值: 數字
    向量: 數字陣列
    函數: Func<數字, 數字, 數字>
double AccumulateApply(
    double baseValue,
    double[] vector,
    out double[] path,
    Func<double, double, double> function)

Starts from Base Value and combines it with each element of Vector in turn using Function, giving the final value and every value along the way; a running total is (previous, element) => previous + element.

參數

名稱型別預設值說明
基礎值數字—The value to start from; it is also the answer when Vector is empty.
向量數字陣列—The elements to fold in, in order; must not be null.
函數Func<數字, 數字, 數字>—Given previous computed result and current element value, compute the next value

返回

結果數字
路徑數字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

加法運算

函數

過載 1/2

簽名
加法運算(A: Vector, B: Vector) -> Vector
DivookaTensor1D op_Addition(
    DivookaTensor1D a,
    DivookaTensor1D b)

Adds two vectors

參數

名稱型別預設值說明
AVector—
BVector—

返回

結果Vector

過載 2/2

簽名
加法運算(A: Vector, V: 數字) -> Vector
DivookaTensor1D op_Addition(DivookaTensor1D a, double v)

Adds a scalar to every element

參數

名稱型別預設值說明
AVector—
V數字—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

按位或運算

函數

過載 1/2

簽名
按位或運算(A: Vector, V: 數字) -> Vector
DivookaTensor1D op_BitwiseOr(DivookaTensor1D a, double v)

Append an element

參數

名稱型別預設值說明
AVector—
V數字—

返回

結果Vector

過載 2/2

簽名
按位或運算(A: Vector, B: Vector) -> Vector
DivookaTensor1D op_BitwiseOr(
    DivookaTensor1D a,
    DivookaTensor1D b)

Append an entire vector

參數

名稱型別預設值說明
AVector—
BVector—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

除法運算

函數

過載 1/2

簽名
除法運算(A: Vector, B: Vector) -> Vector
DivookaTensor1D op_Division(
    DivookaTensor1D a,
    DivookaTensor1D b)

Divide element-wise

參數

名稱型別預設值說明
AVector—
BVector—

返回

結果Vector

過載 2/2

簽名
除法運算(A: Vector, V: 數字) -> Vector
DivookaTensor1D op_Division(DivookaTensor1D a, double v)

Multiply every element by a scalar

參數

名稱型別預設值說明
AVector—
V數字—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

異或運算

函數

Exponent element-wise

簽名
異或運算(A: Vector, V: 數字) -> Vector
DivookaTensor1D op_ExclusiveOr(DivookaTensor1D a, double v)

參數

名稱型別預設值說明
AVector—
V數字—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

向量

函數

此節點沒有文件說明。

過載 1/2

簽名
向量(值: 數字陣列) -> Vector
DivookaTensor1D op_Implicit(double[] values)

參數

名稱型別預設值說明
值數字陣列—

返回

向量Vector

過載 2/2

簽名
向量(向量: Vector) -> 數字陣列
double[] op_Implicit(DivookaTensor1D vector)

參數

名稱型別預設值說明
向量Vector—

返回

向量數字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

乘法運算

函數

過載 1/2

簽名
乘法運算(A: Vector, B: Vector) -> Vector
DivookaTensor1D op_Multiply(
    DivookaTensor1D a,
    DivookaTensor1D b)

Multiply element-wise

參數

名稱型別預設值說明
AVector—
BVector—

返回

結果Vector

過載 2/2

簽名
乘法運算(A: Vector, V: 數字) -> Vector
DivookaTensor1D op_Multiply(DivookaTensor1D a, double v)

Multiply every element by a scalar

參數

名稱型別預設值說明
AVector—
V數字—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

減法運算

函數

過載 1/2

簽名
減法運算(A: Vector, B: Vector) -> Vector
DivookaTensor1D op_Subtraction(
    DivookaTensor1D a,
    DivookaTensor1D b)

Subtract two vectors

參數

名稱型別預設值說明
AVector—
BVector—

返回

結果Vector

過載 2/2

簽名
減法運算(A: Vector, V: 數字) -> Vector
DivookaTensor1D op_Subtraction(DivookaTensor1D a, double v)

Subtract a scalar to every element

參數

名稱型別預設值說明
AVector—
V數字—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

取負運算

函數

Gets negative

簽名
取負運算(A: Vector) -> Vector
DivookaTensor1D op_UnaryNegation(DivookaTensor1D a)

參數

名稱型別預設值說明
AVector—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算

取正運算

函數

Identity (no copy is made)

簽名
取正運算(A: Vector) -> Vector
DivookaTensor1D op_UnaryPlus(DivookaTensor1D a)

參數

名稱型別預設值說明
AVector—

返回

結果Vector
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
向量
所屬包
數值計算