Concept. More...
#include <gconcept.h>
Public Member Functions | |
| GConcept (const GConcept *concept) | |
| GConcept (GSession *session, const R::RString &name, GConceptType *type) | |
| GConcept (GSession *session, size_t id, const R::RString &name, GConceptType *type, size_t refdocs, size_t idxdocs, size_t refprofiles, size_t idxprofiles, size_t refcommunities, size_t idxcommunities, size_t reftopics, size_t idxtopics, size_t refclasses, size_t idxclasses) | |
| int | Compare (const GConcept &c) const |
| int | Compare (const R::RString &name) const |
| virtual tObjType | GetObjType (void) const |
| virtual GConcept * | DeepCopy (void) const |
| virtual size_t | HashIndex (size_t idx) const |
| GConceptType * | GetType (void) const |
| void | SetId (size_t id) |
| size_t | GetIndex (tObjType ObjType) const |
| void | SetIndex (tObjType ObjType, size_t index) |
| void | ClearIndex (tObjType type) |
| size_t | IncRef (tObjType ObjType) |
| size_t | DecRef (tObjType ObjType) |
| virtual void | ClearRefs (tObjType ObjType) |
| size_t | GetRef (tObjType ObjType) const |
| double | GetIF (tObjType ObjType) const |
| virtual void | Clear (void) |
| virtual bool | IsEmpty (void) const |
| virtual | ~GConcept (void) |
Protected Attributes | |
| GConceptType * | Type |
| size_t | NbRefDocs |
| double | IfDocs |
| size_t | IndexDocs |
| size_t | NbRefProfiles |
| double | IfProfiles |
| size_t | IndexProfiles |
| size_t | NbRefCommunities |
| double | IfCommunities |
| size_t | IndexCommunities |
| size_t | NbRefTopics |
| double | IfTopics |
| size_t | IndexTopics |
| size_t | NbRefClasses |
| double | IfClasses |
| size_t | IndexClasses |
Detailed Description
Concept.
The GConcept class provides a representation for a generic concept. A concept is a "representation" of a given piece of knowledge.
Constructor & Destructor Documentation
| GConcept | ( | GSession * | session, |
| const R::RString & | name, | ||
| GConceptType * | type | ||
| ) |
Constructor of a generic concept.
- Parameters:
-
session Session. name Name of the concept. type Type of the concept.
| GConcept | ( | GSession * | session, |
| size_t | id, | ||
| const R::RString & | name, | ||
| GConceptType * | type, | ||
| size_t | refdocs, | ||
| size_t | idxdocs, | ||
| size_t | refprofiles, | ||
| size_t | idxprofiles, | ||
| size_t | refcommunities, | ||
| size_t | idxcommunities, | ||
| size_t | reftopics, | ||
| size_t | idxtopics, | ||
| size_t | refclasses, | ||
| size_t | idxclasses | ||
| ) |
Constructor of a generic concept.
- Parameters:
-
session Session. id Identifier. name Name of the concept. type Type of the concept. refdocs Number of documents referenced. idxdocs Identifier of the block the inverted file related to the documents. refprofiles Number of profiles referenced. idxprofiles Identifier of the block the inverted file related to the profiles. refcommunities Number of communities referenced. idxcommunities Identifier of the block the inverted file related to the communities. reftopics Number of topics referenced. idxtopics Identifier of the block the inverted file related to the topics. refclasses Number of classes referenced. idxclasses Identifier of the block the inverted file related to the classes.
| virtual ~GConcept | ( | void | ) | [virtual] |
Destruct the concept.
Member Function Documentation
| int Compare | ( | const R::RString & | name | ) | const |
| virtual tObjType GetObjType | ( | void | ) | const [virtual] |
- Returns:
- the type of the object.
Reimplemented from GObject.
Do a deep copy of the current concept.
- Returns:
- Pointer to a new element created.
Reimplemented in GConceptList.
| virtual size_t HashIndex | ( | size_t | idx | ) | const [virtual] |
Compute the first hash index of the name of a concept.
- See also:
- R::RHashContainer
- Parameters:
-
idx Index of the hash index.
| GConceptType* GetType | ( | void | ) | const |
Get the type of the concept.
| void SetId | ( | size_t | id | ) |
- Returns:
- the block index of the concept for a given object type.
- Parameters:
-
ObjType Type of the reference.
Set the block index of the concept for a given object type.
- Parameters:
-
ObjType Type of the reference. index Index to set.
| void ClearIndex | ( | tObjType | type | ) |
Clear the block index of the concept for a given object type.
- Parameters:
-
ObjType Type of the reference.
Increase the number of references on this concept for a given object type.
- Parameters:
-
ObjType Type of the reference.
Decrease the number of references on this concept for a given object type.
- Parameters:
-
ObjType Type of the reference.
Clear the information of the references of the concept linked to a specific object.
- Parameters:
-
ObjType Type of the object.
Get the number of references on this concept for a given object type.
- Parameters:
-
ObjType Type of the reference. If otAnyType, the method returns the number of references of all the objects.
- Returns:
- size_t.
Compute the inverse factor of the concept for a given object type (such as the 'idf' for documents). In practice, the factor is computed once.
- Returns:
- Inverse factor
- Parameters:
-
ObjType Type of the reference.
| virtual void Clear | ( | void | ) | [virtual] |
Clear all the information of the concept.
Reimplemented in GConceptList.
| virtual bool IsEmpty | ( | void | ) | const [virtual] |
Test if the concept is considered as empty. By default, every concept defined by a non-empty name, is also considered as not empty.
Reimplemented in GConceptList.
Member Data Documentation
GConceptType* Type [protected] |
Type of the concept.
size_t NbRefDocs [protected] |
Number of references in documents.
double IfDocs [protected] |
Inverse factor for documents.
size_t IndexDocs [protected] |
Identifier of the block in the inverted file for the documents.
size_t NbRefProfiles [protected] |
Number of references in profiles.
double IfProfiles [protected] |
Inverse factor for profiles.
size_t IndexProfiles [protected] |
Identifier of the block in the inverted file for the profiles.
size_t NbRefCommunities [protected] |
Number of references in communities.
double IfCommunities [protected] |
Inverse factor for communities.
size_t IndexCommunities [protected] |
Identifier of the block in the inverted file for the communities.
size_t NbRefTopics [protected] |
Number of references in topics.
double IfTopics [protected] |
Inverse factor for topics.
size_t IndexTopics [protected] |
Identifier of the block in the inverted file for the topics.
size_t NbRefClasses [protected] |
Number of references in classes.
double IfClasses [protected] |
Inverse factor for classes.
size_t IndexClasses [protected] |
Identifier of the block in the inverted file for the classes.