/** * Gets the keys for a specified run number. Different run numbers correspond * to different randomizations of the data. Keys produced should be sent to * the current ResultListener * * @param run the run number to get keys for. * @throws Exception if a problem occurs while getting the keys */ @Override public void doRunKeys(int run) throws Exception { if (m_ResultProducer == null) { throw new Exception("No ResultProducer set"); } if (m_ResultListener == null) { throw new Exception("No ResultListener set"); } if (m_Instances == null) { throw new Exception("No Instances set"); } // Tell the resultproducer to send results to us m_ResultProducer.setResultListener(this); m_ResultProducer.setInstances(m_Instances); m_ResultProducer.doRunKeys(run); }
/** * Gets the results for a specified run number. Different run numbers * correspond to different randomizations of the data. Results produced should * be sent to the current ResultListener * * @param run the run number to get results for. * @throws Exception if a problem occurs while getting the results */ @Override public void doRun(int run) throws Exception { if (m_ResultProducer == null) { throw new Exception("No ResultProducer set"); } if (m_ResultListener == null) { throw new Exception("No ResultListener set"); } if (m_Instances == null) { throw new Exception("No Instances set"); } // Tell the resultproducer to send results to us m_ResultProducer.setResultListener(this); m_ResultProducer.setInstances(m_Instances); m_ResultProducer.doRun(run); }
/** * Gets the keys for a specified run number. Different run numbers correspond * to different randomizations of the data. Keys produced should be sent to * the current ResultListener * * @param run the run number to get keys for. * @throws Exception if a problem occurs while getting the keys */ @Override public void doRunKeys(int run) throws Exception { if (m_ResultProducer == null) { throw new Exception("No ResultProducer set"); } if (m_ResultListener == null) { throw new Exception("No ResultListener set"); } if (m_Instances == null) { throw new Exception("No Instances set"); } // Tell the resultproducer to send results to us m_ResultProducer.setResultListener(this); m_ResultProducer.setInstances(m_Instances); m_ResultProducer.doRunKeys(run); }
/** * Gets the results for a specified run number. Different run numbers * correspond to different randomizations of the data. Results produced should * be sent to the current ResultListener * * @param run the run number to get results for. * @throws Exception if a problem occurs while getting the results */ @Override public void doRun(int run) throws Exception { if (m_ResultProducer == null) { throw new Exception("No ResultProducer set"); } if (m_ResultListener == null) { throw new Exception("No ResultListener set"); } if (m_Instances == null) { throw new Exception("No Instances set"); } // Tell the resultproducer to send results to us m_ResultProducer.setResultListener(this); m_ResultProducer.setInstances(m_Instances); m_ResultProducer.doRun(run); }
/** * Simulates a run to collect the keys the sub-resultproducer could generate. * Does some checking on the keys and determines the template key. * * @param run the run number * @return a template key (null for the field being averaged) * @throws Exception if an error occurs */ protected Object[] determineTemplate(int run) throws Exception { if (m_Instances == null) { throw new Exception("No Instances set"); } m_ResultProducer.setInstances(m_Instances); // Clear the collected results m_Keys.clear(); m_Results.clear(); m_ResultProducer.doRunKeys(run); checkForMultipleDifferences(); Object[] template = m_Keys.get(0).clone(); template[m_KeyIndex] = null; // Check for duplicate keys checkForDuplicateKeys(template); return template; }
/** * Simulates a run to collect the keys the sub-resultproducer could generate. * Does some checking on the keys and determines the template key. * * @param run the run number * @return a template key (null for the field being averaged) * @throws Exception if an error occurs */ protected Object[] determineTemplate(int run) throws Exception { if (m_Instances == null) { throw new Exception("No Instances set"); } m_ResultProducer.setInstances(m_Instances); // Clear the collected results m_Keys.clear(); m_Results.clear(); m_ResultProducer.doRunKeys(run); checkForMultipleDifferences(); Object[] template = m_Keys.get(0).clone(); template[m_KeyIndex] = null; // Check for duplicate keys checkForDuplicateKeys(template); return template; }
m_ResultProducer.setInstances(m_Instances);
m_ResultProducer.setInstances(m_Instances);
m_ResultProducer.setInstances(new Instances(runInstances, 0, m_CurrentSize)); m_ResultProducer.doRun(run);
m_ResultProducer.setInstances(new Instances(runInstances, 0, m_CurrentSize)); m_ResultProducer.doRun(run);
m_ResultProducer.setInstances(m_CurrentInstances);
m_ResultProducer.setInstances(m_CurrentInstances);