Skip to content

Commit ee7f5a1

Browse files
committed
Update to Reduction()
This simply removes minimise() from the reduce inner loop, as I believe that this is unnecessary and potentially quite expensive.
1 parent 566ee7b commit ee7f5a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wyrw/core/Reduction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public Reduction(Schema schema, Comparator<Rewrite.Activation> comparator,
2626
cache = new HashMap<Automaton,Integer>();
2727
}
2828

29+
/**
30+
* Automaton should be minimised
31+
*/
2932
public int initialise(Automaton automaton) {
3033
states.add(probe(automaton));
3134
return states.size()-1;
@@ -40,7 +43,6 @@ public int step(int from, int activation) {
4043
int to;
4144
if (target != Automaton.K_VOID && from != target) {
4245
// Rule application produced an updated automaton
43-
automaton.minimise(); // needed?
4446
automaton.compact(0);
4547
to = addState(automaton);
4648
if(to >= states.size()) {

0 commit comments

Comments
 (0)