| 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 "CIndividualSaturationProcessNode.h" |
| 22 |
|
| 23 |
|
| 24 |
namespace Konclude { |
| 25 |
|
| 26 |
namespace Reasoner { |
| 27 |
|
| 28 |
namespace Kernel { |
| 29 |
|
| 30 |
namespace Process { |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
CIndividualSaturationProcessNode::CIndividualSaturationProcessNode(CProcessContext* processContext) : mProcessContext(processContext) { |
| 36 |
mMemAllocMan = mProcessContext->getMemoryAllocationManager(); |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::initIndividualSaturationProcessNode(cint64 individualID, CExtendedConceptReferenceLinkingData* conSatRefLinkData, CIndividualSaturationReferenceLinkingData* indSatRefLinkData) { |
| 41 |
mRoleBackPropHash = nullptr; |
| 42 |
mReapplyConSatLabelSet = nullptr; |
| 43 |
mIndiProcessLinker = nullptr; |
| 44 |
mConceptSaturationProcessLinker = nullptr; |
| 45 |
mSubstituteIndiNode = nullptr; |
| 46 |
mCopyIndiNode = nullptr; |
| 47 |
mRequiredBackProp = false; |
| 48 |
|
| 49 |
mDependingIndiNodeLinker = nullptr; |
| 50 |
mDepSaturationIndiNode = nullptr; |
| 51 |
mDirectSaturationIndiNode = nullptr; |
| 52 |
mNonInverseConnectedIndiNodeLinker = nullptr; |
| 53 |
mMultipleCardinalityAncestorNodesLinker = nullptr; |
| 54 |
|
| 55 |
mIndiID = individualID; |
| 56 |
mInitBackwardPropLinks = nullptr; |
| 57 |
mReferenceIndiNode = nullptr; |
| 58 |
mIndiExtensionData = nullptr; |
| 59 |
mClashedConSatDesLinker = nullptr; |
| 60 |
mIndiCompletionLinker = nullptr; |
| 61 |
mReferenceMode = 0; |
| 62 |
mConceptSaturationLinkRefData = conSatRefLinkData; |
| 63 |
mIndividualSaturationLinkRefData = indSatRefLinkData; |
| 64 |
mIntegratedNominalIndi = nullptr; |
| 65 |
mDataValueApplied = false; |
| 66 |
mCacheData = nullptr; |
| 67 |
mNominalIndi = nullptr; |
| 68 |
mSeparatedSaturation = false; |
| 69 |
mABoxIndividualRepresentationNode = false; |
| 70 |
mMaxAtmostCardinality = false; |
| 71 |
mMaxAtleastCardinality = false; |
| 72 |
|
| 73 |
mNominalIndiTriplesAssertions = false; |
| 74 |
mLoadedNominalIndiTriplesAssertions = false; |
| 75 |
mOccurrenceStatisticsCollectingRequired = false; |
| 76 |
mOccurrenceStatisticsCollected = false; |
| 77 |
return this; |
| 78 |
} |
| 79 |
|
| 80 |
CExtendedConceptReferenceLinkingData* CIndividualSaturationProcessNode::getSaturationConceptReferenceLinking() { |
| 81 |
return mConceptSaturationLinkRefData; |
| 82 |
} |
| 83 |
|
| 84 |
CIndividualSaturationReferenceLinkingData* CIndividualSaturationProcessNode::getSaturationIndividualReferenceLinking() { |
| 85 |
return mIndividualSaturationLinkRefData; |
| 86 |
} |
| 87 |
|
| 88 |
|
| 89 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::initRootIndividualSaturationProcessNode() { |
| 90 |
return this; |
| 91 |
} |
| 92 |
|
| 93 |
|
| 94 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::initCopingIndividualSaturationProcessNode(CIndividualSaturationProcessNode* indiNode, bool tryFlatLabelCopy) { |
| 95 |
if (indiNode->getRoleBackwardPropagationHash(false)) { |
| 96 |
getRoleBackwardPropagationHash(true)->copyRoleBackwardSaturationPropagationHash(indiNode->getRoleBackwardPropagationHash(false),this); |
| 97 |
} |
| 98 |
if (indiNode->getReapplyConceptSaturationLabelSet(false)) { |
| 99 |
getReapplyConceptSaturationLabelSet(true)->copyReapplyConceptSaturationLabelSet(indiNode->getReapplyConceptSaturationLabelSet(false),tryFlatLabelCopy); |
| 100 |
} |
| 101 |
if (indiNode->getSuccessorConnectedNominalSet(false)) { |
| 102 |
getSuccessorConnectedNominalSet(true)->copySuccessorConnectedNominalSet(indiNode->getSuccessorConnectedNominalSet(false)); |
| 103 |
} |
| 104 |
|
| 105 |
mIntegratedNominalIndi = indiNode->mIntegratedNominalIndi; |
| 106 |
if (indiNode->mNominalIndi) { |
| 107 |
mIntegratedNominalIndi = indiNode->mNominalIndi; |
| 108 |
} |
| 109 |
if (mNominalIndi) { |
| 110 |
mIntegratedNominalIndi = mNominalIndi; |
| 111 |
} |
| 112 |
mDataValueApplied = indiNode->mDataValueApplied; |
| 113 |
|
| 114 |
if (indiNode->getAppliedDatatypeData(false)) { |
| 115 |
getAppliedDatatypeData(true)->setAppliedDataLiteral(indiNode->getAppliedDatatypeData(false)->getAppliedDataLiteral()); |
| 116 |
getAppliedDatatypeData(true)->setAppliedDatatype(indiNode->getAppliedDatatypeData(false)->getAppliedDatatype()); |
| 117 |
} |
| 118 |
|
| 119 |
|
| 120 |
CXNegLinker<CIndividualSaturationProcessNode*>* depCopyLinker = CObjectAllocator< CXNegLinker<CIndividualSaturationProcessNode*> >::allocateAndConstruct(mMemAllocMan); |
| 121 |
depCopyLinker->initNegLinker(this,true); |
| 122 |
indiNode->addCopyDependingIndividualNodeLinker(depCopyLinker); |
| 123 |
return this; |
| 124 |
} |
| 125 |
|
| 126 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::initSubstituitingIndividualSaturationProcessNode(CIndividualSaturationProcessNode* indiNode) { |
| 127 |
mDirectStatusFlags = indiNode->mDirectStatusFlags; |
| 128 |
mIndirectStatusFlags = indiNode->mIndirectStatusFlags; |
| 129 |
return this; |
| 130 |
} |
| 131 |
|
| 132 |
CReapplyConceptSaturationLabelSet* CIndividualSaturationProcessNode::getReapplyConceptSaturationLabelSet(bool create) { |
| 133 |
if (create && !mReapplyConSatLabelSet) { |
| 134 |
mReapplyConSatLabelSet = CObjectParameterizingAllocator< CReapplyConceptSaturationLabelSet,CProcessContext* >::allocateAndConstructAndParameterize(mMemAllocMan,mProcessContext); |
| 135 |
mReapplyConSatLabelSet->initReapplyConceptSaturationLabelSet(); |
| 136 |
} |
| 137 |
return mReapplyConSatLabelSet; |
| 138 |
} |
| 139 |
|
| 140 |
CIndividualSaturationProcessNodeExtensionData* CIndividualSaturationProcessNode::getIndividualExtensionData(bool create) { |
| 141 |
if (create && !mIndiExtensionData) { |
| 142 |
mIndiExtensionData = CObjectParameterizingAllocator< CIndividualSaturationProcessNodeExtensionData,CProcessContext* >::allocateAndConstructAndParameterize(mMemAllocMan,mProcessContext); |
| 143 |
mIndiExtensionData->initIndividualExtensionData(this); |
| 144 |
} |
| 145 |
return mIndiExtensionData; |
| 146 |
} |
| 147 |
|
| 148 |
CSaturationDisjunctCommonConceptExtractionData* CIndividualSaturationProcessNode::getDisjunctCommonConceptExtractionData(bool create) { |
| 149 |
if (create) { |
| 150 |
return getIndividualExtensionData(true)->getDisjunctCommonConceptExtractionData(true); |
| 151 |
} |
| 152 |
if (mIndiExtensionData) { |
| 153 |
return mIndiExtensionData->getDisjunctCommonConceptExtractionData(false); |
| 154 |
} |
| 155 |
return nullptr; |
| 156 |
} |
| 157 |
|
| 158 |
|
| 159 |
CRoleBackwardSaturationPropagationHash* CIndividualSaturationProcessNode::getRoleBackwardPropagationHash(bool create) { |
| 160 |
if (create && !mRoleBackPropHash) { |
| 161 |
mRoleBackPropHash = CObjectParameterizingAllocator< CRoleBackwardSaturationPropagationHash,CProcessContext* >::allocateAndConstructAndParameterize(mMemAllocMan,mProcessContext); |
| 162 |
mRoleBackPropHash->initRoleBackwardSaturationPropagationHash(); |
| 163 |
} |
| 164 |
return mRoleBackPropHash; |
| 165 |
} |
| 166 |
|
| 167 |
|
| 168 |
CSuccessorConnectedNominalSet* CIndividualSaturationProcessNode::getSuccessorConnectedNominalSet(bool create) { |
| 169 |
CSuccessorConnectedNominalSet* succConnectedNominalSet = nullptr; |
| 170 |
CSaturationIndividualNodeNominalHandlingData* nominalHandlingData = getNominalHandlingData(create); |
| 171 |
if (nominalHandlingData) { |
| 172 |
succConnectedNominalSet = nominalHandlingData->getSuccessorConnectedNominalSet(create); |
| 173 |
} |
| 174 |
return succConnectedNominalSet; |
| 175 |
} |
| 176 |
|
| 177 |
|
| 178 |
CLinkedDataValueAssertionSaturationData* CIndividualSaturationProcessNode::getLinkedDataValueAssertionData(bool create) { |
| 179 |
if (create) { |
| 180 |
return getIndividualExtensionData(true)->getLinkedDataValueAssertionData(true); |
| 181 |
} |
| 182 |
if (mIndiExtensionData) { |
| 183 |
return mIndiExtensionData->getLinkedDataValueAssertionData(false); |
| 184 |
} |
| 185 |
return nullptr; |
| 186 |
} |
| 187 |
|
| 188 |
|
| 189 |
CCriticalPredecessorRoleCardinalityHash* CIndividualSaturationProcessNode::getCriticalPredecessorRoleCardinalityHash(bool create) { |
| 190 |
if (create) { |
| 191 |
return getIndividualExtensionData(true)->getCriticalPredecessorRoleCardinalityHash(true); |
| 192 |
} |
| 193 |
if (mIndiExtensionData) { |
| 194 |
return mIndiExtensionData->getCriticalPredecessorRoleCardinalityHash(false); |
| 195 |
} |
| 196 |
return nullptr; |
| 197 |
} |
| 198 |
|
| 199 |
|
| 200 |
CLinkedRoleSaturationSuccessorHash* CIndividualSaturationProcessNode::getLinkedRoleSuccessorHash(bool create) { |
| 201 |
if (create) { |
| 202 |
return getIndividualExtensionData(true)->getLinkedRoleSuccessorHash(true); |
| 203 |
} |
| 204 |
if (mIndiExtensionData) { |
| 205 |
return mIndiExtensionData->getLinkedRoleSuccessorHash(false); |
| 206 |
} |
| 207 |
return nullptr; |
| 208 |
} |
| 209 |
|
| 210 |
|
| 211 |
CCriticalSaturationConceptTypeQueues* CIndividualSaturationProcessNode::getCriticalConceptTypeQueues(bool create) { |
| 212 |
if (create) { |
| 213 |
return getIndividualExtensionData(true)->getCriticalConceptTypeQueues(true); |
| 214 |
} |
| 215 |
if (mIndiExtensionData) { |
| 216 |
return mIndiExtensionData->getCriticalConceptTypeQueues(false); |
| 217 |
} |
| 218 |
return nullptr; |
| 219 |
} |
| 220 |
|
| 221 |
|
| 222 |
CSaturationIndividualNodeSuccessorExtensionData* CIndividualSaturationProcessNode::getSuccessorExtensionData(bool create) { |
| 223 |
if (create) { |
| 224 |
return getIndividualExtensionData(true)->getSuccessorExtensionData(true); |
| 225 |
} |
| 226 |
if (mIndiExtensionData) { |
| 227 |
return mIndiExtensionData->getSuccessorExtensionData(false); |
| 228 |
} |
| 229 |
return nullptr; |
| 230 |
} |
| 231 |
|
| 232 |
|
| 233 |
CSaturationIndividualNodeNominalHandlingData* CIndividualSaturationProcessNode::getNominalHandlingData(bool create) { |
| 234 |
if (create) { |
| 235 |
return getIndividualExtensionData(true)->getNominalHandlingData(true); |
| 236 |
} |
| 237 |
if (mIndiExtensionData) { |
| 238 |
return mIndiExtensionData->getNominalHandlingData(false); |
| 239 |
} |
| 240 |
return nullptr; |
| 241 |
} |
| 242 |
|
| 243 |
|
| 244 |
CSaturationIndividualNodeDatatypeData* CIndividualSaturationProcessNode::getAppliedDatatypeData(bool create) { |
| 245 |
if (create) { |
| 246 |
return getIndividualExtensionData(true)->getAppliedDatatypeData(true); |
| 247 |
} |
| 248 |
if (mIndiExtensionData) { |
| 249 |
return mIndiExtensionData->getAppliedDatatypeData(false); |
| 250 |
} |
| 251 |
return nullptr; |
| 252 |
} |
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
CSaturationATMOSTSuccessorMergingData* CIndividualSaturationProcessNode::getATMOSTSuccessorMergingData(bool create) { |
| 257 |
if (create) { |
| 258 |
return getIndividualExtensionData(true)->getATMOSTSuccessorMergingData(true); |
| 259 |
} |
| 260 |
if (mIndiExtensionData) { |
| 261 |
return mIndiExtensionData->getATMOSTSuccessorMergingData(false); |
| 262 |
} |
| 263 |
return nullptr; |
| 264 |
} |
| 265 |
|
| 266 |
CIndividualSaturationProcessNodeLinker* CIndividualSaturationProcessNode::getIndividualSaturationProcessNodeLinker() { |
| 267 |
return mIndiProcessLinker; |
| 268 |
} |
| 269 |
|
| 270 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setIndividualSaturationProcessNodeLinker(CIndividualSaturationProcessNodeLinker* processNodeLinker) { |
| 271 |
mIndiProcessLinker = processNodeLinker; |
| 272 |
return this; |
| 273 |
} |
| 274 |
|
| 275 |
CConceptSaturationProcessLinker* CIndividualSaturationProcessNode::getConceptSaturationProcessLinker() { |
| 276 |
return mConceptSaturationProcessLinker; |
| 277 |
} |
| 278 |
|
| 279 |
CConceptSaturationProcessLinker* CIndividualSaturationProcessNode::takeConceptSaturationProcessLinker() { |
| 280 |
CConceptSaturationProcessLinker* conProcLinker = mConceptSaturationProcessLinker; |
| 281 |
if (mConceptSaturationProcessLinker) { |
| 282 |
mConceptSaturationProcessLinker = mConceptSaturationProcessLinker->getNext(); |
| 283 |
} |
| 284 |
return conProcLinker; |
| 285 |
} |
| 286 |
|
| 287 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setConceptSaturationProcessLinker(CConceptSaturationProcessLinker* conProcessLinker) { |
| 288 |
mConceptSaturationProcessLinker = conProcessLinker; |
| 289 |
return this; |
| 290 |
} |
| 291 |
|
| 292 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addConceptSaturationProcessLinker(CConceptSaturationProcessLinker* conProcessLinker) { |
| 293 |
mConceptSaturationProcessLinker = conProcessLinker->append(mConceptSaturationProcessLinker); |
| 294 |
return this; |
| 295 |
} |
| 296 |
|
| 297 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::clearConceptSaturationProcessLinker() { |
| 298 |
mConceptSaturationProcessLinker = nullptr; |
| 299 |
return this; |
| 300 |
} |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
CSaturationSuccessorRoleAssertionLinker* CIndividualSaturationProcessNode::getRoleAssertionLinker() { |
| 305 |
if (mIndiExtensionData) { |
| 306 |
return mIndiExtensionData->getRoleAssertionLinker(); |
| 307 |
} |
| 308 |
return nullptr; |
| 309 |
} |
| 310 |
|
| 311 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addRoleAssertionLinker(CSaturationSuccessorRoleAssertionLinker* roleAssertionLinker) { |
| 312 |
getIndividualExtensionData(true)->addRoleAssertionLinker(roleAssertionLinker); |
| 313 |
return this; |
| 314 |
} |
| 315 |
|
| 316 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addRoleAssertion(CIndividualSaturationProcessNode* destinationNode, CRole* role, bool roleNegation) { |
| 317 |
getIndividualExtensionData(true)->addRoleAssertion(destinationNode,role,roleNegation); |
| 318 |
return this; |
| 319 |
} |
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
bool CIndividualSaturationProcessNode::getRequiredBackwardPropagation() { |
| 325 |
return mRequiredBackProp; |
| 326 |
} |
| 327 |
|
| 328 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setRequiredBackwardPropagation(bool requiredBackProp) { |
| 329 |
mRequiredBackProp = requiredBackProp; |
| 330 |
return this; |
| 331 |
} |
| 332 |
|
| 333 |
bool CIndividualSaturationProcessNode::hasSubstituteIndividualNode() { |
| 334 |
return mSubstituteIndiNode != nullptr; |
| 335 |
} |
| 336 |
|
| 337 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::getSubstituteIndividualNode() { |
| 338 |
return mSubstituteIndiNode; |
| 339 |
} |
| 340 |
|
| 341 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setSubstituteIndividualNode(CIndividualSaturationProcessNode* indiNode) { |
| 342 |
mSubstituteIndiNode = indiNode; |
| 343 |
return this; |
| 344 |
} |
| 345 |
|
| 346 |
bool CIndividualSaturationProcessNode::hasCopyIndividualNode() { |
| 347 |
return mCopyIndiNode != nullptr; |
| 348 |
} |
| 349 |
|
| 350 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::getCopyIndividualNode() { |
| 351 |
return mCopyIndiNode; |
| 352 |
} |
| 353 |
|
| 354 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setCopyIndividualNode(CIndividualSaturationProcessNode* indiNode) { |
| 355 |
mCopyIndiNode = indiNode; |
| 356 |
return this; |
| 357 |
} |
| 358 |
|
| 359 |
bool CIndividualSaturationProcessNode::hasCopyDependingIndividualNodeLinker() { |
| 360 |
return mDependingIndiNodeLinker != nullptr; |
| 361 |
} |
| 362 |
|
| 363 |
CXNegLinker<CIndividualSaturationProcessNode*>* CIndividualSaturationProcessNode::getCopyDependingIndividualNodeLinker() { |
| 364 |
return mDependingIndiNodeLinker; |
| 365 |
} |
| 366 |
|
| 367 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setCopyDependingIndividualNodeLinker(CXNegLinker<CIndividualSaturationProcessNode*>* indiLinker) { |
| 368 |
mDependingIndiNodeLinker = indiLinker; |
| 369 |
return this; |
| 370 |
} |
| 371 |
|
| 372 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addCopyDependingIndividualNodeLinker(CXNegLinker<CIndividualSaturationProcessNode*>* indiLinker) { |
| 373 |
if (indiLinker) { |
| 374 |
mDependingIndiNodeLinker = indiLinker->append(mDependingIndiNodeLinker); |
| 375 |
} |
| 376 |
return this; |
| 377 |
} |
| 378 |
|
| 379 |
bool CIndividualSaturationProcessNode::hasDependingSaturationIndividualNode() { |
| 380 |
return mDepSaturationIndiNode != nullptr; |
| 381 |
} |
| 382 |
|
| 383 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::getDependingSaturationIndividualNode() { |
| 384 |
return mDepSaturationIndiNode; |
| 385 |
} |
| 386 |
|
| 387 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setDependingSaturationIndividualNode(CIndividualSaturationProcessNode* indiNode) { |
| 388 |
mDepSaturationIndiNode = indiNode; |
| 389 |
return this; |
| 390 |
} |
| 391 |
|
| 392 |
bool CIndividualSaturationProcessNode::hasDirectSaturationIndividualNode() { |
| 393 |
return mDirectSaturationIndiNode != nullptr; |
| 394 |
} |
| 395 |
|
| 396 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::getDirectSaturationIndividualNode() { |
| 397 |
return mDirectSaturationIndiNode; |
| 398 |
} |
| 399 |
|
| 400 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setDirectSaturationIndividualNode(CIndividualSaturationProcessNode* indiNode) { |
| 401 |
mDirectSaturationIndiNode = indiNode; |
| 402 |
return this; |
| 403 |
} |
| 404 |
|
| 405 |
|
| 406 |
cint64 CIndividualSaturationProcessNode::getIndividualID() { |
| 407 |
return mIndiID; |
| 408 |
} |
| 409 |
|
| 410 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setIndividualID(cint64 indiID) { |
| 411 |
mIndiID = indiID; |
| 412 |
return this; |
| 413 |
} |
| 414 |
|
| 415 |
bool CIndividualSaturationProcessNode::isInitialized() { |
| 416 |
return mDirectStatusFlags.hasInitializedFlag(); |
| 417 |
} |
| 418 |
|
| 419 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setInitialized(bool initialized) { |
| 420 |
mDirectStatusFlags.setInitializedFlag(initialized); |
| 421 |
mIndirectStatusFlags.setInitializedFlag(initialized); |
| 422 |
return this; |
| 423 |
} |
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
bool CIndividualSaturationProcessNode::isCompleted() { |
| 428 |
return mDirectStatusFlags.hasCompletedFlag(); |
| 429 |
} |
| 430 |
|
| 431 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setCompleted(bool completed) { |
| 432 |
mDirectStatusFlags.setCompletedFlag(completed); |
| 433 |
mIndirectStatusFlags.setCompletedFlag(completed); |
| 434 |
return this; |
| 435 |
} |
| 436 |
|
| 437 |
|
| 438 |
CBackwardSaturationPropagationLink* CIndividualSaturationProcessNode::getInitializingBackwardPropagationLinks() { |
| 439 |
return mInitBackwardPropLinks; |
| 440 |
} |
| 441 |
|
| 442 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setInitializingBackwardPropagationLinks(CBackwardSaturationPropagationLink* backwardPropLinks) { |
| 443 |
mInitBackwardPropLinks = backwardPropLinks; |
| 444 |
return this; |
| 445 |
} |
| 446 |
|
| 447 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addInitializingBackwardPropagationLinks(CBackwardSaturationPropagationLink* backwardPropLinks) { |
| 448 |
if (backwardPropLinks) { |
| 449 |
mInitBackwardPropLinks = backwardPropLinks->append(mInitBackwardPropLinks); |
| 450 |
} |
| 451 |
return this; |
| 452 |
} |
| 453 |
|
| 454 |
|
| 455 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::getReferenceIndividualSaturationProcessNode() { |
| 456 |
return mReferenceIndiNode; |
| 457 |
} |
| 458 |
|
| 459 |
cint64 CIndividualSaturationProcessNode::getReferenceMode() { |
| 460 |
return mReferenceMode; |
| 461 |
} |
| 462 |
|
| 463 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setReferenceIndividualSaturationProcessNode(CIndividualSaturationProcessNode* refNode) { |
| 464 |
mReferenceIndiNode = refNode; |
| 465 |
return this; |
| 466 |
} |
| 467 |
|
| 468 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setReferenceMode(cint64 refMode) { |
| 469 |
mReferenceMode = refMode; |
| 470 |
return this; |
| 471 |
} |
| 472 |
|
| 473 |
CIndividualSaturationProcessNodeStatusFlags* CIndividualSaturationProcessNode::getDirectStatusFlags() { |
| 474 |
return &mDirectStatusFlags; |
| 475 |
} |
| 476 |
|
| 477 |
CIndividualSaturationProcessNodeStatusFlags* CIndividualSaturationProcessNode::getIndirectStatusFlags() { |
| 478 |
return &mIndirectStatusFlags; |
| 479 |
} |
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
bool CIndividualSaturationProcessNode::hasClashedConceptSaturationDescriptorLinker() { |
| 484 |
return mClashedConSatDesLinker != nullptr; |
| 485 |
} |
| 486 |
|
| 487 |
CConceptSaturationDescriptor* CIndividualSaturationProcessNode::getClashedConceptSaturationDescriptorLinker() { |
| 488 |
return mClashedConSatDesLinker; |
| 489 |
} |
| 490 |
|
| 491 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addClashedConceptSaturationDescriptorLinker(CConceptSaturationDescriptor* clashConSatDes) { |
| 492 |
mClashedConSatDesLinker = clashConSatDes->append(mClashedConSatDesLinker); |
| 493 |
return this; |
| 494 |
} |
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
bool CIndividualSaturationProcessNode::hasNonInverseConnectedIndividualNodeLinker() { |
| 502 |
return mNonInverseConnectedIndiNodeLinker != nullptr; |
| 503 |
} |
| 504 |
|
| 505 |
CXLinker<CIndividualSaturationProcessNode*>* CIndividualSaturationProcessNode::getNonInverseConnectedIndividualNodeLinker() { |
| 506 |
return mNonInverseConnectedIndiNodeLinker; |
| 507 |
} |
| 508 |
|
| 509 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setNonInverseConnectedIndividualNodeLinker(CXLinker<CIndividualSaturationProcessNode*>* indiLinker) { |
| 510 |
mNonInverseConnectedIndiNodeLinker = indiLinker; |
| 511 |
return this; |
| 512 |
} |
| 513 |
|
| 514 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addNonInverseConnectedIndividualNodeLinker(CXLinker<CIndividualSaturationProcessNode*>* indiLinker) { |
| 515 |
if (indiLinker) { |
| 516 |
mNonInverseConnectedIndiNodeLinker = indiLinker->append(mNonInverseConnectedIndiNodeLinker); |
| 517 |
} |
| 518 |
return this; |
| 519 |
} |
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
bool CIndividualSaturationProcessNode::hasNominalIntegrated() { |
| 525 |
return mIntegratedNominalIndi; |
| 526 |
} |
| 527 |
|
| 528 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setIntegratedNominal(CIndividual* nominalIndi) { |
| 529 |
mIntegratedNominalIndi = nominalIndi; |
| 530 |
return this; |
| 531 |
} |
| 532 |
|
| 533 |
CIndividual* CIndividualSaturationProcessNode::getIntegratedNominalIndividual() { |
| 534 |
return mIntegratedNominalIndi; |
| 535 |
} |
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
bool CIndividualSaturationProcessNode::hasDataValueApplied() { |
| 541 |
return mDataValueApplied; |
| 542 |
} |
| 543 |
|
| 544 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setDataValueApplied(bool dataApplied) { |
| 545 |
mDataValueApplied = dataApplied; |
| 546 |
return this; |
| 547 |
} |
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
bool CIndividualSaturationProcessNode::hasMultipleCardinalityAncestorNodesLinker() { |
| 554 |
return mMultipleCardinalityAncestorNodesLinker != nullptr; |
| 555 |
} |
| 556 |
|
| 557 |
CXLinker<CIndividualSaturationProcessNode*>* CIndividualSaturationProcessNode::getMultipleCardinalityAncestorNodesLinker() { |
| 558 |
return mMultipleCardinalityAncestorNodesLinker; |
| 559 |
} |
| 560 |
|
| 561 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setMultipleCardinalityAncestorNodesLinker(CXLinker<CIndividualSaturationProcessNode*>* indiLinker) { |
| 562 |
mMultipleCardinalityAncestorNodesLinker = indiLinker; |
| 563 |
return this; |
| 564 |
} |
| 565 |
|
| 566 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::addMultipleCardinalityAncestorNodesLinker(CXLinker<CIndividualSaturationProcessNode*>* indiLinker) { |
| 567 |
if (indiLinker) { |
| 568 |
mMultipleCardinalityAncestorNodesLinker = indiLinker->append(mMultipleCardinalityAncestorNodesLinker); |
| 569 |
} |
| 570 |
return this; |
| 571 |
} |
| 572 |
|
| 573 |
|
| 574 |
CIndividual* CIndividualSaturationProcessNode::getNominalIndividual() { |
| 575 |
return mNominalIndi; |
| 576 |
} |
| 577 |
|
| 578 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setNominalIndividual(CIndividual* nominalIndi) { |
| 579 |
mNominalIndi = nominalIndi; |
| 580 |
mIntegratedNominalIndi = mNominalIndi; |
| 581 |
return this; |
| 582 |
} |
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
bool CIndividualSaturationProcessNode::isIndividualSaturationCompletionNodeLinkerQueued() { |
| 588 |
if (mIndiCompletionLinker) { |
| 589 |
return mIndiCompletionLinker->isProcessingQueued(); |
| 590 |
} |
| 591 |
return false; |
| 592 |
} |
| 593 |
|
| 594 |
CIndividualSaturationProcessNodeLinker* CIndividualSaturationProcessNode::getIndividualSaturationCompletionNodeLinker(bool create) { |
| 595 |
if (!mIndiCompletionLinker && create) { |
| 596 |
mIndiCompletionLinker = CObjectAllocator< CIndividualSaturationProcessNodeLinker >::allocateAndConstruct(mMemAllocMan); |
| 597 |
mIndiCompletionLinker->initProcessNodeLinker(this,false); |
| 598 |
} |
| 599 |
return mIndiCompletionLinker; |
| 600 |
} |
| 601 |
|
| 602 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setIndividualSaturationCompletionNodeLinker(CIndividualSaturationProcessNodeLinker* processNodeLinker) { |
| 603 |
mIndiCompletionLinker = processNodeLinker; |
| 604 |
return this; |
| 605 |
} |
| 606 |
|
| 607 |
|
| 608 |
CIndividualSaturationProcessNodeCacheData* CIndividualSaturationProcessNode::getCacheExpansionData() { |
| 609 |
return mCacheData; |
| 610 |
} |
| 611 |
|
| 612 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setCacheExpansionData(CIndividualSaturationProcessNodeCacheData* cacheData) { |
| 613 |
mCacheData = cacheData; |
| 614 |
return this; |
| 615 |
} |
| 616 |
|
| 617 |
|
| 618 |
bool CIndividualSaturationProcessNode::isSeparated() { |
| 619 |
return mSeparatedSaturation; |
| 620 |
} |
| 621 |
|
| 622 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setSeparated(bool separated) { |
| 623 |
mSeparatedSaturation = separated; |
| 624 |
return this; |
| 625 |
} |
| 626 |
|
| 627 |
|
| 628 |
bool CIndividualSaturationProcessNode::isABoxIndividualRepresentationNode() { |
| 629 |
return mABoxIndividualRepresentationNode; |
| 630 |
} |
| 631 |
|
| 632 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setABoxIndividualRepresentationNode(bool aboxIndividualRepresentationNode) { |
| 633 |
mABoxIndividualRepresentationNode = aboxIndividualRepresentationNode; |
| 634 |
return this; |
| 635 |
} |
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
bool CIndividualSaturationProcessNode::addMaxAtleastCardinalityCandidate(cint64 atleastCardinality) { |
| 640 |
if (atleastCardinality > mMaxAtleastCardinality) { |
| 641 |
mMaxAtleastCardinality = atleastCardinality; |
| 642 |
return true; |
| 643 |
} |
| 644 |
return false; |
| 645 |
} |
| 646 |
|
| 647 |
bool CIndividualSaturationProcessNode::addMaxAtmostCardinalityCandidate(cint64 atmostCardinality) { |
| 648 |
if (atmostCardinality > mMaxAtmostCardinality) { |
| 649 |
mMaxAtmostCardinality = atmostCardinality; |
| 650 |
return true; |
| 651 |
} |
| 652 |
return false; |
| 653 |
} |
| 654 |
|
| 655 |
cint64 CIndividualSaturationProcessNode::getMaxAtleastCardinalityCandidate() { |
| 656 |
return mMaxAtleastCardinality; |
| 657 |
} |
| 658 |
|
| 659 |
cint64 CIndividualSaturationProcessNode::getMaxAtmostCardinalityCandidate() { |
| 660 |
return mMaxAtmostCardinality; |
| 661 |
} |
| 662 |
|
| 663 |
bool CIndividualSaturationProcessNode::hasNominalIndividualTriplesAssertions() { |
| 664 |
return mNominalIndiTriplesAssertions; |
| 665 |
} |
| 666 |
|
| 667 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setNominalIndividualTriplesAssertions(bool hasNominalAssertions) { |
| 668 |
mNominalIndiTriplesAssertions = hasNominalAssertions; |
| 669 |
return this; |
| 670 |
} |
| 671 |
|
| 672 |
bool CIndividualSaturationProcessNode::areNominalIndividualTriplesAssertionsLoaded() { |
| 673 |
return mLoadedNominalIndiTriplesAssertions; |
| 674 |
} |
| 675 |
|
| 676 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setNominalIndividualTriplesAssertionsLoaded(bool loaded) { |
| 677 |
mLoadedNominalIndiTriplesAssertions = loaded; |
| 678 |
return this; |
| 679 |
} |
| 680 |
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
bool CIndividualSaturationProcessNode::isOccurrenceStatisticsCollectingRequired() { |
| 685 |
return mOccurrenceStatisticsCollectingRequired; |
| 686 |
} |
| 687 |
|
| 688 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setOccurrenceStatisticsCollectingRequired(bool collectingRequired) { |
| 689 |
mOccurrenceStatisticsCollectingRequired = collectingRequired; |
| 690 |
return this; |
| 691 |
} |
| 692 |
|
| 693 |
bool CIndividualSaturationProcessNode::isOccurrenceStatisticsCollected() { |
| 694 |
return mOccurrenceStatisticsCollected; |
| 695 |
} |
| 696 |
|
| 697 |
CIndividualSaturationProcessNode* CIndividualSaturationProcessNode::setOccurrenceStatisticsCollected(bool collected) { |
| 698 |
mOccurrenceStatisticsCollected = collected; |
| 699 |
return this; |
| 700 |
} |
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
|
| 705 |
}; // end namespace Process |
| 706 |
|
| 707 |
}; // end namespace Kernel |
| 708 |
|
| 709 |
}; // end namespace Reasoner |
| 710 |
|
| 711 |
}; // end namespace Konclude |
| 712 |
|