All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.liblevenshtein.collection.dictionary.ITransitionFunction Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
package com.github.liblevenshtein.collection.dictionary;

import java.io.Serializable;
import java.util.Iterator;

/**
 * Deterministically-transitions between states according to some input.
 * @author Dylon Edwards
 * @param  Kind of state this transition function accepts.
 * @since 2.1.0
 */
public interface ITransitionFunction extends Serializable {

  /**
   * Determines the next state given the current one and some input.
   * @param current The active state of an automaton
   * @param label Input used to determine the next state
   * @return The next state of the automaton
   */
  State of(State current, char label);

  /**
   * Returns the labels of the outgoing edges from the node.
   * @param current The active state of an automaton
   * @return The labels of the outgoing edges from the node.
   */
  Iterator of(State current);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy