本文整理汇总了Java中moa.core.SizeOf.fullSizeOf方法的典型用法代码示例。如果您正苦于以下问题:Java SizeOf.fullSizeOf方法的具体用法?Java SizeOf.fullSizeOf怎么用?Java SizeOf.fullSizeOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类moa.core.SizeOf
的用法示例。
在下文中一共展示了SizeOf.fullSizeOf方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
}
示例2: calcByteSize
import moa.core.SizeOf; //导入方法依赖的package包/类
public int calcByteSize() {
return (int) (SizeOf.sizeOf(this) + SizeOf.fullSizeOf(this.observedClassDistribution));
}
示例3: calcByteSize
import moa.core.SizeOf; //导入方法依赖的package包/类
public int calcByteSize() {
return (int) SizeOf.fullSizeOf(this);
}
示例4: 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);
}