Package hivemall.mix.store

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


            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

Related Classes of hivemall.mix.store.PartialResult

Copyright © 2018 www.massapicom. 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.