HyperNEATUtil { public static List<DrawingPanel> drawSubstrates(ArrayList<Node> nodes) { if(substratePanels == null) { hyperNEATTask = (HyperNEATTask) MMNEAT.task; substrates = hyperNEATTask.getSubstrateInformation(); substratePanels = new ArrayList<DrawingPanel>(); int nodeIndexStart = 0; int substratePlacing = 0; for(int i = 0; i < substrates.size(); i++) { Substrate s = substrates.get(i); substratePanels.add(drawSubstrate(s, nodes, nodeIndexStart)); substratePanels.get(i).setLocation(substratePlacing, 0); nodeIndexStart += s.getSize().t1 * s.getSize().t2; substratePlacing += substratePanels.get(i).getFrame().getWidth(); } } else { int nodeIndexStart = 0; for(int i = 0; i < substrates.size(); i++) { Substrate s = substrates.get(i); drawSubstrate(substratePanels.get(i), s, nodes, nodeIndexStart); nodeIndexStart += s.getSize().t1 * s.getSize().t2; } } return substratePanels; }  static void clearHyperNEATVisualizations(); static void resetSubstrates(); static List<DrawingPanel> drawSubstrates(ArrayList<Node> nodes); static DrawingPanel drawSubstrate(Substrate s, ArrayList<Node> nodes, int nodeIndexStart); static DrawingPanel drawSubstrate(DrawingPanel dp, Substrate s, ArrayList<Node> nodes, int nodeIndexStart); static HyperNEATTask getHyperNEATTask(); static Color regularVisualization(double activation); static List<DrawingPanel> drawWeight(TWEANNGenotype genotype, HyperNEATTask hnt); static int numBiasOutputsNeeded(); static int indexFirstBiasOutput(HyperNEATTask hnt); static int totalPossibleLinks(HyperNEATTask hnt); static List<Substrate> getSubstrateInformation(int inputWidth, int inputHeight, int numInputSubstrates, List<Triple<String, Integer, Integer>> output); static List<Substrate> getSubstrateInformation(int inputWidth, int inputHeight, int numInputSubstrates, int processWidth, int processDepth, List<Triple<String, Integer, Integer>> output); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, List<String> outputNames); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, List<String> outputNames, boolean connectInputsToOutputs); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, int processWidth, int processDepth, List<String> outputNames); static List<Triple<String, String,Boolean>> getSubstrateConnectivity(int numInputSubstrates, int processWidth, int processDepth, List<String> outputNames, boolean connectInputsToOutputs); static int numCPPNOutputs(); static int numCPPNInputs(); static int numCPPNInputs(HyperNEATTask task); final static int LINK_WINDOW_SPACING; final static int SUBS_GRID_SIZE; final static int WEIGHT_GRID_SIZE; }
@Test public void testDrawSubstratesVisual() { HyperNEATUtil.drawSubstrates(nodes); }