import java.util.*; class MWCQb extends MWCQ { MWCQb (int n,int[][]A,int[] degree,int[] weight,int style) { super(n,A,degree,weight,style); } void numberSort(ArrayList C,ArrayList ColOrd,ArrayList P,long[] cliqueWeight){ int colours = 0; int m = ColOrd.size(); long[] maxVertexWeight = new long[m]; // maxVertexWeight[k] the maximum weight of vertices in kth colour class long[] accumulatedWeight = new long[m]; // accumulatedWeight[i] = accumulatedWeight[i-1] + maxVertexWeight[i-1] for (int i=0;i 0 && weight[v] > weight[(int) colourClass[k].get(0)])) k++; colourClass[k].add(v); colours = Math.max(colours,k+1); maxVertexWeight[k] = Math.max(maxVertexWeight[k],weight[v]); } P.clear(); accumulatedWeight[0] = maxVertexWeight[0]; for (int k=1;k