private GetTruthValue ( int index ) : double | ||
index | int | |
Résultat | double |
/// <summary> /// Asserts the truth values from the given fuzzy set. /// </summary> /// <param name="inputSet">the FuzzySet object to be used for the assertion</param> internal virtual void Assert(FuzzySet inputSet) { for (int i = 0; i < Constants.FUZZY_MAXVALUES; ++i) { if (mdTruthVector[i] > inputSet.GetTruthValue(i)) { mdTruthVector[i] = inputSet.GetTruthValue(i); } } }
/// <summary> /// Copies the truth values from the given fuzzy set. /// </summary> /// <param name="inputSet">the FuzzySet object to be copied</param> internal virtual void Copy(FuzzySet inputSet) { for (int i = 0; i < Constants.FUZZY_MAXVALUES; ++i) { mdTruthVector[i] = inputSet.GetTruthValue(i); } mbSetEmpty = false; }
/// <summary> /// Correlates the working set with the given input set using the given /// correlation method and truth value. /// </summary> /// <param name="inputSet">the FuzzySet object that contains the fuzzy set to be /// correlated with</param> /// <param name="corrMethod">the integer that represents the correlation method</param> /// <param name="truthValue">the double truth value</param> internal virtual void CorrelateWith(FuzzySet inputSet, EnumFuzzyCorrelationMethod corrMethod, double truthValue) { switch (corrMethod) { case EnumFuzzyCorrelationMethod.Minimise: for (int i = 0; i < Constants.FUZZY_MAXVALUES; ++i) { if (truthValue <= inputSet.GetTruthValue(i)) { mdTruthVector[i] = truthValue; } else { mdTruthVector[i] = inputSet.GetTruthValue(i); } } break; case EnumFuzzyCorrelationMethod.Product: for (int i = 0; i < Constants.FUZZY_MAXVALUES; ++i) { mdTruthVector[i] = (inputSet.GetTruthValue(i) * truthValue); } break; } }