本文整理汇总了Java中com.tdunning.math.stats.AVLTreeDigest.fromBytes方法的典型用法代码示例。如果您正苦于以下问题:Java AVLTreeDigest.fromBytes方法的具体用法?Java AVLTreeDigest.fromBytes怎么用?Java AVLTreeDigest.fromBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.tdunning.math.stats.AVLTreeDigest
的用法示例。
在下文中一共展示了AVLTreeDigest.fromBytes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import com.tdunning.math.stats.AVLTreeDigest; //导入方法依赖的package包/类
@Override
public void read(Kryo kryo, Input input) {
int digestSize = input.readInt();
byte[] digestBytes = input.readBytes(digestSize);
ByteBuffer digestBuff = ByteBuffer.wrap(digestBytes);
digest = AVLTreeDigest.fromBytes(digestBuff);
n = input.readLong();
sum = input.readDouble();
sumOfSquares = input.readDouble();
sumOfLogs = input.readDouble();
min = input.readDouble();
max = input.readDouble();
M1 = input.readDouble();
M2 = input.readDouble();
M3 = input.readDouble();
M4 = input.readDouble();
}
示例2: addIntermediary
import com.tdunning.math.stats.AVLTreeDigest; //导入方法依赖的package包/类
@Override
public void addIntermediary(IntermediaryResultValueIterator intermediary) {
Long otherComplete = (Long) intermediary.next();
if (otherComplete == 1L) {
// only add state if we received some state where the other instance was "complete", i.e. this is the final result
// of a single other instance of this function. We will not have to remove this state again (we wouldn't be able
// to anyway).
SerializedAVLTreeDigest serialized = (SerializedAVLTreeDigest) intermediary.next();
AVLTreeDigest other = AVLTreeDigest.fromBytes(ByteBuffer.wrap(serialized.getSerialized()));
tdigest.add(other);
}
}
示例3: peekLength
import com.tdunning.math.stats.AVLTreeDigest; //导入方法依赖的package包/类
public int peekLength(ByteBuffer in) {
int mark = in.position();
AVLTreeDigest.fromBytes(in);
int total = in.position() - mark;
in.position(mark);
return total;
}
示例4: readRegisters
import com.tdunning.math.stats.AVLTreeDigest; //导入方法依赖的package包/类
public void readRegisters(ByteBuffer in) {
registers = AVLTreeDigest.fromBytes(in);
compression = registers.compression();
}