Debian Codegraph @

Source/Reasoner/Kernel/Algorithm/CSatisfiableTaskSaturationOccurrenceStatisticsCollector.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_KERNEL_ALGORITHM_CSATISFIABLETASKSATURATIONOCCURRENCESTATISTICSCOLLECTOR_H
22 #define KONCLUDE_REASONER_KERNEL_ALGORITHM_CSATISFIABLETASKSATURATIONOCCURRENCESTATISTICSCOLLECTOR_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "CCalculationAlgorithmContext.h"
29
30 // Other includes
31 #include "Reasoner/Kernel/Cache/COccurrenceStatisticsCacheWriter.h"
32
33 #include "Reasoner/Kernel/Task/CSatisfiableCalculationTask.h"
34 #include "Reasoner/Kernel/Task/CSaturationTaskData.h"
35
36 #include "Reasoner/Ontology/CConceptProcessData.h"
37 #include "Reasoner/Ontology/CIndividualProcessData.h"
38 #include "Reasoner/Ontology/CConceptSaturationReferenceLinkingData.h"
39
40 // Logger includes
41 #include "Logger/CLogger.h"
42
43
44
45
46 namespace Konclude {
47
48 namespace Reasoner {
49
50 using namespace Ontology;
51
52 namespace Kernel {
53
54 using namespace Task;
55
56 namespace Algorithm {
57
58 /*!
59 *
60 * \class CSatisfiableTaskSaturationOccurrenceStatisticsCollector
61 * \author Andreas Steigmiller
62 * \version 0.1
63 * \brief TODO
64 *
65 */
66 class CSatisfiableTaskSaturationOccurrenceStatisticsCollector {
67 // public methods
68 public:
69 //! Constructor
70 CSatisfiableTaskSaturationOccurrenceStatisticsCollector(COccurrenceStatisticsCacheWriter* occStatsCacheWriter);
71
72 //! Destructor
73 virtual ~CSatisfiableTaskSaturationOccurrenceStatisticsCollector();
74
75
76 bool analyseSatisfiableTask(CSatisfiableCalculationTask* statCalcTask, CCalculationAlgorithmContext* calcAlgContext);
77
78
79 // protected methods
80 protected:
81
82
83 bool collectOccurrenceStatistics(CProcessingDataBox* processingDataBox, CCalculationAlgorithmContext* calcAlgContext);
84 CIndividualSaturationProcessNode* getSuccessorNode(CConceptSaturationDescriptor* conDes, CIndividualSaturationProcessNode* satNode, CCalculationAlgorithmContext* calcAlgContext);
85 bool visitNodeSuccessors(CIndividualSaturationProcessNode* satNode,
86 bool visitedExistentialSuccessessors, bool visitNominalSuccessors, bool visitDataSuccessors, bool analyseConcepts, bool analyseSuccessorLinks,
87 function<bool(CIndividualSaturationProcessNode* succNode, cint64 succId)> visitSuccNodeFunc, function<bool(CRole* role, bool inversed)> visitSuccRoleFunc, CCalculationAlgorithmContext* calcAlgContext);
88
89 bool collectConceptOccurrenceStatistics(CIndividualSaturationProcessNode* indiNode, CCalculationAlgorithmContext* calcAlgContext);
90
91
92 // protected variables
93 protected:
94 COccurrenceStatisticsCacheWriter* mOccStatsCacheWriter;
95 cint64 mOntologyTag;
96 CConcreteOntology* mOntology;
97
98 cint64 mCollectedOccStatsNodeCount;
99 cint64 mCollectedOccStatsSuccNodeCount;
100 cint64 mCollectedOccStatsConceptCount;
101 cint64 mCollectedOccStatsRoleCount;
102
103 // private methods
104 private:
105
106 // private variables
107 private:
108
109 };
110
111 }; // end namespace Algorithm
112
113 }; // end namespace Kernel
114
115 }; // end namespace Reasoner
116
117 }; // end namespace Konclude
118
119 #endif // KONCLUDE_REASONER_KERNEL_ALGORITHM_CSATISFIABLETASKSATURATIONOCCURRENCESTATISTICSCOLLECTOR_H