//given a changed configuration, check if that configuration was in TRIPLE_LIST before static bool doesExistInScoreList(Configuration input) { for (int counter = 0; counter < TRIPLET_LIST.Count; counter++) { bool exists = true; Triplet tempTrip = new Triplet(); tempTrip.setEqualTo(TRIPLET_LIST[counter]); List<Item> tripOptionList = tempTrip.getChangedConf().getItemList(); List<Item> inputOptionList = input.getItemList(); for (int a = 0; a < inputOptionList.Count; a++) { if (!doesExist(tripOptionList, inputOptionList[a])) exists = false; } if (exists) return true; } return false; }
public void setEqualTo(Triplet param1) { setChangedConf(param1.getChangedConf()); setOriginalConf(param1.getOriginalConf()); setScore(param1.getScore()); }