Examples of PartialResult


Examples of hivemall.mix.store.PartialResult

    protected void channelRead0(ChannelHandlerContext ctx, MixMessage msg) throws Exception {
        final MixEventName event = msg.getEvent();
        switch(event) {
            case average:
            case argminKLD: {
                PartialResult partial = getPartialResult(msg);
                mix(ctx, msg, partial);
                break;
            }
            case closeGroup: {
                closeGroup(msg);
View Full Code Here

Examples of hivemall.mix.store.PartialResult

            throw new IllegalStateException("JobID is not set in the request message");
        }
        ConcurrentMap<Object, PartialResult> map = sessionStore.get(groupID);

        Object feature = msg.getFeature();
        PartialResult partial = map.get(feature);
        if(partial == null) {
            final MixEventName event = msg.getEvent();
            switch(event) {
                case average:
                    partial = new PartialAverage(scale);
                    break;
                case argminKLD:
                    partial = new PartialArgminKLD(scale);
                    break;
                default:
                    throw new IllegalStateException("Unexpected event: " + event);
            }
            PartialResult existing = map.putIfAbsent(feature, partial);
            if(existing != null) {
                partial = existing;
            }
        }
        return partial;
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.