src/main/java/de/dfki/lt/loot/fsa/FiniteAutomaton.java
public FiniteAutomaton<EdgeInfo> complement() {

    FiniteAutomaton<EdgeInfo> complement = this.copy();

    // complement creation:
    // all final states become non-final states;
    // all non-final states become final states
    for (int v : complement) {
      if (complement.isFinalState(v)) {
        complement.setNonFinalState(v);
      }
      else {
        complement.setFinalState(v);
      }
    }

    return complement;
  }
/**
   * Returns a new finite automaton that is the complement of this automaton.
   *
   * @return the complement automaton
   */
Returns a new finite automaton that is the complement of this automaton.
@return the complement automaton
Returns a new finite automaton that is the complement of this automaton . @return the complement automaton
public FiniteAutomaton<EdgeInfo> complement() {
    FiniteAutomaton<EdgeInfo> complement = this.copy();
    for (int v : complement) {
      if (complement.isFinalState(v)) {
        complement.setNonFinalState(v);
      }
      else {
        complement.setFinalState(v);
      }
    }
    return complement;
  }
public FiniteAutomaton < EdgeInfo > complement ( ) { FiniteAutomaton < EdgeInfo > complement = this . copy ( ) ; for ( int v : complement ) { if ( complement . isFinalState ( v ) ) { complement . setNonFinalState ( v ) ; } else { complement . setFinalState ( v ) ; } } return complement ; }
Returns a new finite automaton that is the complement of this automaton.
Returns a new finite automaton that is the complement of this automaton .
// complement creation: // all final states become non-final states; // all non-final states become final states