Files
Opis/mcp/mobius/opis/data/holders/stats/StatsTick.java
T
2014-03-20 15:19:23 +01:00

24 lines
657 B
Java

package mcp.mobius.opis.data.holders.stats;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
public class StatsTick extends StatAbstract {
public DescriptiveStatistics dstat = new DescriptiveStatistics(20);
@Override
public void writeToStream(DataOutputStream stream) throws IOException {
stream.writeDouble(this.getGeometricMean());
}
public static StatsTick readFromStream(DataInputStream stream) throws IOException {
StatsTick stat = new StatsTick();
stat.setGeometricMean(stream.readDouble());
return stat;
}
}