Examples of IrregularSample


Examples of com.inadco.hbl.model.IrregularSample

    @Override
    public void apply(Builder result, Object measureFact) {
        if (!(measureFact instanceof IrregularSample))
            return; // we don't know how to sum anything else
        IrregularSample sample = (IrregularSample) measureFact;

        Object fact = sample.getFact();
        if (!(fact instanceof Number))
            return;

        double x = ((Number) fact).doubleValue();

        try {

            OnlineCannyAvgSummarizer s = super.extractState(result, sumBuf);
            if (s == null) {
                sumBuf.reset();
                s = sumBuf;
            }
            s.update(x, sample.getTime());

            super.saveState(result, sumBuf);
        } catch (IOException exc) {
            // should not happen .
            // otherwise, probably a bad practice.
View Full Code Here

Examples of com.inadco.hbl.model.IrregularSample

    @Override
    public void apply(Builder result, Object measureFact) {
        if (!(measureFact instanceof IrregularSample))
            return; // we don't know how to sum anything else
        IrregularSample sample = (IrregularSample) measureFact;

        Object fact = sample.getFact();
        if (!(fact instanceof Number))
            return;

        double x = ((Number) fact).doubleValue();

        try {

            OnlineCannyRateSummarizer s = super.extractState(result, sumBuf);
            if (s == null) {
                sumBuf.reset();
                s = sumBuf;
            }
            s.update(x, sample.getTime());

            super.saveState(result, sumBuf);
        } catch (IOException exc) {
            // should not happen .
            // otherwise, probably a bad practice.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.