Debian Codegraph @

Source/Reasoner/Classifier/CPartialPruningTaxonomy.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_REASONER_CLASSIFIER_CPARTIALPRUNINGTAXONOMY_H
22 #define KONCLUDE_REASONER_CLASSIFIER_CPARTIALPRUNINGTAXONOMY_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ClassifierSettings.h"
29 #include "CPartialPruningHierarchyNode.h"
30 #include "CClassifierStatistics.h"
31
32 // Other includes
33 #include "Reasoner/Taxonomy/CTaxonomy.h"
34
35 #include "Config/CConfigDataReader.h"
36 #include "Config/CConfigurationBase.h"
37
38 #include "KoncludeSettings.h"
39
40 // Logger includes
41 #include "Logger/CLogger.h"
42
43
44 namespace Konclude {
45
46 using namespace Config;
47
48 namespace Reasoner {
49
50 using namespace Taxonomy;
51
52 namespace Classifier {
53
54 #ifndef KONCLUDE_FORCE_ALL_DEBUG_DEACTIVATED
55
56 //#define DEBUGTESTTAXONOMYCONSITENCE
57
58 #endif
59
60 /*!
61 *
62 * \class CPartialPruningTaxonomy
63 * \author Andreas Steigmiller
64 * \version 0.1
65 * \brief TODO
66 *
67 */
68 class CPartialPruningTaxonomy : public CTaxonomy {
69 // public methods
70 public:
71 //! Constructor
72 CPartialPruningTaxonomy(CConcept *topConcept, CConcept *bottomConcept);
73
74 //! Destructor
75 virtual ~CPartialPruningTaxonomy();
76
77 virtual CPartialPruningTaxonomy *readConfig(CConfigurationBase *config);
78
79 virtual CTaxonomy *setConceptSatisfiable(CConcept *concept, bool satisfiable);
80 virtual CTaxonomy *setConceptSubsumption(CConcept *subsumerConcept, CConcept *subsumedConcept);
81 virtual CTaxonomy *setConceptNotSubsumption(CConcept *notSubsumerConcept, CConcept *notSubsumedConcept);
82
83 virtual CTaxonomy *setConceptDisjoints(CConcept *disjointConcept1, CConcept *disjointConcept2);
84
85
86 virtual CPartialPruningTaxonomy *createStatistics(CClassifierStatistics *nextClassificationStatistics);
87 void testSubsumptionStatistics(qint64 subsumCount);
88
89 virtual CTaxonomy *completeUnknownAsNonSubsumptions();
90
91 // protected methods
92 protected:
93 virtual CHierarchyNode *createHierarchyNode(CConcept *concept);
94 void testTaxonomyConsistence();
95
96
97
98 // protected variables
99 protected:
100 CClassifierStatistics *statistics;
101 bool confDerivateRelations;
102 bool confPruneRelations;
103
104 #ifdef DEBUGTESTTAXONOMYCONSITENCE
105 QString taxString;
106 #endif
107
108 CClassifierStatistics *testCompStatistics;
109
110
111 // private methods
112 private:
113
114 // private variables
115 private:
116
117 };
118
119 }; // end namespace Classifier
120
121 }; // end namespace Reasoner
122
123 }; // end namespace Konclude
124
125 #endif // KONCLUDE_REASONER_CLASSIFIER_CPARTIALPRUNINGTAXONOMY_H