| 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_CLASSIFIER_COPTIMIZEDSUBCLASSONTOLOGYCLASSIFICATIONITEM_H |
| 22 |
#define KONCLUDE_REASONER_CLASSIFIER_COPTIMIZEDSUBCLASSONTOLOGYCLASSIFICATIONITEM_H |
| 23 |
|
| 24 |
// Libraries includes |
| 25 |
|
| 26 |
|
| 27 |
// Namespace includes |
| 28 |
#include "ClassifierSettings.h" |
| 29 |
#include "COntologyClassClassificationItem.h" |
| 30 |
#include "COptimizedSubClassSatisfiableTestingItem.h" |
| 31 |
|
| 32 |
|
| 33 |
// Other includes |
| 34 |
#include "Reasoner/Ontology/CConceptReferenceLinking.h" |
| 35 |
|
| 36 |
|
| 37 |
// Logger includes |
| 38 |
#include "Logger/CLogger.h" |
| 39 |
|
| 40 |
|
| 41 |
namespace Konclude { |
| 42 |
|
| 43 |
namespace Reasoner { |
| 44 |
|
| 45 |
using namespace Ontology; |
| 46 |
|
| 47 |
namespace Classifier { |
| 48 |
|
| 49 |
|
| 50 |
/*! |
| 51 |
* |
| 52 |
* \class COptimizedSubClassOntologyClassificationItem |
| 53 |
* \author Andreas Steigmiller |
| 54 |
* \version 0.1 |
| 55 |
* \brief TODO |
| 56 |
* |
| 57 |
*/ |
| 58 |
class COptimizedSubClassOntologyClassificationItem : public COntologyClassClassificationItem { |
| 59 |
// public methods |
| 60 |
public: |
| 61 |
//! Constructor |
| 62 |
COptimizedSubClassOntologyClassificationItem(CConfigurationBase *configuration, CClassifierStatistics *nextClassificationStatistics = 0); |
| 63 |
|
| 64 |
//! Destructor |
| 65 |
virtual ~COptimizedSubClassOntologyClassificationItem(); |
| 66 |
|
| 67 |
QHash<CConcept*,COptimizedSubClassSatisfiableTestingItem*>* getConceptSatisfiableTestItemHash(); |
| 68 |
QList<COptimizedSubClassSatisfiableTestingItem*>* getConceptSatisfiableTestItemContainer(); |
| 69 |
COptimizedSubClassSatisfiableTestingItem* getTopConceptSatisfiableTestItem(); |
| 70 |
COptimizedSubClassSatisfiableTestingItem* getBottomConceptSatisfiableTestItem(); |
| 71 |
|
| 72 |
QList<COptimizedSubClassSatisfiableTestingItem*>* getNextSatisfiableTestingItemList(); |
| 73 |
QSet<COptimizedSubClassSatisfiableTestingItem*>* getNextCandidateSatisfiableTestingItemSet(); |
| 74 |
QSet<COptimizedSubClassSatisfiableTestingItem*>* getRemainingCandidateSatisfiableTestingItemSet(); |
| 75 |
|
| 76 |
|
| 77 |
COptimizedSubClassOntologyClassificationItem* initTopBottomSatisfiableTestingItems(COptimizedSubClassSatisfiableTestingItem* topItem, COptimizedSubClassSatisfiableTestingItem* bottomItem); |
| 78 |
|
| 79 |
|
| 80 |
COptimizedSubClassSatisfiableTestingItem* getConceptSatisfiableTestItem(CConcept* satTestConcept, bool create = false); |
| 81 |
|
| 82 |
|
| 83 |
cint64 getRemainingSatisfiableTestsCount(); |
| 84 |
cint64 getRunningSatisfiableTestsCount(); |
| 85 |
|
| 86 |
COptimizedSubClassOntologyClassificationItem* incRemainingSatisfiableTestsCount(cint64 incCount = 1); |
| 87 |
COptimizedSubClassOntologyClassificationItem* incRunningSatisfiableTestsCount(cint64 incCount = 1); |
| 88 |
COptimizedSubClassOntologyClassificationItem* decRemainingSatisfiableTestsCount(cint64 decCount = 1); |
| 89 |
COptimizedSubClassOntologyClassificationItem* decRunningSatisfiableTestsCount(cint64 decCount = 1); |
| 90 |
|
| 91 |
bool hasAllSatisfiableTestsCompleted(); |
| 92 |
bool hasRemainingSatisfiableTests(); |
| 93 |
|
| 94 |
|
| 95 |
QList<COptimizedSubClassSatisfiableTestingItem*>* getSatisfiableConceptItemList(); |
| 96 |
COptimizedSubClassOntologyClassificationItem* addSatisfiableConceptItem(COptimizedSubClassSatisfiableTestingItem* item); |
| 97 |
|
| 98 |
QHash<CConcept*,CClassificationSatisfiableCalculationConceptReferenceLinking*>* getConceptReferenceLinkingDataHash(); |
| 99 |
|
| 100 |
// protected methods |
| 101 |
protected: |
| 102 |
|
| 103 |
// protected variables |
| 104 |
protected: |
| 105 |
QHash<CConcept*,COptimizedSubClassSatisfiableTestingItem*> mConceptSatItemHash; |
| 106 |
QList<COptimizedSubClassSatisfiableTestingItem*> mSatTestItemContainer; |
| 107 |
COptimizedSubClassSatisfiableTestingItem* mTopSatTestItem; |
| 108 |
COptimizedSubClassSatisfiableTestingItem* mBottomSatTestItem; |
| 109 |
|
| 110 |
QList<COptimizedSubClassSatisfiableTestingItem*> mNextItemList; |
| 111 |
QSet<COptimizedSubClassSatisfiableTestingItem*> mNextCandItemSet; |
| 112 |
QSet<COptimizedSubClassSatisfiableTestingItem*> mRemainingCandItemSet; |
| 113 |
QHash<CConcept*,CClassificationSatisfiableCalculationConceptReferenceLinking*> mConceptRefLinkData; |
| 114 |
|
| 115 |
cint64 mRemainingSatTests; |
| 116 |
cint64 mRunningSatTests; |
| 117 |
|
| 118 |
QList<COptimizedSubClassSatisfiableTestingItem*> mSatisfiableItemList; |
| 119 |
|
| 120 |
|
| 121 |
// private methods |
| 122 |
private: |
| 123 |
|
| 124 |
// private variables |
| 125 |
private: |
| 126 |
|
| 127 |
}; |
| 128 |
|
| 129 |
}; // end namespace Classifier |
| 130 |
|
| 131 |
}; // end namespace Reasoner |
| 132 |
|
| 133 |
}; // end namespace Konclude |
| 134 |
|
| 135 |
#endif // KONCLUDE_REASONER_CLASSIFIER_COPTIMIZEDSUBCLASSONTOLOGYCLASSIFICATIONITEM_H |