use of org.batfish.symbolic.bdd.BDDNetwork in project batfish by batfish.
the class NetworkSlice method allSlices.
public static ArrayList<Supplier<NetworkSlice>> allSlices(DestinationClasses dcs, int fails) {
BDDNetwork network = BDDNetwork.create(dcs.getGraph());
ArrayList<Supplier<NetworkSlice>> classes = new ArrayList<>();
for (Entry<Set<String>, Tuple<HeaderSpace, Tuple<List<Prefix>, Boolean>>> entry : dcs.getHeaderspaceMap().entrySet()) {
Set<String> devices = entry.getKey();
HeaderSpace headerspace = entry.getValue().getFirst();
List<Prefix> prefixes = entry.getValue().getSecond().getFirst();
Boolean isDefaultCase = entry.getValue().getSecond().getSecond();
Supplier<NetworkSlice> sup = () -> AbstractionBuilder.createGraph(dcs, network, devices, headerspace, prefixes, fails, isDefaultCase);
classes.add(sup);
}
return classes;
}
Aggregations