public void ReloadConcepts() { conceptNames = new List <string>(); conceptDictionary = new TwoWayList <int, Fuzzy.Concept>(); displayFunctions = new List <bool>(); functionDictionary = new Dictionary <Fuzzy.Concept, TwoWayList <int, Fuzzy.Function> >(); //Fills the conceptDictionary container and gather the concept names for (int conceptKey = 0; conceptKey < _owner.ConceptList.Count; conceptKey++) { Fuzzy.Concept concept = _owner.ConceptList[conceptKey]; displayFunctions.Add(false); conceptNames.Add(concept.name); conceptDictionary.Add(conceptKey, concept); functionDictionary.Add(concept, new TwoWayList <int, Fuzzy.Function>()); //Fills the function two-way list of the current concept for (int j = 0; j < concept.Functions.Count; j++) { functionDictionary[concept].Add(j, concept.GetFunction(j)); } } }
public int GetFunctionIndexFromConcept(Fuzzy.Function function, Fuzzy.Concept inConcept) { if (inConcept.GetFunction(function)) { for (int i = 0; i < inConcept.Functions.Count; i++) { if (function.Equals(inConcept.Functions[i])) { return(i); } } } return(default(int)); }