コード例 #1
0
        private void PrepareKnowledgeBaseManager()
        {
            // Implication rule manager
            ImplicationRuleParser           ruleParser   = new ImplicationRuleParser();
            ImplicationRuleCreator          ruleCreator  = new ImplicationRuleCreator(ruleParser);
            DatabaseImplicationRuleProvider ruleProvider = new DatabaseImplicationRuleProvider(
                _profileRepository,
                ruleCreator);
            ImplicationRuleManager implicationRuleManager = new ImplicationRuleManager(ruleProvider);

            // Linguistic variable manager
            MembershipFunctionParser           membershipFunctionParser   = new MembershipFunctionParser();
            LinguisticVariableParser           linguisticVariableParser   = new LinguisticVariableParser(membershipFunctionParser);
            MembershipFunctionCreator          membershipFunctionCreator  = new MembershipFunctionCreator();
            LinguisticVariableCreator          linguisticVariableCreator  = new LinguisticVariableCreator(membershipFunctionCreator, linguisticVariableParser);
            DatabaseLinguisticVariableProvider linguisticVariableProvider = new DatabaseLinguisticVariableProvider(
                _profileRepository,
                linguisticVariableCreator);
            LinguisticVariableManager linguisticVariableManager = new LinguisticVariableManager(linguisticVariableProvider);

            // Knowledge base manager
            FileOperations fileOperations = new FileOperations();
            FileValidationOperationResultLogger fileValidationOperationResultLogger = new FileValidationOperationResultLogger(fileOperations);
            KnowledgeBaseValidator knowledgeBaseValidator = new KnowledgeBaseValidator();
            LinguisticVariableRelationsInitializer relationsInitializer = new LinguisticVariableRelationsInitializer();

            _knowledgeBaseManager = new KnowledgeBaseManager(
                implicationRuleManager,
                linguisticVariableManager,
                knowledgeBaseValidator,
                relationsInitializer,
                fileValidationOperationResultLogger);
        }
コード例 #2
0
        private void PrepareLinguisticVariableManager()
        {
            MembershipFunctionParser  membershipFunctionParser  = new MembershipFunctionParser();
            LinguisticVariableParser  linguisticVariableParser  = new LinguisticVariableParser(membershipFunctionParser);
            MembershipFunctionCreator membershipFunctionCreator = new MembershipFunctionCreator();
            LinguisticVariableCreator linguisticVariableCreator = new LinguisticVariableCreator(membershipFunctionCreator, linguisticVariableParser);

            DatabaseLinguisticVariableProvider linguisticVariableProvider = new DatabaseLinguisticVariableProvider(
                _profileRepository,
                linguisticVariableCreator);

            _linguisticVariableManager = new LinguisticVariableManager(linguisticVariableProvider);
        }
コード例 #3
0
 public void SetUp()
 {
     _membershipFunctionCreator = new MembershipFunctionCreator();
 }