public static TreeMap<String,ArrayList<Integer>> SplitAttribute(Table table, String attribute) {
		int attrSize = table.RowSize();
		int attrIndex = table.GetAttributeIndex(attribute);
		if (attrIndex==-1) return null;

		// treemap contains subsets of Attribute splitted by TargetAttribute
		TreeMap<String,ArrayList<Integer>> attributeIndexes= new TreeMap<String,ArrayList<Integer>>();
		
		for (int row=0; row<attrSize; row++) {
			String SplitValue = table.GetCellContent(attrIndex, row);
			// initial construction of subset for given spit value
			if (!attributeIndexes.containsKey(SplitValue)) {
				ArrayList<Integer> indexes = new ArrayList<Integer>();
				indexes.add(row);
				attributeIndexes.put(SplitValue, indexes);
			// add more values to the subset
			} else {
				ArrayList<Integer> indexes = attributeIndexes.get(SplitValue);
				indexes.add(row);
			}
		}
		
		return attributeIndexes;
	}