com.kpro.algorithm
Class ReductionAlgorithm

java.lang.Object
  extended by com.kpro.algorithm.ReductionAlgorithm
Direct Known Subclasses:
Reduction_KNN

public abstract class ReductionAlgorithm
extends java.lang.Object

The abstract class for implementing reduction algorithms, like Knearestneighbors. ReductionAlgorithm objects store the database, and reduce the set of polices to only the relevent policies (one or more). May include 'Conclusion'/'Summary' algorithms in the future.

Version:
29.09.11.1
Author:
ngerstle

Field Summary
(package private)  java.lang.String[] extraArgs
           
protected  PolicyDatabase pdb
           
 
Constructor Summary
ReductionAlgorithm(PolicyDatabase pdb, java.lang.String[] extraArgs)
          Constructor for a reductionAlgorithm
 
Method Summary
abstract  java.util.ArrayList<PolicyObject> reduce(PolicyObject newPO)
          the reduce call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pdb

protected PolicyDatabase pdb

extraArgs

java.lang.String[] extraArgs
Constructor Detail

ReductionAlgorithm

public ReductionAlgorithm(PolicyDatabase pdb,
                          java.lang.String[] extraArgs)
Constructor for a reductionAlgorithm

Parameters:
pdb -
extraArgs -
Method Detail

reduce

public abstract java.util.ArrayList<PolicyObject> reduce(PolicyObject newPO)
the reduce call. returns an arraylist of policies in the policydatabase relevent to newPO

Parameters:
policyDatabase -
newPO - the new policy to consider- it shouldn't change within the algorithm
Returns:
a modified newpol