コード例 #1
0
        public LinguisticVariableType GetLinguisticVariableType(LinguisticVariable variable)
        {
            LinguisticVariable variableInInputList = InputLinguisticVariables
                                                     .FirstOrDefault(curVariable => curVariable.Equals(variable));

            if (variableInInputList != null)
            {
                return(LinguisticVariableType.Input);
            }

            LinguisticVariable variableInOutputList = OutputLinguisticVariables
                                                      .FirstOrDefault(curVariable => curVariable.Equals(variable));

            if (variableInOutputList != null)
            {
                return(LinguisticVariableType.Output);
            }

            return(LinguisticVariableType.Undefined);
        }
コード例 #2
0
 public LinguisticVariable GetInputVariableByName(string name)
 {
     return(InputLinguisticVariables
            .FirstOrDefault(variable => variable.Name == name));
 }