Debian Codegraph @

Source/Reasoner/Classifier/CClassifierStatistics.cpp

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 #include "CClassifierStatistics.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Classifier {
29
30
31 CClassifierStatistics::CClassifierStatistics(CClassifierStatistics *nextClassificationStatistics) {
32 resetValues();
33 nextClassifStat = nextClassificationStatistics;
34 }
35
36
37 qint64 CClassifierStatistics::getPseudoModelMergedTestedSubsumptionCount() {
38 return pseudoModelSubsumTests;
39 }
40
41 qint64 CClassifierStatistics::getSubclassTestedSubsumptionCount() {
42 return subclassSubsumTests;
43 }
44
45 qint64 CClassifierStatistics::getSubclassIdentifierOccurTestedSubsumptionCount() {
46 return subclassIdOccSubsumTests;
47 }
48
49 qint64 CClassifierStatistics::getDerivatedTestedSubsumptionCount() {
50 return derivatedSubsumTests;
51 }
52
53 qint64 CClassifierStatistics::getCalculatedTestedSubsumptionCount() {
54 return calculatedSubsumTests;
55 }
56
57 qint64 CClassifierStatistics::getPrunedTestedSubsumptionCount() {
58 return prunedSubsumTests;
59 }
60
61 qint64 CClassifierStatistics::getToldSubsumptionCount() {
62 return toldSubsumTests;
63 }
64
65 qint64 CClassifierStatistics::getTestedSubsumptionCount() {
66 return getToldSubsumptionCount()+getPrunedTestedSubsumptionCount()+getDerivatedTestedSubsumptionCount()+getPseudoModelMergedTestedSubsumptionCount()+getSubclassTestedSubsumptionCount()+getSubclassIdentifierOccurTestedSubsumptionCount();
67 }
68
69
70 qint64 CClassifierStatistics::getPseudoModelMergedTestedSatisfiableCount() {
71 return pseudoModelSatisTests;
72 }
73
74 qint64 CClassifierStatistics::getDerivatedTestedSatisfiableCount() {
75 return derivatedSatisTests;
76 }
77
78 qint64 CClassifierStatistics::getCalculatedTestedSatisfiableCount() {
79 return calculatedSatisTests;
80 }
81
82 qint64 CClassifierStatistics::getPrunedTestedSatisfiableCount() {
83 return prunedSatisTests;
84 }
85
86 qint64 CClassifierStatistics::getTestedSatisfiableCount() {
87 return getToldSatisfiableCount()+getPrunedTestedSatisfiableCount()+getDerivatedTestedSatisfiableCount()+getPseudoModelMergedTestedSatisfiableCount();
88 }
89
90
91 qint64 CClassifierStatistics::getTotalSubsumptionTestCount() {
92 return totalSubsumTests;
93 }
94
95 qint64 CClassifierStatistics::getTotalSatisfiableCount() {
96 return totalSatisTests;
97 }
98
99 qint64 CClassifierStatistics::getToldSatisfiableCount() {
100 return toldSatisTests;
101 }
102
103 qint64 CClassifierStatistics::getPseudoModelMergedTestedDisjointCount() {
104 return pseudoModelDisjointTests;
105 }
106
107 qint64 CClassifierStatistics::getToldDisjointCount() {
108 return toldDisjointTests;
109 }
110
111 qint64 CClassifierStatistics::getCalculatedTestedDisjointCount() {
112 return calculatedDisjointTests;
113 }
114
115 CClassifierStatistics *CClassifierStatistics::incPseudoModelMergedTestedSubsumptionCount(qint64 incCount) {
116 pseudoModelSubsumTests += incCount;
117 if (nextClassifStat) {
118 nextClassifStat->incPseudoModelMergedTestedSubsumptionCount(incCount);
119 }
120 return this;
121 }
122
123 CClassifierStatistics *CClassifierStatistics::incSubclassTestedSubsumptionCount(qint64 incCount) {
124 subclassSubsumTests += incCount;
125 if (nextClassifStat) {
126 nextClassifStat->incSubclassTestedSubsumptionCount(incCount);
127 }
128 return this;
129 }
130
131 CClassifierStatistics *CClassifierStatistics::incDerivatedTestedSubsumptionCount(qint64 incCount) {
132 derivatedSubsumTests += incCount;
133 if (nextClassifStat) {
134 nextClassifStat->incDerivatedTestedSubsumptionCount(incCount);
135 }
136 return this;
137 }
138
139 CClassifierStatistics *CClassifierStatistics::incCalculatedTestedSubsumptionCount(qint64 incCount) {
140 calculatedSubsumTests += incCount;
141 if (nextClassifStat) {
142 nextClassifStat->incCalculatedTestedSubsumptionCount(incCount);
143 }
144 return this;
145 }
146
147 CClassifierStatistics *CClassifierStatistics::incPrunedTestedSubsumptionCount(qint64 incCount) {
148 prunedSubsumTests += incCount;
149 if (nextClassifStat) {
150 nextClassifStat->incPrunedTestedSubsumptionCount(incCount);
151 }
152 return this;
153 }
154
155
156 CClassifierStatistics *CClassifierStatistics::incToldSubsumptionCount(qint64 incCount) {
157 toldSubsumTests += incCount;
158 if (nextClassifStat) {
159 nextClassifStat->incToldSubsumptionCount(incCount);
160 }
161 return this;
162 }
163
164
165 CClassifierStatistics *CClassifierStatistics::incPseudoModelMergedTestedSatisfiableCount(qint64 incCount) {
166 pseudoModelSatisTests += incCount;
167 if (nextClassifStat) {
168 nextClassifStat->incPseudoModelMergedTestedSatisfiableCount(incCount);
169 }
170 return this;
171 }
172
173 CClassifierStatistics *CClassifierStatistics::incDerivatedTestedSatisfiableCount(qint64 incCount) {
174 derivatedSatisTests += incCount;
175 if (nextClassifStat) {
176 nextClassifStat->incDerivatedTestedSatisfiableCount(incCount);
177 }
178 return this;
179 }
180
181 CClassifierStatistics *CClassifierStatistics::incCalculatedTestedSatisfiableCount(qint64 incCount) {
182 calculatedSatisTests += incCount;
183 if (nextClassifStat) {
184 nextClassifStat->incCalculatedTestedSatisfiableCount(incCount);
185 }
186 return this;
187 }
188
189 CClassifierStatistics *CClassifierStatistics::incPrunedTestedSatisfiableCount(qint64 incCount) {
190 prunedSatisTests += incCount;
191 if (nextClassifStat) {
192 nextClassifStat->incPrunedTestedSatisfiableCount(incCount);
193 }
194 return this;
195 }
196
197
198 CClassifierStatistics *CClassifierStatistics::incTotalSubsumptionTestCount(qint64 incCount) {
199 totalSubsumTests += incCount;
200 if (nextClassifStat) {
201 nextClassifStat->incTotalSubsumptionTestCount(incCount);
202 }
203 return this;
204 }
205
206 CClassifierStatistics *CClassifierStatistics::incTotalSatisfiableTestCount(qint64 incCount) {
207 totalSatisTests += incCount;
208 if (nextClassifStat) {
209 nextClassifStat->incTotalSatisfiableTestCount(incCount);
210 }
211 return this;
212 }
213
214
215 CClassifierStatistics *CClassifierStatistics::incToldSatisfiableCount(qint64 incCount) {
216 toldSatisTests += incCount;
217 if (nextClassifStat) {
218 nextClassifStat->incToldSatisfiableCount(incCount);
219 }
220 return this;
221 }
222
223
224 CClassifierStatistics *CClassifierStatistics::incPseudoModelMergedTestedDisjointCount(qint64 incCount) {
225 pseudoModelDisjointTests += incCount;
226 if (nextClassifStat) {
227 nextClassifStat->incPseudoModelMergedTestedDisjointCount(incCount);
228 }
229 return this;
230 }
231
232 CClassifierStatistics *CClassifierStatistics::incToldDisjointCount(qint64 incCount) {
233 toldDisjointTests += incCount;
234 if (nextClassifStat) {
235 nextClassifStat->incToldDisjointCount(incCount);
236 }
237 return this;
238 }
239
240 CClassifierStatistics *CClassifierStatistics::incCalculatedTestedDisjointCount(qint64 incCount) {
241 calculatedDisjointTests += incCount;
242 if (nextClassifStat) {
243 nextClassifStat->incCalculatedTestedDisjointCount(incCount);
244 }
245 return this;
246 }
247
248 CClassifierStatistics *CClassifierStatistics::incSubclassIdentifierOccurTestedSubsumptionCount(qint64 incCount) {
249 subclassIdOccSubsumTests += incCount;
250 if (nextClassifStat) {
251 nextClassifStat->incSubclassIdentifierOccurTestedSubsumptionCount(incCount);
252 }
253 return this;
254 }
255
256 CClassifierStatistics *CClassifierStatistics::resetValues() {
257 pseudoModelSubsumTests = 0;
258 subclassSubsumTests = 0;
259 derivatedSubsumTests = 0;
260 calculatedSubsumTests = 0;
261 prunedSubsumTests = 0;
262 pseudoModelSatisTests = 0;
263 derivatedSatisTests = 0;
264 calculatedSatisTests = 0;
265 prunedSatisTests = 0;
266 totalSubsumTests = 0;
267 totalSatisTests = 0;
268 toldSubsumTests = 0;
269 toldSatisTests = 0;
270 pseudoModelDisjointTests = 0;
271 toldDisjointTests = 0;
272 calculatedDisjointTests = 0;
273 subclassIdOccSubsumTests = 0;
274 return this;
275 }
276
277
278 CClassifierStatistics *CClassifierStatistics::appendStatistics(CClassifierStatistics *statistics) {
279 pseudoModelSubsumTests += statistics->getPseudoModelMergedTestedSubsumptionCount();
280 subclassSubsumTests += statistics->getSubclassTestedSubsumptionCount();
281 derivatedSubsumTests += statistics->getDerivatedTestedSubsumptionCount();
282 calculatedSubsumTests += statistics->getCalculatedTestedSubsumptionCount();
283 prunedSubsumTests += statistics->getPrunedTestedSubsumptionCount();
284 pseudoModelSatisTests += statistics->getPseudoModelMergedTestedSatisfiableCount();
285 derivatedSatisTests += statistics->getDerivatedTestedSatisfiableCount();
286 calculatedSatisTests += statistics->getCalculatedTestedSatisfiableCount();
287 prunedSatisTests += statistics->getPrunedTestedSatisfiableCount();
288 totalSubsumTests += statistics->getTotalSubsumptionTestCount();
289 totalSatisTests += statistics->getTotalSatisfiableCount();
290 toldSubsumTests += statistics->getToldSubsumptionCount();
291 toldSatisTests += statistics->getToldSatisfiableCount();
292 pseudoModelDisjointTests += statistics->getPseudoModelMergedTestedDisjointCount();
293 toldDisjointTests += statistics->getToldDisjointCount();
294 calculatedDisjointTests += statistics->getCalculatedTestedDisjointCount();
295 subclassIdOccSubsumTests += statistics->getSubclassIdentifierOccurTestedSubsumptionCount();
296 return this;
297 }
298
299
300 }; // end namespace Classifier
301
302 }; // end namespace Reasoner
303
304 }; // end namespace Konclude