本文整理汇总了Java中org.cloudbus.cloudsim.util.MathUtil.iqr方法的典型用法代码示例。如果您正苦于以下问题:Java MathUtil.iqr方法的具体用法?Java MathUtil.iqr怎么用?Java MathUtil.iqr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cloudbus.cloudsim.util.MathUtil
的用法示例。
在下文中一共展示了MathUtil.iqr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHostUtilizationIqr
import org.cloudbus.cloudsim.util.MathUtil; //导入方法依赖的package包/类
/**
* Gets the host utilization iqr.
*
* @param host the host
* @return the host utilization iqr
*/
protected double getHostUtilizationIqr(PowerHostUtilizationHistory host) throws IllegalArgumentException {
double[] data = host.getUtilizationHistory();
if (MathUtil.countNonZeroBeginning(data) >= 12) { // 12 has been suggested as a safe value
return MathUtil.iqr(data);
}
throw new IllegalArgumentException();
}
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:14,代码来源:PowerVmAllocationPolicyMigrationInterQuartileRange.java
示例2: computeHostUtilizationMeasure
import org.cloudbus.cloudsim.util.MathUtil; //导入方法依赖的package包/类
/**
* Computes the host utilization IRQ used for generating the host over utilization threshold.
*
* @param host the host
* @return the host CPU utilization percentage IQR
*/
@Override
public double computeHostUtilizationMeasure(PowerHostUtilizationHistory host) throws IllegalArgumentException {
final double[] data = host.getUtilizationHistory();
if (MathUtil.countNonZeroBeginning(data) >= MIN_NUM_OF_HISTORY_ENTRIES_TO_COMPUTE_IRQ) {
return MathUtil.iqr(data);
}
throw new IllegalArgumentException("There is not enough Host history to compute Host utilization IRQ");
}
开发者ID:manoelcampos,项目名称:cloudsim-plus,代码行数:16,代码来源:PowerVmAllocationPolicyMigrationInterQuartileRange.java