本文整理汇总了C#中ILArray.ToArray方法的典型用法代码示例。如果您正苦于以下问题:C# ILArray.ToArray方法的具体用法?C# ILArray.ToArray怎么用?C# ILArray.ToArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILArray
的用法示例。
在下文中一共展示了ILArray.ToArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTwoDimensionalArray
private double[,] GetTwoDimensionalArray(ILArray<double> array, int dimensionX, int dimensionY)
{
double[,] result = new double[dimensionX, dimensionY];
double[] source = array.ToArray();
for (int i = 0; i < dimensionX; i++)
{
for (int j = 0; j < dimensionY; j++)
{
result[i, j] = source[i * dimensionX + j];
}
}
return result;
}
示例2: UpdateMeanMDF
/// <summary>
/// Update MDF mean with amnesic average
/// </summary>
/// <param name="vector">Vector, which should be add to mean</param>
protected void UpdateMeanMDF(ILArray<double> vector)
{
double t = (double)this.items.Count;
//double multiplier1 = (t - 1) / t;
//double multiplier2 = 1 / t;
double multiplier1 = (t - 1 - this.GetAmnesicParameter(t)) / t;
double multiplier2 = (1 + this.GetAmnesicParameter(t)) / t;
Vector incrementPart = new Vector(vector.ToArray());
this.meanMDF = (this.meanMDF * multiplier1) + (vector * multiplier2);
}