Commit 624d1609 authored by Sebastian Vollbrecht's avatar Sebastian Vollbrecht

Overhauled property creation & strict mode.

Boni:
- the FeasibleMinIIProperty is now able to generate feasible cycles with inner delays != max inner delay
- the LayerStructure class does not include swap checkers/strict mode related things anymore
parent b8aa2d58
...@@ -19,8 +19,10 @@ package graphgen.generator; ...@@ -19,8 +19,10 @@ package graphgen.generator;
import graphgen.datastructures.Pair; import graphgen.datastructures.Pair;
import graphgen.datastructures.SeededRandom; import graphgen.datastructures.SeededRandom;
import graphgen.generator.components.StrictComponent;
import graphgen.generator.components.edges.EdgeCreator; import graphgen.generator.components.edges.EdgeCreator;
import graphgen.generator.components.edges.includers.EdgeIncluder; import graphgen.generator.components.edges.includers.EdgeIncluder;
import graphgen.generator.components.layers.GeneratedLayerStructure;
import graphgen.generator.components.layers.LayerCreator; import graphgen.generator.components.layers.LayerCreator;
import graphgen.generator.components.nodes.NodeCreator; import graphgen.generator.components.nodes.NodeCreator;
import graphgen.generator.components.properties.Property; import graphgen.generator.components.properties.Property;
...@@ -70,7 +72,7 @@ import java.util.Set; ...@@ -70,7 +72,7 @@ import java.util.Set;
* @see Property * @see Property
* @see SeededRandom * @see SeededRandom
*/ */
public final class GraphGenerator { public final class GraphGenerator implements StrictComponent {
private final LayerCreator layerCreator; private final LayerCreator layerCreator;
private final NodeCreator nodeCreator; private final NodeCreator nodeCreator;
...@@ -83,7 +85,6 @@ public final class GraphGenerator { ...@@ -83,7 +85,6 @@ public final class GraphGenerator {
private final EdgeInclusionDuplicateChecker edgeChecker; private final EdgeInclusionDuplicateChecker edgeChecker;
private boolean verbose = false; private boolean verbose = false;
private boolean strict = false;
private PrintStream out = System.out; private PrintStream out = System.out;
/** /**
...@@ -165,7 +166,7 @@ public final class GraphGenerator { ...@@ -165,7 +166,7 @@ public final class GraphGenerator {
public Graph<ResourceNode> createGraph(long seed) { public Graph<ResourceNode> createGraph(long seed) {
if (verbose) { if (verbose) {
out.println("Creating " + (strict ? "strict " : "") + "graph with seed " + seed); out.println("Creating graph with seed " + seed);
} }
// Reset and clear generation objects. // Reset and clear generation objects.
...@@ -183,22 +184,17 @@ public final class GraphGenerator { ...@@ -183,22 +184,17 @@ public final class GraphGenerator {
// Start generating a new graph. // Start generating a new graph.
rng.setSeed(seed); rng.setSeed(seed);
LayerStructure layers = layerCreator.createLayerStructure(); GeneratedLayerStructure layers = layerCreator.createLayerStructure();
layers.setStrict(strict); if (verbose) {
edgeCreator.setStrict(strict); out.println("\tGenerated layer structure: " + layers.toString());
edgeIncluder.setStrict(strict); }
backedgeIncluder.setStrict(strict);
edgeCreator.addObserver(layers); edgeCreator.addObserver(layers);
edgeCreator.addObserver(property); edgeCreator.addObserver(property);
edgeCreator.addObserver(edgeIncluder); edgeCreator.addObserver(edgeIncluder);
edgeCreator.addObserver(backedgeIncluder); edgeCreator.addObserver(backedgeIncluder);
if (verbose) {
out.println("\tGenerated layer structure: " + layers.toString());
}
edgeCreator.setLayerStructure(layers); edgeCreator.setLayerStructure(layers);
edgeIncluder.setLayerStructure(layers); edgeIncluder.setLayerStructure(layers);
backedgeIncluder.setLayerStructure(layers); backedgeIncluder.setLayerStructure(layers);
...@@ -233,7 +229,7 @@ public final class GraphGenerator { ...@@ -233,7 +229,7 @@ public final class GraphGenerator {
nodes.forEach(n -> asapTimes.put(n, -1)); nodes.forEach(n -> asapTimes.put(n, -1));
generateIncomingEdges(layers, nodes, nodeTable, asapTimes, seed); generateIncomingEdges(layers, nodes, nodeTable, asapTimes);
if (verbose) { if (verbose) {
out.println("\tGenerating outgoing edges."); out.println("\tGenerating outgoing edges.");
...@@ -347,24 +343,19 @@ public final class GraphGenerator { ...@@ -347,24 +343,19 @@ public final class GraphGenerator {
} }
/** /**
* Makes the generator <b>strict</b>, i.e. that all components are <b>not</b> allowed to deviate from their * Toggles the strictness of the generator. In strict mode, all components are <b>not</b> allowed to deviate from
* specified parameters. Note that this way the generation process might lead to exceptions more often. * their specified parameters. Note that this way the generation process might lead to exceptions more often.
*/
public void setStrict() {
strict = true;
}
/**
* Sets the generator to non-strict mode, i.e. that the components are allowed to deviate from their specified
* parameters (e.g. the properties are allowed to swap nodes around, to generate edges with specific delays, ...).
*/ */
public void setNonStrict() { @Override
strict = false; public void setStrictness(boolean strictness) {
layerCreator.setStrictness(strictness);
edgeCreator.setStrictness(strictness);
edgeIncluder.setStrictness(strictness);
backedgeIncluder.setStrictness(strictness);
} }
private void generateIncomingEdges(LayerStructure layers, Set<ResourceNode> nodes, private void generateIncomingEdges(LayerStructure layers, Set<ResourceNode> nodes,
Map<Integer, ResourceNode> nodeTable, Map<ResourceNode, Integer> asapTimes, Map<Integer, ResourceNode> nodeTable, Map<ResourceNode, Integer> asapTimes) {
long seed) {
for (ResourceNode dst : JavaUtils.asShuffledList(nodes, rng)) { for (ResourceNode dst : JavaUtils.asShuffledList(nodes, rng)) {
......
...@@ -20,12 +20,12 @@ package graphgen.generator.components; ...@@ -20,12 +20,12 @@ package graphgen.generator.components;
import graphgen.datastructures.SeededRandom; import graphgen.datastructures.SeededRandom;
/** /**
* An interface which all components participating in the creation of graphs can implement. It provides initialization * An interface which all components participating in the creation of graphs implement. It provides initialization
* methods. * methods.
* *
* @author Sebastian Vollbrecht * @author Sebastian Vollbrecht
*/ */
public interface Initializable { public interface GeneratorComponent {
/** /**
* Grants the implementing class access to the graph generator's random number generator. This method is called * Grants the implementing class access to the graph generator's random number generator. This method is called
...@@ -41,4 +41,5 @@ public interface Initializable { ...@@ -41,4 +41,5 @@ public interface Initializable {
* before the generator begins generating a new graph. * before the generator begins generating a new graph.
*/ */
void reset(); void reset();
} }
...@@ -15,39 +15,20 @@ ...@@ -15,39 +15,20 @@
* limitations under the License. * limitations under the License.
*/ */
package graphgen.generator.exceptions; package graphgen.generator.components;
public final class InfeasibilityImpossibleException extends RuntimeException { /**
* An interface which all components which can be set to strict mode implement. In strict mode, certain things might not
* be allowed (e.g. swapping nodes, creating custom edges, ...).
*
* @author Sebastian Vollbrecht
*/
public interface StrictComponent {
/** /**
* Sets the strictness of the component.
* *
* @param strictness true to enable the component's strict mode, otherwise false
*/ */
private static final long serialVersionUID = 4162988113957743877L; void setStrictness(boolean strictness);
public enum InfeasibilityImpossibleCause {
NO_PROBLEMATIC_RESOURCE, NO_INFEASIBLE_ARRANGEMENT;
public String message() {
switch (this) {
case NO_PROBLEMATIC_RESOURCE:
return "No resource allows for an infeasible arrangement of nodes.";
case NO_INFEASIBLE_ARRANGEMENT:
return "The layer structure does not allow for an infeasible arrangement of problematic nodes.";
}
throw new UnsupportedOperationException(this.toString());
}
}
public final InfeasibilityImpossibleCause cause;
public InfeasibilityImpossibleException(InfeasibilityImpossibleCause cause) {
super(cause.message());
this.cause = cause;
}
} }
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
package graphgen.generator.components.edges; package graphgen.generator.components.edges;
import graphgen.generator.components.Initializable; import graphgen.generator.components.GeneratorComponent;
import graphgen.graph.LayerStructure; import graphgen.graph.LayerStructure;
import graphgen.graph.ResourceNode; import graphgen.graph.ResourceNode;
...@@ -29,7 +29,7 @@ import java.util.Map; ...@@ -29,7 +29,7 @@ import java.util.Map;
* *
* @author Sebastian Vollbrecht * @author Sebastian Vollbrecht
*/ */
public interface EdgeCreationComponent extends Initializable { public interface EdgeCreationComponent extends GeneratorComponent {
/** /**
* Sets the layer structure of the implementing class, which can be used optionally for different purposes, such as * Sets the layer structure of the implementing class, which can be used optionally for different purposes, such as
......
...@@ -18,12 +18,13 @@ ...@@ -18,12 +18,13 @@
package graphgen.generator.components.edges; package graphgen.generator.components.edges;
import graphgen.datastructures.SeededRandom; import graphgen.datastructures.SeededRandom;
import graphgen.enums.EdgeValue;
import graphgen.generator.GraphGenerator; import graphgen.generator.GraphGenerator;
import graphgen.generator.components.StrictComponent;
import graphgen.generator.components.edges.computers.ValueComputer; import graphgen.generator.components.edges.computers.ValueComputer;
import graphgen.generator.components.edges.includers.EdgeIncluder; import graphgen.generator.components.edges.includers.EdgeIncluder;
import graphgen.generator.components.properties.Property; import graphgen.generator.components.properties.Property;
import graphgen.generator.exceptions.IllegalEdgeException; import graphgen.generator.exceptions.IllegalEdgeException;
import graphgen.generator.exceptions.StrictModeException;
import graphgen.graph.LayerStructure; import graphgen.graph.LayerStructure;
import graphgen.graph.ResourceNode; import graphgen.graph.ResourceNode;
import graphgen.observer.Observable; import graphgen.observer.Observable;
...@@ -46,7 +47,7 @@ import java.util.Set; ...@@ -46,7 +47,7 @@ import java.util.Set;
* @author Sebastian Vollbrecht * @author Sebastian Vollbrecht
* @see ValueComputer * @see ValueComputer
*/ */
public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeCreationComponent { public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeCreationComponent, StrictComponent {
private final ValueComputer edgeDelayComputer; private final ValueComputer edgeDelayComputer;
private final ValueComputer backedgeDelayComputer; private final ValueComputer backedgeDelayComputer;
...@@ -62,7 +63,6 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC ...@@ -62,7 +63,6 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC
private LayerStructure layers; private LayerStructure layers;
private Map<ResourceNode, Integer> asapTimes; private Map<ResourceNode, Integer> asapTimes;
private boolean strict;
/** /**
* Constructs a new edge creator from the given value computers and the given edge includer. * Constructs a new edge creator from the given value computers and the given edge includer.
...@@ -86,6 +86,10 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC ...@@ -86,6 +86,10 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC
this.incomingEdges = new HashMap<>(); this.incomingEdges = new HashMap<>();
this.incomingBackedges = new HashMap<>(); this.incomingBackedges = new HashMap<>();
this.edgeDelayComputer.setEdgeValue(EdgeValue.EDGE_DELAY);
this.backedgeDelayComputer.setEdgeValue(EdgeValue.BACKEDGE_DELAY);
this.backedgeDistanceComputer.setEdgeValue(EdgeValue.BACKEDGE_DISTANCE);
} }
/** /**
...@@ -98,8 +102,6 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC ...@@ -98,8 +102,6 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC
* @return the created edge * @return the created edge
* @throws IllegalEdgeException if the delay is less than 0 or if the edge is {@link #isEdgeValid(ResourceNode, * @throws IllegalEdgeException if the delay is less than 0 or if the edge is {@link #isEdgeValid(ResourceNode,
* ResourceNode) invalid} * ResourceNode) invalid}
* @throws StrictModeException if the edge creator is in strict mode and any of the preventive measures specified
* in the {@link #setStrict(boolean)}-method isn't met
*/ */
public Edge<ResourceNode> createEdge(ResourceNode src, ResourceNode dst, int delay) { public Edge<ResourceNode> createEdge(ResourceNode src, ResourceNode dst, int delay) {
...@@ -109,26 +111,16 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC ...@@ -109,26 +111,16 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC
if (!isEdgeValid(src, dst)) if (!isEdgeValid(src, dst))
throw new IllegalEdgeException(src, dst, false); throw new IllegalEdgeException(src, dst, false);
if (strict) { Edge<ResourceNode> edge = new Edge<>(src, dst, delay, 0);
int previouslyComputedDelay = computeEdgeDelay(src, dst);
if (previouslyComputedDelay != delay) { if (src != GraphGenerator.SOURCE && dst != GraphGenerator.SINK) {
throw new StrictModeException( notifyObservers(edge);
"The edge's delay must not deviate from the previously computed delay of " + previouslyComputedDelay + ".");
}
} }
Edge<ResourceNode> edge = new Edge<>(src, dst, delay, 0);
edges.add(edge); edges.add(edge);
outgoingEdges.get(src).add(edge); outgoingEdges.get(src).add(edge);
incomingEdges.get(dst).add(edge); incomingEdges.get(dst).add(edge);
if (src != GraphGenerator.SOURCE && dst != GraphGenerator.SINK) {
notifyObservers(edge);
}
return edge; return edge;
} }
...@@ -143,8 +135,6 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC ...@@ -143,8 +135,6 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC
* @return the created backedge * @return the created backedge
* @throws IllegalEdgeException if the delay is less than 0, if the distance is not greater than 0 or if it is * @throws IllegalEdgeException if the delay is less than 0, if the distance is not greater than 0 or if it is
* {@link #isBackedgeValid(ResourceNode, ResourceNode) invalid} * {@link #isBackedgeValid(ResourceNode, ResourceNode) invalid}
* @throws StrictModeException if the edge creator is in strict mode and any of the preventive measures specified
* in the {@link #setStrict(boolean)}-method isn't met
*/ */
public Edge<ResourceNode> createBackedge(ResourceNode src, ResourceNode dst, int delay, int distance) { public Edge<ResourceNode> createBackedge(ResourceNode src, ResourceNode dst, int delay, int distance) {
...@@ -157,33 +147,16 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC ...@@ -157,33 +147,16 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC
if (!isBackedgeValid(src, dst)) if (!isBackedgeValid(src, dst))
throw new IllegalEdgeException(src, dst, true); throw new IllegalEdgeException(src, dst, true);
if (strict) { Edge<ResourceNode> edge = new Edge<>(src, dst, delay, distance);
int previouslyComputedDelay = computeBackedgeDelay(src, dst);
if (previouslyComputedDelay != delay) {
throw new StrictModeException(
"The backedge's delay must not deviate from the previously computed delay of " + previouslyComputedDelay + ".");
}
int previouslyComputedDistance = computeBackedgeDistance(src, dst);
if (previouslyComputedDistance != distance) { if (src != GraphGenerator.SOURCE && dst != GraphGenerator.SINK) {
throw new StrictModeException( notifyObservers(edge);
"The backedge's distance must not deviate from the previously computed distance of " + previouslyComputedDistance + ".");
}
} }
Edge<ResourceNode> edge = new Edge<>(src, dst, delay, distance);
edges.add(edge); edges.add(edge);
outgoingBackedges.get(src).add(edge); outgoingBackedges.get(src).add(edge);
incomingBackedges.get(dst).add(edge); incomingBackedges.get(dst).add(edge);
if (src != GraphGenerator.SOURCE && dst != GraphGenerator.SINK) {
notifyObservers(edge);
}
return edge; return edge;
} }
...@@ -347,18 +320,11 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC ...@@ -347,18 +320,11 @@ public class EdgeCreator extends Observable<Edge<ResourceNode>> implements EdgeC
} }
/** @Override
* Toggles strict mode, allowing or disallowing deviations of specified parameters. public void setStrictness(boolean strictness) {
* <p> edgeDelayComputer.setStrictness(strictness);
* In strict mode, an edge can only be created if its delay matches a previously computed delay (via {@link backedgeDelayComputer.setStrictness(strictness);
* #computeEdgeDelay(ResourceNode, ResourceNode)}). If this hasn't been done, the method will be called to obtain a backedgeDistanceComputer.setStrictness(strictness);
* 'previously' computed delay. If the delays differ, the edge creation will be disallowed, resulting in a {@link
* StrictModeException} being thrown. (analogously: distances and backedges).
*
* @param strict true to disallow deviations, false to allow deviations
*/
public void setStrict(boolean strict) {
this.strict = strict;
} }
/** /**
......
...@@ -17,8 +17,13 @@ ...@@ -17,8 +17,13 @@
package graphgen.generator.components.edges.computers; package graphgen.generator.components.edges.computers;
import graphgen.enums.EdgeValue;
import graphgen.generator.components.StrictComponent;
import graphgen.generator.components.edges.EdgeCreationComponent; import graphgen.generator.components.edges.EdgeCreationComponent;
import graphgen.generator.exceptions.StrictModeException;
import graphgen.graph.ResourceNode; import graphgen.graph.ResourceNode;
import graphgen.observer.Observer;
import modsched.Edge;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -29,7 +34,7 @@ import java.util.Map; ...@@ -29,7 +34,7 @@ import java.util.Map;
* *
* @author Sebastian Vollbrecht * @author Sebastian Vollbrecht
*/ */
public abstract class ValueComputer implements EdgeCreationComponent { public abstract class ValueComputer implements EdgeCreationComponent, StrictComponent, Observer<Edge<ResourceNode>> {
/* /*
* Maps source nodes to destination nodes and their computed edge values, since * Maps source nodes to destination nodes and their computed edge values, since
...@@ -38,6 +43,8 @@ public abstract class ValueComputer implements EdgeCreationComponent { ...@@ -38,6 +43,8 @@ public abstract class ValueComputer implements EdgeCreationComponent {
* differ later on during the edge creation phase. * differ later on during the edge creation phase.
*/ */
private final Map<ResourceNode, Map<ResourceNode, Integer>> computedEdgeValues; private final Map<ResourceNode, Map<ResourceNode, Integer>> computedEdgeValues;
private boolean isStrict;
private EdgeValue edgeValue;
protected ValueComputer() { protected ValueComputer() {
this.computedEdgeValues = new HashMap<>(); this.computedEdgeValues = new HashMap<>();
...@@ -50,7 +57,7 @@ public abstract class ValueComputer implements EdgeCreationComponent { ...@@ -50,7 +57,7 @@ public abstract class ValueComputer implements EdgeCreationComponent {
* @param dst the edge's destination node * @param dst the edge's destination node
* @return the value of the edge * @return the value of the edge
*/ */
public int getValue(ResourceNode src, ResourceNode dst) { public final int getValue(ResourceNode src, ResourceNode dst) {
if (computedEdgeValues.containsKey(src) && computedEdgeValues.get(src).containsKey(dst)) if (computedEdgeValues.containsKey(src) && computedEdgeValues.get(src).containsKey(dst))
return computedEdgeValues.get(src).get(dst); return computedEdgeValues.get(src).get(dst);
...@@ -70,6 +77,39 @@ public abstract class ValueComputer implements EdgeCreationComponent { ...@@ -70,6 +77,39 @@ public abstract class ValueComputer implements EdgeCreationComponent {
implementedReset(); implementedReset();
} }
/**
* In strict mode, an edge can only be created if its value matches a previously computed value (via {@link
* #getValue(ResourceNode, ResourceNode)}). If the value of a created edge differs from the computed value, the edge
* creation will be disallowed, resulting in a {@link StrictModeException} being thrown.
*
* @param strictness true to disallow deviations, false to allow deviations
*/
@Override
public final void setStrictness(boolean strictness) {
this.isStrict = strictness;
}
@Override
public final void notify(Edge<ResourceNode> edge) {
if (isStrict) {
int previouslyComputedValue = getValue(edge.getSrc(), edge.getDst());
if (previouslyComputedValue != edgeValue.getEdgeValue(edge)) {
throw new StrictModeException(
"The edge's value must not deviate from the previously computed delay of " + previouslyComputedValue + ".");
}
}
}
/**
* Tells the value computer which value it is actually computing. This edge value is then used used to determine (in
* strict mode) whether or not a created edge is illegal.
*/
public final void setEdgeValue(EdgeValue edgeValue) {
this.edgeValue = edgeValue;
}
/** /**
* Computes the edge value of the edge connecting the source node to the destination node. * Computes the edge value of the edge connecting the source node to the destination node.
* *
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package graphgen.generator.components.edges.includers; package graphgen.generator.components.edges.includers;
import graphgen.generator.components.StrictComponent;
import graphgen.generator.components.edges.EdgeCreationComponent; import graphgen.generator.components.edges.EdgeCreationComponent;
import graphgen.generator.exceptions.StrictModeException; import graphgen.generator.exceptions.StrictModeException;
import graphgen.graph.ResourceNode; import graphgen.graph.ResourceNode;
...@@ -31,15 +32,14 @@ import java.util.Map; ...@@ -31,15 +32,14 @@ import java.util.Map;
* *
* @author Sebastian Vollbrecht * @author Sebastian Vollbrecht
*/ */
public abstract class EdgeIncluder implements EdgeCreationComponent, Observer<Edge<ResourceNode>> { public abstract class EdgeIncluder implements EdgeCreationComponent, StrictComponent, Observer<Edge<ResourceNode>> {
private final Map<Edge<ResourceNode>, Boolean> decidedEdgeInclusions; private final Map<Edge<ResourceNode>, Boolean> decidedEdgeInclusions;
private boolean strict; private boolean isStrict;
protected EdgeIncluder() { protected EdgeIncluder() {
this.decidedEdgeInclusions = new HashMap<>(); this.decidedEdgeInclusions = new HashMap<>();
this.strict = false;
} }
/** /**
...@@ -69,27 +69,21 @@ public abstract class EdgeIncluder implements EdgeCreationComponent, Observer<Ed ...@@ -69,27 +69,21 @@ public abstract class EdgeIncluder implements EdgeCreationComponent, Observer<Ed
} }
/** /**
* Toggles strict mode, allowing or disallowing deviations of specified parameters. * In strict mode, an edge can only be created if the includer allows so. If an edge is created although the
* <p>
* In strict mode, an edge can only be created if the includer allows so. If an edge is included although the
* includer disallowed doing it, a {@link StrictModeException} will be thrown. * includer disallowed doing it, a {@link StrictModeException} will be thrown.
* *
* @param strict true to disallow deviations, false to allow deviations * @param strictness true to disallow deviations, false to allow deviations
*/ */
public void setStrict(boolean strict) { @Override
this.strict = strict; public final void setStrictness(boolean strictness) {
this.isStrict = strictness;
} }
@Override @Override
public void notify(Edge<ResourceNode> edge) { public final void notify(Edge<ResourceNode> edge) {
if (strict) { if (isStrict) {
boolean decision; boolean decision = decidedEdgeInclusions.getOrDefault(edge, includeEdge(edge));
if (!decidedEdgeInclusions.containsKey(edge)) {
decision = includeEdge(edge);
} else {
decision = decidedEdgeInclusions.get(edge);
}
if (!decision) { if (!decision) {
throw new StrictModeException( throw new StrictModeException(
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
package graphgen.generator.components.edges.util.folding; package graphgen.generator.components.edges.util.folding;
import graphgen.generator.components.Initializable; import graphgen.generator.components.GeneratorComponent;
import java.util.List; import java.util.List;
...@@ -26,7 +26,7 @@ import java.util.List; ...@@ -26,7 +26,7 @@ import java.util.List;
* *
* @author Sebastian Vollbrecht * @author Sebastian Vollbrecht
*/ */
public interface FoldingStrategy<T> extends Initializable { public interface FoldingStrategy<T> extends GeneratorComponent {
/** /**
* Folds a list of values into one single v