searchstate.java

来自「mallet是自然语言处理、机器学习领域的一个开源项目。」· Java 代码 · 共 45 行

JAVA
45
字号
package edu.umass.cs.mallet.base.util.search;import java.util.Iterator;/** * Created by IntelliJ IDEA. * User: pereira * Date: Jun 20, 2005 * Time: 4:54:46 PM * A state (vertex) in a graph being searched. */public interface SearchState {  /**   * Iterator over the states with transitions from a given state.   */  public static abstract class NextStateIterator implements Iterator {    public abstract boolean hasNext();    public Object next() {return nextState(); };    /**     * Get the next reachable state.     * @return the state     */    public abstract SearchState nextState();    /**     * The cost of the transition to the current state.     * @return transition cost     */    public abstract double cost();    public void remove() {      throw new UnsupportedOperationException();    }  }  /**   * Get an iterator over the states with transitions from   * this state.   * @return the iterator   */  public abstract NextStateIterator getNextStates();  /**   * Is this state final?   * @return whether this state is final   */  public abstract boolean isFinal();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?