Community. More...
#include <gcommunity.h>
Public Member Functions | |
GCommunity (GSession *session, const R::RString &name) | |
GCommunity (GSession *session, size_t id, size_t blockid, const R::RString &name, const R::RDate &u, const R::RDate &c) | |
virtual R::RCString | GetClassName (void) const |
virtual GMeasure * | GetSimMeasure (void) const |
void | GetRelevantDocs (GCommunityDocs &docs) |
void | Update (GDescription &desc) |
virtual | ~GCommunity (void) |
Public Member Functions inherited from GGroup< GProfile, GCommunity, otCommunity > | |
GGroup (GSession *session, size_t id, size_t blockid, const R::RString &name, const R::RDate &u, const R::RDate &c) | |
GSubjectData< GProfile > * | GetData (void) const |
int | Compare (const GGroup &grp) const |
R::RDate | GetUpdated (void) const |
R::RDate | GetComputed (void) const |
bool | IsIn (const GProfile *obj) const |
void | DeleteObj (GProfile *obj) |
void | InsertObj (GProfile *obj) |
void | InsertObjs (R::RCursor< GProfile > objs) |
void | InsertPtr (GProfile *obj) |
void | DeleteObjs (void) |
R::RCursor< GProfile > | GetObjs (void) const |
R::RCursor< GProfile > | GetCursor (void) const |
size_t | GetNbObjs (void) const |
size_t | GetNbObjs (const GSubject *subject) const |
GProfile * | RelevantObj (void) const |
GProfile * | RelevantObj (double &avgsim) const |
double | ComputeSumSim (GMeasure *measure, const GProfile *obj) const |
void | Clear (bool disk) |
void | HasUpdate (GProfile *obj) |
virtual | ~GGroup (void) |
Public Member Functions inherited from GDescriptionObject< C > | |
GDescriptionObject (GSession *session, size_t id, size_t blockid, tObjType objtype, const R::RString &name) | |
void | ReleaseVectors (void) |
const GDescription & | operator() (void) const |
R::RConstCursor< GVector > | GetVectors (void) const |
const GVector * | GetVector (GConcept *metaconcept) const |
bool | IsIn (const GConcept *concept) const |
bool | IsDefined (void) const |
tObjState | GetState (void) const |
size_t | GetId (void) const |
size_t | GetBlockId (void) const |
virtual | ~GDescriptionObject (void) |
Public Member Functions inherited from GObject | |
GObject (GSession *session, size_t id, const R::RString &name, tObjType type) | |
GObject (const GObject &obj) | |
void | VerifyStatements (tStatementElement what, size_t size) |
int | Compare (const GObject &obj) const |
int | Compare (size_t id) const |
int | Search (const GObject &obj) const |
int | Search (const R::RString &name) const |
GSession * | GetSession (void) const |
size_t | GetId (void) const |
void | SetId (size_t id) |
tObjType | GetObjType (void) const |
R::RCursor< GStatement > | GetObjs (const GStatement *obj, tStatementElement what) |
virtual void | HandlerNotFound (const R::RNotification ¬ification) |
virtual | ~GObject (void) |
Public Member Functions inherited from RObject | |
RObject (const RString &name=RString::Null) | |
int | Compare (const RObject &obj) const |
RString | GetName (void) const |
void | PostNotification (const hNotification handle) |
void | PostNotification (const RCString &name) |
void | PostNotification (const hNotification handle, T data) |
void | PostNotification (const RCString &name, T data) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const RCString &name, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle) |
void | InsertObserver (tNotificationHandler handler, const RCString &name) |
void | InsertObserver (tNotificationHandler handler, RObject *object) |
void | InsertObserver (tNotificationHandler handler) |
void | DeleteObserver (void) |
void | DeleteObserver (const hNotification handle, RObject *object) |
void | DeleteObserver (const RCString &name, RObject *object) |
hNotification | GetNotificationHandle (const RCString &name) const |
RCString | GetNotificationName (const hNotification handle) const |
virtual | ~RObject (void) |
Static Public Member Functions | |
static tObjType | GetType (void) |
Static Public Member Functions inherited from GDescriptionObject< C > | |
static bool | HasDesc (void) |
Static Public Member Functions inherited from GObject | |
static bool | HasDesc (void) |
static bool | HasTree (void) |
Additional Inherited Members | |
Protected Member Functions inherited from RContainer< GProfile, false, true > | |
RContainer (size_t m, size_t i=0) | |
RContainer (const RContainer< GProfile, true, true > &src) | |
RContainer (const RContainer< GProfile, false, true > &src) | |
int | Compare (const RContainer< GProfile, false, true > &) const |
size_t | GetNb (void) const |
size_t | GetMaxPos (void) const |
size_t | GetMaxNb (void) const |
size_t | GetIncNb (void) const |
bool | VerifyIndex (size_t idx) const |
void | VerifyTab (size_t max=0) |
void | Clear (size_t m=0, size_t i=0, bool force=false) |
void | ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max) |
void | ReOrder (int sortOrder(const void *, const void *)) |
void | ReOrder (void) |
void | Exchange (size_t pos1, size_t pos2) |
void | Shift (size_t idx, bool reverse) |
void | Transfer (RContainer< GProfile, a, o > &src) |
RContainer & | operator= (const RContainer< GProfile, true, true > &src) |
RContainer & | operator= (const RContainer< GProfile, false, true > &src) |
void | Copy (const RContainer< GProfile, a, true > &src) |
RContainer & | operator+= (const RContainer< GProfile, a, o > &src) |
size_t | GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const |
bool | IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const |
bool | IsIn (const TUse &tag, size_t min=0, size_t max=0) const |
const GProfile * | operator[] (size_t idx) const |
GProfile * | operator[] (size_t idx) |
const GProfile * | GetPtrAt (size_t idx) const |
GProfile * | GetPtrAt (size_t idx) |
GProfile * | GetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const |
GProfile * | GetPtr (const TUse &tag, size_t min=0, size_t max=0) const |
GProfile * | GetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) |
GProfile * | GetInsertPtr (const TUse &tag, size_t min=0, size_t max=0) |
GProfile * | GetInsertPtrAt (const TUse &tag, size_t pos) |
RContainer< GProfile, false, true > * | GetPtrs (const TUse &tag, size_t min=0, size_t max=0) const |
size_t | GetTab (const void **tab, size_t min=0, size_t max=0) const |
size_t | GetTab (void **tab, size_t min=0, size_t max=0) |
size_t | GetTab (const GProfile **tab, size_t min=0, size_t max=0) const |
size_t | GetTab (GProfile **tab, size_t min=0, size_t max=0) |
void | InsertPtrAt (GProfile *ins, size_t pos, bool del) |
void | InsertPtrAt (GProfile *ins, size_t pos) |
void | InsertPtr (GProfile *ins, bool del=false, size_t min=0, size_t max=0) |
void | DeletePtrAt (size_t pos, bool shift, bool del) |
void | DeletePtrAt (size_t pos, bool shift) |
void | DeletePtrAt (size_t pos) |
void | DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0) |
void | DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) |
void | DeletePtr (const TUse &tag, size_t min=0, size_t max=0) |
void | Inter (const iRContainer< GProfile > &src1, const iRContainer< GProfile > &src2) |
void | Union (const iRContainer< GProfile > &src1, const iRContainer< GProfile > &src2) |
virtual | ~RContainer (void) |
Protected Member Functions inherited from iRContainer< C > | |
void | Create (const iRContainer< C > &src) |
iRContainer & | NormalCopy (const iRContainer< C > &src) |
void | DeepCopy (const iRContainer< C > &src) |
iRContainer & | Add (const iRContainer< C > &src) |
size_t | GetNb (void) const |
size_t | GetMaxPos (void) const |
size_t | GetMaxNb (void) const |
size_t | GetIncNb (void) const |
bool | VerifyIndex (size_t idx) const |
void | VerifyTab (size_t max=0) |
void | Clear (size_t m=0, size_t i=0, bool force=false) |
void | ReOrder (int sortOrder(const void *, const void *), size_t min, size_t max) |
void | ReOrder (int sortOrder(const void *, const void *)) |
void | ReOrder (void) |
void | Exchange (size_t pos1, size_t pos2) |
void | Shift (size_t idx, bool reverse) |
void | Transfer (iRContainer< C > &src) |
iRContainer & | operator= (const iRContainer< C > &src) |
void | Copy (const iRContainer< C > &src) |
iRContainer & | operator+= (const iRContainer< C > &src) |
size_t | GetIndex (bool order, const TUse &tag, bool &find, size_t min=0, size_t max=0) const |
size_t | GetIndex (const TUse &tag, bool &find, size_t min=0, size_t max=0) const |
bool | IsIn (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const |
bool | IsIn (const TUse &tag, size_t min=0, size_t max=0) const |
const C * | operator[] (size_t idx) const |
C * | operator[] (size_t idx) |
const C * | GetPtrAt (size_t idx) const |
C * | GetPtrAt (size_t idx) |
C * | GetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const |
C * | GetPtr (const TUse &tag, size_t min=0, size_t max=0) const |
C * | GetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) |
C * | GetInsertPtr (const TUse &tag, size_t min=0, size_t max=0) |
C * | GetInsertPtrAt (const TUse &tag, size_t pos) |
size_t | GetTab (const void **tab, size_t min=0, size_t max=0) const |
size_t | GetTab (void **tab, size_t min=0, size_t max=0) |
size_t | GetTab (const C **tab, size_t min=0, size_t max=0) const |
size_t | GetTab (C **tab, size_t min=0, size_t max=0) |
void | InsertPtrAt (C *ins, size_t pos, bool del) |
void | InsertPtrAt (C *ins, size_t pos) |
void | InsertPtr (C *ins, bool del=false, size_t min=0, size_t max=0) |
void | DeletePtrAt (size_t pos, bool shift, bool del) |
void | DeletePtrAt (size_t pos, bool shift) |
void | DeletePtrAt (size_t pos) |
void | DeletePtr (const TUse &tag, bool sortkey, bool del, size_t min=0, size_t max=0) |
void | DeletePtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) |
void | DeletePtr (const TUse &tag, size_t min=0, size_t max=0) |
void | Inter (const iRContainer< C > &src1, const iRContainer< C > &src2) |
void | Union (const iRContainer< C > &src1, const iRContainer< C > &src2) |
virtual | ~iRContainer (void) |
Protected Member Functions inherited from GDescriptionObject< C > | |
virtual bool | LoadVectors (void) |
GDescriptionObject (GSession *session, size_t id, size_t blockid, tObjType objtype, const R::RString &name) | |
void | ReleaseVectors (void) |
const GDescription & | operator() (void) const |
R::RConstCursor< GVector > | GetVectors (void) const |
const GVector * | GetVector (GConcept *metaconcept) const |
bool | IsIn (const GConcept *concept) const |
bool | IsDefined (void) const |
tObjState | GetState (void) const |
size_t | GetId (void) const |
size_t | GetBlockId (void) const |
virtual | ~GDescriptionObject (void) |
Protected Member Functions inherited from GObject | |
GObject (GSession *session, size_t id, const R::RString &name, tObjType type) | |
GObject (const GObject &obj) | |
void | VerifyStatements (tStatementElement what, size_t size) |
int | Compare (const GObject &obj) const |
int | Compare (size_t id) const |
int | Search (const GObject &obj) const |
int | Search (const R::RString &name) const |
GSession * | GetSession (void) const |
size_t | GetId (void) const |
void | SetId (size_t id) |
tObjType | GetObjType (void) const |
R::RCursor< GStatement > | GetObjs (const GStatement *obj, tStatementElement what) |
virtual void | HandlerNotFound (const R::RNotification ¬ification) |
virtual | ~GObject (void) |
Protected Member Functions inherited from RObject | |
RObject (const RString &name=RString::Null) | |
int | Compare (const RObject &obj) const |
RString | GetName (void) const |
void | PostNotification (const hNotification handle) |
void | PostNotification (const RCString &name) |
void | PostNotification (const hNotification handle, T data) |
void | PostNotification (const RCString &name, T data) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const RCString &name, RObject *object) |
void | InsertObserver (tNotificationHandler handler, const hNotification handle) |
void | InsertObserver (tNotificationHandler handler, const RCString &name) |
void | InsertObserver (tNotificationHandler handler, RObject *object) |
void | InsertObserver (tNotificationHandler handler) |
void | DeleteObserver (void) |
void | DeleteObserver (const hNotification handle, RObject *object) |
void | DeleteObserver (const RCString &name, RObject *object) |
hNotification | GetNotificationHandle (const RCString &name) const |
RCString | GetNotificationName (const hNotification handle) const |
virtual | ~RObject (void) |
Static Protected Member Functions inherited from RContainer< GProfile, false, true > | |
static int | SortOrder (const void *a, const void *b) |
Static Protected Member Functions inherited from iRContainer< C > | |
static int | SortOrder (const void *a, const void *b) |
Static Protected Member Functions inherited from GDescriptionObject< C > | |
static bool | HasDesc (void) |
Static Protected Member Functions inherited from GObject | |
static bool | HasDesc (void) |
static bool | HasTree (void) |
Protected Attributes inherited from GGroup< GProfile, GCommunity, otCommunity > | |
R::RDate | Updated |
R::RDate | Computed |
GSubjectData< GProfile > * | Data |
Protected Attributes inherited from iRContainer< C > | |
C ** | Tab |
size_t | NbPtr |
size_t | MaxPtr |
size_t | LastPtr |
size_t | IncPtr |
Protected Attributes inherited from GDescriptionObject< C > | |
tObjState | State |
Protected Attributes inherited from GObject | |
GSession * | Session |
size_t | Id |
tObjType | ObjType |
R::RContainer< GStatement, false, true > * | Subjects |
R::RContainer< GStatement, false, false > * | Predicates |
R::RContainer< GStatement, false, false > * | Values |
Protected Attributes inherited from RObject | |
RString | Name |
Detailed Description
Community.
This class represent a virtual community, i.e. a group of profiles.
Constructor & Destructor Documentation
GCommunity | ( | GSession * | session, |
const R::RString & | name | ||
) |
Construct a new community group.
- Parameters
-
session Session. name Name of the community.
GCommunity | ( | GSession * | session, |
size_t | id, | ||
size_t | blockid, | ||
const R::RString & | name, | ||
const R::RDate & | u, | ||
const R::RDate & | c | ||
) |
Construct a community with a specific identifier.
- Parameters
-
session Session. id Identifier. blockid Identifier of the block. name Name of the community. u Date of the last updated. c Date of the last computation.
|
virtual |
Destructor of a group.
Member Function Documentation
|
virtual |
- Returns
- the class name.
Reimplemented from GObject.
|
static |
Give the type of the object.
- Returns
- otCommunity
|
virtual |
Get the similarity measure that must be used when computing the similarity between the profiles grouped.
Implements GGroup< GProfile, GCommunity, otCommunity >.
void GetRelevantDocs | ( | GCommunityDocs & | docs | ) |
Get the list of relevant documents, i.e. documents assessed as relevant by at least one profile of the community. All the documents have a null ranking.
If a document is assessed one time as relevant and multiple times as irrelevant, it is also added to the list.
- Parameters
-
docs List that will be filled (and cleared before).
void Update | ( | GDescription & | desc | ) |
Update the representation of the community once a computation was done. The computed date and the status are updated.
If the community is an internal one, the following steps are done:
- An 'hCommunities[oeAboutToBeUpdated]' notification is send.
- The references are updated.
- Existing in memory description is replaced.
- If necessary, the community and its description are saved.
- An 'hCommunities[oeUpdated]' notification is send.
If the community is an external one, its description is replaced.
- Parameters
-
desc Description to assign.
- Warning
- The description is cleared by this method.