@@ -0,0 +1,1752 @@
+package com.github.dieterdepaepe.jsearch.search.statespace.dev;%0A%0Aimport com.github.dieterdepaepe.jsearch.search.statespace.Heuristic;%0Aimport com.github.dieterdepaepe.jsearch.search.statespace.InformedSearchNode;%0Aimport com.github.dieterdepaepe.jsearch.search.statespace.SearchNode;%0Aimport com.github.dieterdepaepe.jsearch.search.statespace.SearchNodeGenerator;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * A wrapper for any %7B@link com.github.dieterdepaepe.jsearch.search.statespace.SearchNodeGenerator%7D which tracks%0A * the order in which %7B@link com.github.dieterdepaepe.jsearch.search.statespace.SearchNode%7Ds are expanded. This class%0A * is intended for use in tests and experiments.%0A * @author Dieter De Paepe%0A */%0Apublic class LoggingGenerator%3CT extends SearchNode, U%3E implements SearchNodeGenerator%3CT, U%3E %7B%0A    private SearchNodeGenerator%3CT, U%3E wrappedGenerator;%0A    private List%3CT%3E expandedNodes;%0A%0A    /**%0A     * Creates a wrapper for the given generator which will track the order in which nodes are expanded.%0A     * @param wrappedGenerator the generator to wrap%0A     */%0A    public LoggingGenerator(SearchNodeGenerator%3CT, U%3E wrappedGenerator) %7B%0A        this.wrappedGenerator = wrappedGenerator;%0A        expandedNodes = new ArrayList%3C%3E();%0A    %7D%0A%0A    @Override%0A    public List%3CInformedSearchNode%3CT%3E%3E generateSuccessorNodes(T node, U environment, Heuristic%3C? super T, ? super U%3E heuristic) %7B%0A        expandedNodes.add(node);%0A        return wrappedGenerator.generateSuccessorNodes(node, environment, heuristic);%0A    %7D%0A%0A    /**%0A     * Gets the list containing all nodes that have been expanded so far by this generator.%0A     * @return a modifiable list%0A     */%0A    public List%3CT%3E getExpandedNodes() %7B%0A        return expandedNodes;%0A    %7D%0A%7D%0A

Add LoggingGenerator.