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