@@ -0,0 +1,1481 @@
+package graph.util;%0A%0Aimport graph.Graph;%0A%0Aimport java.util.List;%0A%0A/**%0A * Created by robert on 02.04.17.%0A */%0Apublic class BipartiteRegularGraphGenerator extends RegularGraphGenerator %7B%0A    private static final String INVALID_DEGREE_CEIL = %22Number of vertices must be at least two times greater than degree.%22;%0A%0A    private static BipartiteRegularGraphGenerator instance = new BipartiteRegularGraphGenerator();%0A%0A    public static BipartiteRegularGraphGenerator getInstance() %7B%0A        return instance;%0A    %7D%0A%0A    protected BipartiteRegularGraphGenerator() %7B%7D%0A%0A    @Override%0A    public %3CG extends Graph%3E G getRandomGraph(Class%3CG%3E clazz,%0A                                                   int verticesNumber, int degree, ALGORITHMS algorithms) throws IllegalArgumentException %7B%0A        if (!(verticesNumber %3E= 2*degree)) %7B%0A            throw new IllegalArgumentException(INVALID_DEGREE_CEIL);%0A        %7D%0A%0A        return super.getRandomGraph(clazz, verticesNumber, degree, algorithms);%0A    %7D%0A%0A    @Override%0A    protected boolean areSuitable(int a, int b, List%3CInteger%3E pairs, int verticesNumber, int degree) %7B%0A        int aGroup = getPointGroup(a, verticesNumber);%0A        int bGroup = getPointGroup(b, verticesNumber);%0A%0A        if (getGroupPartition(aGroup) == getGroupPartition(bGroup)) %7B%0A            return false;%0A        %7D%0A%0A        return super.areSuitable(a, b, pairs, verticesNumber, degree);%0A    %7D%0A%0A    protected int getGroupPartition(int group) %7B%0A        return group %25 2;%0A    %7D%0A%7D%0A

Add class.