本文整理汇总了C#中weka.core.Instances.copyInstances方法的典型用法代码示例。如果您正苦于以下问题:C# Instances.copyInstances方法的具体用法?C# Instances.copyInstances怎么用?C# Instances.copyInstances使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类weka.core.Instances
的用法示例。
在下文中一共展示了Instances.copyInstances方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Instances
/// <summary> Creates a new set of instances by copying a
/// subset of another set.
///
/// </summary>
/// <param name="source">the set of instances from which a subset
/// is to be created
/// </param>
/// <param name="first">the index of the first instance to be copied
/// </param>
/// <param name="toCopy">the number of instances to be copied
/// </param>
/// <exception cref="IllegalArgumentException">if first and toCopy are out of range
/// </exception>
//@ requires 0 <= first;
//@ requires 0 <= toCopy;
//@ requires first + toCopy <= source.numInstances();
public Instances(Instances source, int first, int toCopy):this(source, toCopy)
{
if ((first < 0) || ((first + toCopy) > source.numInstances()))
{
throw new System.ArgumentException("Parameters first and/or toCopy out " + "of range");
}
source.copyInstances(first, this, toCopy);
}