public EvolvingGraph randomSample(){
		EvolvingGraph sample = new EvolvingGraph(this.sampleSize);
		int T = this.original.getMaxTime();
		int numOfSamples = 0;
		Random generator = new Random();
		int newSample;
		int NNodes = this.original.getNumOfNodes();
		this.sampledNodes = new ArrayList<Integer>();
		// Get the indices for the samples
		while(numOfSamples < sampleSize){
			newSample = generator.nextInt(NNodes);
			if (this.sampledNodes.indexOf(newSample) == -1){
				this.sampledNodes.add(newSample);
				numOfSamples++;
			}
		}
		sample.setMaxTime(T);
		//Integer[] tmp = (Integer[])sampledNodes.toArray(new Integer[sampledNodes.size()]); /convert set to array
		Edge uv, vu;
		Schedule sched, schedc;
		for(int i = 0; i < sampledNodes.size() ; i++){
			for (int j = i+1 ; j < sampledNodes.size() ; j++){
				uv = null;
				vu = null;
				sched = new Schedule();
				schedc = new Schedule();
				uv = original.getEdge(sampledNodes.get(i).intValue(), sampledNodes.get(j).intValue());
				vu = original.getEdge(sampledNodes.get(j).intValue(), sampledNodes.get(i).intValue());
				if (uv != null && vu != null) {
					sched = uv.getSchedule();
					schedc = vu.getSchedule();
					sample.createEdge(i, j, sched, 0);
					sample.createEdge(j, i, schedc, 0);
				}
			}
		}

		return sample;
	}