com.hammurapi.reasoning.impl
Class ConditionSharingOptimizer

java.lang.Object
  extended by com.hammurapi.reasoning.impl.ConditionSharingOptimizer
All Implemented Interfaces:
RuleSetFlowOptimizer

public class ConditionSharingOptimizer
extends Object
implements RuleSetFlowOptimizer

Optimizes flow by finding equal conditions emanating from the same pin and merging them.

Author:
Pavel Vlasov

Constructor Summary
ConditionSharingOptimizer()
           
 
Method Summary
 int getOrder()
          This optimization shall be executed after elimination of unnecessary pass-through nodes and transitions.
 void optimize(Flow ruleSetFlow)
          Optimizes flow by removing unnecessary passthrough nodes and transitions and by rearranging condition and accept nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionSharingOptimizer

public ConditionSharingOptimizer()
Method Detail

optimize

public void optimize(Flow ruleSetFlow)
Description copied from interface: RuleSetFlowOptimizer
Optimizes flow by removing unnecessary passthrough nodes and transitions and by rearranging condition and accept nodes.

Specified by:
optimize in interface RuleSetFlowOptimizer

getOrder

public int getOrder()
This optimization shall be executed after elimination of unnecessary pass-through nodes and transitions.

Specified by:
getOrder in interface RuleSetFlowOptimizer
Returns: