package uk.ac.leeds.ccg.cluster; // base class for significance tests for GAM/K // // J R Davy // Jan 1989 //import com.sun.java.util.collections.*; import java.util.*; public abstract class SignificanceTest implements Constants { Parameters parameters; TimeParameters timeparameters; public void setParameters(Parameters p){parameters=p;} public void setTimeParameters(TimeParameters p){timeparameters=p;} public Parameters getParameters(){return parameters;} public abstract boolean isSignificant(Vector points) throws SignificanceException; public abstract double getStatistic(); public boolean worthTesting(double sumP, double sumC) { boolean excess = parameters.getExcess(); return( ( sumP >= parameters.getMinPopSize() ) && ( sumC >= parameters.getMinIncidenceCount() ) ); /* if ( excess ) { return( ( sumP <= sumC ) && ( sumP >= parameters.getMinPopSize() ) && ( sumC >= parameters.getMinIncidenceCount() ) ); } else { return( ( sumP >= sumC ) && ( sumP >= parameters.getMinPopSize() ) && ( sumC >= parameters.getMinIncidenceCount() ) ); } */ } public boolean isWorthTesting(double sumP, double sumC) { return (worthTesting(sumP, sumC)); } }