/** * Created with IntelliJ IDEA. * User: rebeccamancy * Date: 16/12/2013 * Time: 14:25 * To change this template use File | Settings | File Templates. */ public class SimCluster { // Attributes are an array of simulators private Simulator[] clust; // one per simulator run private Ecology eco; private Sequences[] seqs; // one Sequences object per patch (array of these of length numPatches) private int numDraws, timeWindowLength; // for convergence ... private double[] extinctionTimes; private int[][] extPaths; /** * Constructor that is used for SimCluster used to generate QSD until convergence (thus needs Sequences) * @param numSims * @param numSeqsPerSimulator * @param eco */ public SimCluster(int numSims, int numSeqsPerSimulator, Ecology eco, int numDraws, int timeWindowLength, int maxIndexed){ // Set up array of simulators clust = new Simulator[numSims]; this.eco = eco; for (int i=0; i rhatThreshold) { // Simulate the next time window, collecting states at sample points into an array (rows=sample points; cols=seqs) for (Simulator sim:clust) { sim.runDeOliveiraDiscrete(this.timeWindowLength, trace, 0.1, 5); // TODO } // For each patch, collect current excerpts per patch from sim into array, update sequences, and calculate rhat for (int patch = 0; patch