Examples of ViterbiNode


Examples of net.reduls.gomoku.dic.ViterbiNode

                WordDic.search(text, i, fn);
                Unknown.search(text, i, fn);
            }
        }

        ViterbiNode cur = setMincostNode(ViterbiNode.makeBOSEOS(), nodesAry[len]).prev;
        ViterbiNode head = null;
        while(cur.prev != null) {
            final ViterbiNode tmp = cur.prev;
            cur.prev = head;
            head = cur;
            cur = tmp;
        }
        return head;
View Full Code Here

Examples of net.reduls.gomoku.dic.ViterbiNode

        }
        return head;
    }

    private static ViterbiNode setMincostNode(ViterbiNode vn, ViterbiNodeList prevs) {
        final ViterbiNode f = vn.prev = prevs.get(0);
        int minCost = f.cost + Matrix.linkCost(f.posId, vn.posId);
       
        for(int i=1; i < prevs.size(); i++) {
            final ViterbiNode p = prevs.get(i);
            final int cost = p.cost + Matrix.linkCost(p.posId, vn.posId);

            if(cost < minCost) {
                minCost = cost;
                vn.prev = p;
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.