当前位置: 首页>>代码示例>>Java>>正文


Java SizeOf类代码示例

本文整理汇总了Java中moa.core.SizeOf的典型用法代码示例。如果您正苦于以下问题:Java SizeOf类的具体用法?Java SizeOf怎么用?Java SizeOf使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SizeOf类属于moa.core包,在下文中一共展示了SizeOf类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: calcByteSize

import moa.core.SizeOf; //导入依赖的package包/类
public int calcByteSize() {
    int size = (int) SizeOf.sizeOf(this);
    if (this.treeRoot != null) {
        size += this.treeRoot.calcByteSizeIncludingSubtree();
    }
    return size;
}
 
开发者ID:Waikato,项目名称:moa,代码行数:8,代码来源:HoeffdingOptionTree.java

示例2: estimateModelByteSizes

import moa.core.SizeOf; //导入依赖的package包/类
public void estimateModelByteSizes() {
    FoundNode[] learningNodes = findLearningNodes();
    long totalActiveSize = 0;
    long totalInactiveSize = 0;
    for (FoundNode foundNode : learningNodes) {
        if (foundNode.node instanceof ActiveLearningNode) {
            totalActiveSize += SizeOf.fullSizeOf(foundNode.node);
        } else {
            totalInactiveSize += SizeOf.fullSizeOf(foundNode.node);
        }
    }
    if (totalActiveSize > 0) {
        this.activeLeafByteSizeEstimate = (double) totalActiveSize
                / this.activeLeafNodeCount;
    }
    if (totalInactiveSize > 0) {
        this.inactiveLeafByteSizeEstimate = (double) totalInactiveSize
                / this.inactiveLeafNodeCount;
    }
    int actualModelSize = this.measureByteSize();
    double estimatedModelSize = (this.activeLeafNodeCount
            * this.activeLeafByteSizeEstimate + this.inactiveLeafNodeCount
            * this.inactiveLeafByteSizeEstimate);
    this.byteSizeEstimateOverheadFraction = actualModelSize
            / estimatedModelSize;
    if (actualModelSize > this.maxByteSizeOption.getValue()) {
        enforceTrackerLimit();
    }
}
 
开发者ID:Waikato,项目名称:moa,代码行数:30,代码来源:HoeffdingOptionTree.java

示例3: calcByteSize

import moa.core.SizeOf; //导入依赖的package包/类
public int calcByteSize() {
	int size = (int) SizeOf.sizeOf(this);
	if (this.treeRoot != null) {
		size += this.treeRoot.calcByteSize();
	}
	return size;
}
 
开发者ID:Waikato,项目名称:moa,代码行数:8,代码来源:ISOUPTree.java

示例4: calcByteSize

import moa.core.SizeOf; //导入依赖的package包/类
public int calcByteSize() {
	return (int) SizeOf.fullSizeOf(this);
}
 
开发者ID:Waikato,项目名称:moa,代码行数:4,代码来源:FIMTDD.java

示例5: measureByteSize

import moa.core.SizeOf; //导入依赖的package包/类
/**
 * Gets the memory size of an object.
 *
 * @param obj object to measure the memory size
 * @return the memory size of this object
 */
public static int measureByteSize(MOAObject obj) {
    return (int) SizeOf.fullSizeOf(obj);
}
 
开发者ID:Waikato,项目名称:moa,代码行数:10,代码来源:AbstractMOAObject.java


注:本文中的moa.core.SizeOf类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。