Debian Codegraph @

Source/Reasoner/Kernel/Algorithm/CCalculationAlgorithmContext.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 "CCalculationAlgorithmContext.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Kernel {
29
30 namespace Algorithm {
31
32
33 CCalculationAlgorithmContext::CCalculationAlgorithmContext() {
34 mUsedProcessTagger = nullptr;
35 mUsedTempMemMan = nullptr;
36 mUsedPrTaskMemMan = nullptr;
37 mUsedProcessContext = nullptr;
38 mUsedProcessingDataBox = nullptr;
39 mUsedIndividualPriorityStrategy = nullptr;
40 mUsedConceptPriorityStrategy = nullptr;
41 mUsedSatCalcTask = nullptr;
42 mUsedTaskProcessorContext = nullptr;
43 mUsedTaskPriorityStrategy = nullptr;
44 mUsedProcessStatGath = nullptr;
45 mMinModificationAncestorDepth = 0;
46 mMinModificationIndividualID = 0;
47 mMinModificationUpdated = false;
48 mUsedBranchTreeNode = nullptr;
49 mUsedBaseDepNode = nullptr;
50 mUsedUnsatCacheHandler = nullptr;
51 mUsedIndividualNodeManager = nullptr;
52 mUsedClashDescriptorFactory = nullptr;
53 mUsedUnsatCachRetStrategy = nullptr;
54 mMaxCompletionGraphCachedIndiNodeID = std::numeric_limits < qint64 >::min();
55 mCompletionGraphCachedLocalizationTag = std::numeric_limits < qint64 >::min();
56 mCurrentIndiNode = nullptr;
57 }
58
59
60 CCalculationAlgorithmContext::~CCalculationAlgorithmContext() {
61 }
62
63
64 cint64 CCalculationAlgorithmContext::getMaxCompletionGraphCachedIndividualNodeID() {
65 return mMaxCompletionGraphCachedIndiNodeID;
66 }
67
68 cint64 CCalculationAlgorithmContext::getCompletionGraphCachedLocalizationTag() {
69 return mCompletionGraphCachedLocalizationTag;
70 }
71
72 bool CCalculationAlgorithmContext::hasCompletionGraphCachedIndividualNodes() {
73 return mMaxCompletionGraphCachedIndiNodeID != std::numeric_limits < qint64 >::min();
74 }
75
76
77 bool CCalculationAlgorithmContext::isMinModificationUpdated() {
78 return mMinModificationUpdated;
79 }
80
81 cint64 CCalculationAlgorithmContext::getMinModificationAncestorDepth() {
82 return mMinModificationAncestorDepth;
83 }
84
85 CCalculationAlgorithmContext* CCalculationAlgorithmContext::setMinModificationAncestorDepth(cint64 ancDepth) {
86 mMinModificationAncestorDepth = ancDepth;
87 mMinModificationUpdated = false;
88 return this;
89 }
90
91 CCalculationAlgorithmContext* CCalculationAlgorithmContext::setMinModificationIndividualID(cint64 indiID) {
92 mMinModificationIndividualID = indiID;
93 mMinModificationUpdated = false;
94 return this;
95 }
96
97 cint64 CCalculationAlgorithmContext::getMinModificationIndividualID() {
98 return mMinModificationIndividualID;
99 }
100
101 CCalculationAlgorithmContext* CCalculationAlgorithmContext::setMinModificationIndividual(CIndividualProcessNode* indiNode) {
102 setMinModificationIndividualID(indiNode->getIndividualNodeID());
103 setMinModificationAncestorDepth(indiNode->getIndividualAncestorDepth());
104 return this;
105 }
106
107 CIndividualProcessNode* CCalculationAlgorithmContext::getCurrentIndividualNode() {
108 return mCurrentIndiNode;
109 }
110
111 CCalculationAlgorithmContext* CCalculationAlgorithmContext::setCurrentIndividualNode(CIndividualProcessNode* indiNode) {
112 mCurrentIndiNode = indiNode;
113 return this;
114 }
115
116
117 }; // end namespace Algorithm
118
119 }; // end namespace Kernel
120
121 }; // end namespace Reasoner
122
123 }; // end namespace Konclude