Examples of BinaryMatrix


Examples of wyautl.util.BinaryMatrix

   *            --- Returns a mapping of states in the original automaton to
   *            their representative states in the minimised automaton. This
   *            array must be at least of size <code>nStates</code>.
   */
  private void minimise(int[] binding) {
    BinaryMatrix equivs = new BinaryMatrix(nStates, nStates, true);
    Automata.determineEquivalenceClasses(this, equivs);
    Automata.determineRepresentativeStates(this, equivs, binding);

    // First, remap states so all references are to the unique
    // representatives.
View Full Code Here

Examples of wyautl_old.util.BinaryMatrix

   *            --- automaton to minimise
   * @return --- minimised automaton
   */
  public final static Automaton minimise(Automaton automaton) {
    // First, determine equivalence classes
    BinaryMatrix equivs = new BinaryMatrix(automaton.size(),automaton.size(),true);
    determineEquivalenceClasses(equivs,automaton);

    // TODO: optimise the case when all equivalence classes have unit size.

    // Second, determine representative nodes for each equivalence class.
    int oldSize = automaton.size();
    int[] mapping = new int[oldSize];
    int newSize = 0;
    for(int i=0;i!=oldSize;++i) {
      int classRep = i;
      for(int j=0;j<i;++j) {
        if(equivs.get(i,j)) {
          classRep = j;
          break;
        }
      }
      if(i == classRep) {
View Full Code Here

Examples of wyautl_old.util.BinaryMatrix

  private final Automaton to;

  public DefaultSubsumption(Automaton from, Automaton to) {
    this.from = from;
    this.to = to;
    this.subsumes = new BinaryMatrix(from.size(),to.size(),true);
  }
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.