本文整理汇总了C#中IMLData.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# IMLData.CopyTo方法的具体用法?C# IMLData.CopyTo怎么用?C# IMLData.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMLData
的用法示例。
在下文中一共展示了IMLData.CopyTo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MaxInArray
private double MaxInArray(IMLData result)
{
var array = new double[Network.OutputSize];
result.CopyTo(array, 0, Network.OutputSize - 1);
var maxValue = array.Max();
var maxIndex = array.ToList().IndexOf(maxValue);
return maxIndex + 1;
}
示例2: Compute
/// <summary>
/// Note: for Boltzmann networks, you will usually want to call the "run"
/// method to compute the output.
/// This method can be used to copy the input data to the current state. A
/// single iteration is then run, and the new current state is returned.
/// </summary>
///
/// <param name="input">The input pattern.</param>
/// <returns>The new current state.</returns>
public override sealed IMLData Compute(IMLData input)
{
var result = new BiPolarMLData(input.Count);
input.CopyTo(CurrentState.Data, 0, input.Count);
Run();
EngineArray.ArrayCopy(CurrentState.Data, result.Data);
return result;
}
示例3: Compute
public virtual void Compute(IMLData input, double[] output)
{
int sourceIndex = _layerOutput.Length
- _layerCounts[_layerCounts.Length - 1];
input.CopyTo(_layerOutput, sourceIndex, _inputCount);
InnerCompute(output);
}
示例4: Compute
/// <summary>
/// Note: for Hopfield networks, you will usually want to call the "run"
/// method to compute the output.
/// This method can be used to copy the input data to the current state. A
/// single iteration is then run, and the new current state is returned.
/// </summary>
///
/// <param name="input">The input pattern.</param>
/// <returns>The new current state.</returns>
public override sealed IMLData Compute(IMLData input)
{
var result = new BiPolarMLData(input.Count);
input.CopyTo(CurrentState.Data, 0, input.Count);
Run();
for (int i = 0; i < CurrentState.Count; i++)
{
result.SetBoolean(i,
BiPolarUtil.Double2bipolar(CurrentState[i]));
}
EngineArray.ArrayCopy(CurrentState.Data, result.Data);
return result;
}