Package org.ictclas4j.bean

Examples of org.ictclas4j.bean.Queue.push()


        for (SegNode seg : colSgs) {
          preNode = seg.getRow();
          weight = seg.getWeight();

          if (preNode == 0) {
            queWork.push(new QueueNode(preNode, 0, weight));

          } else {
            if (pathWeight[preNode][0] != Utility.INFINITE_VALUE)
              queWork.push(new QueueNode(preNode, 0, weight + pathWeight[preNode][0]));
          }
View Full Code Here


          if (preNode == 0) {
            queWork.push(new QueueNode(preNode, 0, weight));

          } else {
            if (pathWeight[preNode][0] != Utility.INFINITE_VALUE)
              queWork.push(new QueueNode(preNode, 0, weight + pathWeight[preNode][0]));
          }

        }

        // ��¼ÿһ���ڵ��N��ǰ����Ȩ��
View Full Code Here

    shortPath();
    if (vertex > 0) {

      queResult = new Queue();
      queResult.push(new QueueNode(vertex - 1, 0, 0));
      curNode = vertex - 1;
      curIndex = 0;

      while (!queResult.isEmpty()) {
        while (curNode > 0) {
View Full Code Here

            curIndex = qn.getIndex();
          }
          else
            break;
          if (curNode > 0)
            queResult.push(new QueueNode(curNode, curIndex, 0));
        }

        if (curNode == 0) {
          // ���һ���ִ�·��
          QueueNode qn = null;
View Full Code Here

            QueueNode next = parent[curNode].pop(false);

            if (next != null) {
              curNode = next.getParent();
              next.setWeight(0);
              queResult.push(qn);
              queResult.push(next);
              break;
            }
          }
        }
View Full Code Here

            if (next != null) {
              curNode = next.getParent();
              next.setWeight(0);
              queResult.push(qn);
              queResult.push(next);
              break;
            }
          }
        }
      }
View Full Code Here

        for (SegNode seg : colSgs) {
          preNode = seg.getRow();
          weight = seg.getValue();

          if (preNode == 0) {
            queWork.push(new QueueNode(preNode, 0, weight));

          } else {
            if (pathWeight[preNode][0] != Utility.INFINITE_VALUE)
              queWork.push(new QueueNode(preNode, 0, weight + pathWeight[preNode][0]));
          }
View Full Code Here

          if (preNode == 0) {
            queWork.push(new QueueNode(preNode, 0, weight));

          } else {
            if (pathWeight[preNode][0] != Utility.INFINITE_VALUE)
              queWork.push(new QueueNode(preNode, 0, weight + pathWeight[preNode][0]));
          }

        }

        // ��¼ÿһ���ڵ��N��ǰ����Ȩ��
View Full Code Here

    shortPath();
    if (vertex > 0) {

      queResult = new Queue();
      queResult.push(new QueueNode(vertex - 1, 0, 0));
      curNode = vertex - 1;
      curIndex = 0;

      while (!queResult.isEmpty()) {
        while (curNode > 0) {
View Full Code Here

          if (qn != null) {
            curNode = qn.getParent();
            curIndex = qn.getIndex();
          }
          if (curNode > 0)
            queResult.push(new QueueNode(curNode, curIndex, 0));
        }

        if (curNode == 0) {
          // ���һ���ִ�·��
          QueueNode qn = null;
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.