private SemanticFrame sequentialSampling(SemanticFrame goldFrame, int[] goldlbids, SRLFeatureData sfd,
				 int p, TIntArrayList args) {
			// p is the predicate id, 1 to #frames
			
			SemanticFrame predict = new SemanticFrame(goldFrame);
			predict.arglbids = new int[goldlbids.length];
			for (int i = 0, L = predict.arglbids.length; i < L; ++i)
				predict.arglbids[i] = -1;
			
			// construct the bi-partite graph
			int N = args.size(), M = sfd.L;
			//System.out.println("N: " + N + " M: " + M);
			int T = N + M;
			boolean[] usedRel = new boolean[T];
			double[] score = new double[T];
			
			// sample mappings for argument
			for (int a = 0; a < N; ++a) {
				for (int r = 0; r < T; ++r) {
					if (usedRel[r]) {
						score[r] = -Double.MAX_VALUE;
					}
					else {
						score[r] = r < M ? sfd.getArcScore(goldFrame.predid, args.get(a), r) : nullWeight;
						if (addLoss)
							score[r] += loss(goldlbids[args.get(a)], r < M ? r : -1);
					}
				}
				int sample = samplePoint(score, usedRel);
				usedRel[sample] = true;

				// convert bi-partite graph to semantic frame
				predict.arglbids[args.get(a)] = sample < M ? sample : -1;
			}
			
			// no need to sample mappings for null node
			
			return predict;
		}