Debian Codegraph @

Source/Reasoner/Kernel/Process/CBackendNeighbourExpansionControllingData.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 "CBackendNeighbourExpansionControllingData.h"
22
23
24 namespace Konclude {
25
26 namespace Reasoner {
27
28 namespace Kernel {
29
30 namespace Process {
31
32 CBackendNeighbourExpansionControllingData::CBackendNeighbourExpansionControllingData(CProcessContext* processContext) {
33 }
34
35
36 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::initExpansionControllingData(CBackendNeighbourExpansionControllingData* contData) {
37 if (contData) {
38 mExpandedNeighbourLinkCount = contData->mExpandedNeighbourLinkCount;
39 mReuseModesDepNode = contData->mReuseModesDepNode;
40 mReuseContinuingDependencyTrackPoint = contData->mReuseContinuingDependencyTrackPoint;
41 mPrioritizedReuseExpansionMode = contData->mPrioritizedReuseExpansionMode;
42 mFixedReuseExpansionMode = contData->mFixedReuseExpansionMode;
43 mLastBackendExpandedEnsuringExistingIndividualLinksLinker = contData->mLastBackendExpandedEnsuringExistingIndividualLinksLinker;
44 mCutBackendNeighbourExpansionIndividualLinker = contData->mCutBackendNeighbourExpansionIndividualLinker;
45 mLastCutBackendNeighbourExpansionEnsuringExistingIndividualLinksLinker = contData->mLastCutBackendNeighbourExpansionEnsuringExistingIndividualLinksLinker;
46 } else {
47 mExpandedNeighbourLinkCount = 0;
48 mReuseModesDepNode = nullptr;
49 mReuseContinuingDependencyTrackPoint = nullptr;
50 mPrioritizedReuseExpansionMode = false;
51 mFixedReuseExpansionMode = false;
52 mLastBackendExpandedEnsuringExistingIndividualLinksLinker = nullptr;
53 mCutBackendNeighbourExpansionIndividualLinker = nullptr;
54 mLastCutBackendNeighbourExpansionEnsuringExistingIndividualLinksLinker = nullptr;
55 }
56 return this;
57 }
58
59
60 cint64 CBackendNeighbourExpansionControllingData::getExpandedNeighbourLinkCount() {
61 return mExpandedNeighbourLinkCount;
62 }
63
64 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::incExpandedNeighbourLinkCount(cint64 count) {
65 mExpandedNeighbourLinkCount += count;
66 return this;
67 }
68
69 CREUSEBACKENDEXPANSIONMODESDependencyNode* CBackendNeighbourExpansionControllingData::getReuseModesDependencyNode() {
70 return mReuseModesDepNode;
71 }
72
73 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::setReuseModesDependencyNode(CREUSEBACKENDEXPANSIONMODESDependencyNode* depNode) {
74 mReuseModesDepNode = depNode;
75 return this;
76 }
77
78
79 bool CBackendNeighbourExpansionControllingData::hasExpansionReusingMode() {
80 return isFixedReuseExpansionMode() || isPrioritizedReuseExpansionMode();
81 }
82
83 bool CBackendNeighbourExpansionControllingData::isFixedReuseExpansionMode() {
84 return mFixedReuseExpansionMode;
85 }
86
87 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::setFixedReuseExpansionMode(bool active) {
88 mFixedReuseExpansionMode = active;
89 return this;
90 }
91
92 bool CBackendNeighbourExpansionControllingData::isPrioritizedReuseExpansionMode() {
93 return mPrioritizedReuseExpansionMode;
94 }
95
96 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::setPrioritizedReuseExpansionMode(bool active) {
97 mPrioritizedReuseExpansionMode = active;
98 return this;
99 }
100
101 CDependencyTrackPoint* CBackendNeighbourExpansionControllingData::getReuseContinuingDependencyTrackPoint() {
102 return mReuseContinuingDependencyTrackPoint;
103 }
104
105 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::setReuseContinuingDependencyTrackPoint(CDependencyTrackPoint* depTrackPoint) {
106 mReuseContinuingDependencyTrackPoint = depTrackPoint;
107 return this;
108 }
109
110
111 CXLinker<CIndividualProcessNode*>* CBackendNeighbourExpansionControllingData::getLastBackendExpandedEnsuringExistingIndividualLinksLinker() {
112 return mLastBackendExpandedEnsuringExistingIndividualLinksLinker;
113 }
114
115 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::setLastBackendExpandedEnsuringExistingIndividualLinksLinker(CXLinker<CIndividualProcessNode*>* indiLinker) {
116 mLastBackendExpandedEnsuringExistingIndividualLinksLinker = indiLinker;
117 return this;
118 }
119
120
121
122 CXLinker<CIndividualProcessNode*>* CBackendNeighbourExpansionControllingData::getCutBackendNeighbourExpansionIndividualLinker() {
123 return mCutBackendNeighbourExpansionIndividualLinker;
124 }
125
126 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::addCutBackendNeighbourExpansionIndividualLinker(CXLinker<CIndividualProcessNode*>* indiLinker) {
127 mCutBackendNeighbourExpansionIndividualLinker = indiLinker->append(mCutBackendNeighbourExpansionIndividualLinker);
128 return this;
129 }
130
131 CXLinker<CIndividualProcessNode*>* CBackendNeighbourExpansionControllingData::getLastCutBackendNeighbourExpansionEnsuringExistingIndividualLinksLinker() {
132 return mLastCutBackendNeighbourExpansionEnsuringExistingIndividualLinksLinker;
133 }
134
135 CBackendNeighbourExpansionControllingData* CBackendNeighbourExpansionControllingData::setLastCutBackendNeighbourExpansionEnsuringExistingIndividualLinksLinker(CXLinker<CIndividualProcessNode*>* indiLinker) {
136 mLastCutBackendNeighbourExpansionEnsuringExistingIndividualLinksLinker = indiLinker;
137 return this;
138 }
139
140
141
142 }; // end namespace Process
143
144 }; // end namespace Kernel
145
146 }; // end namespace Reasoner
147
148 }; // end namespace Konclude