class ClosedSequenceMiner {

	public Set<FrequentSequence> mineClosedSequences(TaskMonitor monitor) {
		globallyFrequentItems = database.getGloballyFrequentItems(minSupport);
		monitor.setMaximum(globallyFrequentItems.size());
		for (FrequentSequenceItem gfItem : globallyFrequentItems) {
			if (monitor.isCancelled()) {
				break;
			}
			monitor.incrementProgress(1);
			List<SequenceItem> singletonFrequentItem = new ArrayList<SequenceItem>();
			singletonFrequentItem.add(gfItem.getItem());
			ProjectedDatabase projectedDatabase =
				new ProjectedDatabase(database, singletonFrequentItem);
			Set<FrequentSequenceItem> backwardExtensionItems =
				projectedDatabase.getBackwardExtensionItems();
			if (backwardExtensionItems.size() == 0) {
				bide(projectedDatabase, monitor);
			}
		}
		return frequentClosedSequences;
	}

	public  ClosedSequenceMiner(SequenceDatabase database, int minSupport);

}