NNGGA Group. More...
#include <rgroupnn.h>
Public Member Functions | |
RGroupNN (RGroupNN *grp) | |
RGroupNN (cGroups *owner, const size_t id) | |
virtual void | Clear (void) |
bool | HasSameUser (const cObj *obj) const |
virtual bool | CanInsert (const cObj *obj) |
virtual void | PostInsert (const cObj *obj) |
virtual bool | PreInsertAll (const cGroup *from) |
virtual void | PostDelete (const cObj *obj) |
virtual bool | PreDeleteAll (void) |
virtual | ~RGroupNN (void) |
Public Member Functions inherited from RGroup< cGroup, cObj, cGroups > | |
RGroup (RGroup *grp) | |
RGroup (cGroups *owner, const size_t id) | |
virtual void | Verify (void) |
void | Insert (cObj *obj) |
void | Delete (cObj *obj) |
virtual bool | IsCompatible (const cObj *obj) |
virtual bool | CanDelete (const cObj *obj) |
size_t | GetId (void) const |
size_t | GetNbObjs (void) const |
size_t | GetObjsPos (void) const |
RCursor< cObj > | GetObjs (void) const |
bool | IsIn (const size_t id) const |
bool | CommonObjs (const cGroup *grp) const |
virtual bool | IsCompatible (const cGroup *grp) const |
bool | SameObjs (const cGroup *grp) const |
size_t * | GetObjectsId (void) const |
int | Compare (const cGroup &grp) const |
cObj * | GetObjPos (const size_t pos) |
virtual | ~RGroup (void) |
Protected Attributes | |
bool | ToEval |
Protected Attributes inherited from RGroup< cGroup, cObj, cGroups > | |
size_t | Id |
cGroups * | Owner |
size_t | SubObjects |
size_t | NbSubObjects |
bool | Reserved |
Detailed Description
template<class cGroup, class cObj, class cGroups>
class R::RGroupNN< cGroup, cObj, cGroups >
NNGGA Group.
The RGroupNN provides a representation for a group for the Nearest Neighbors Grouping Genetic Algorithm.
Constructor & Destructor Documentation
Construct the group.
- Parameters
-
grp Group used as source.
RGroupNN | ( | cGroups * | owner, |
const size_t | id | ||
) |
Construct the group.
- Parameters
-
owner Owner of the group. id Identifier of the group.
|
virtual |
Destruct the group.
Member Function Documentation
|
virtual |
Clear the information container in a group.
Reimplemented from RGroup< cGroup, cObj, cGroups >.
bool HasSameUser | ( | const cObj * | obj | ) | const |
Verify if an object has the same parent as another object of the group.
- Parameters
-
obj Pointer to the object to insert.
|
virtual |
Look if an object can be insert in the group. In practice, the object must have a minimum similarity and maximum disagreement with the objects of the group. Moreover, two objects having the same parents cannot be grouped together. not allowed.
- Parameters
-
obj Object to insert.
Reimplemented from RGroup< cGroup, cObj, cGroups >.
|
virtual |
Method call after an object was inserted in the group.
- Parameters
-
obj Object to insert.
Reimplemented from RGroup< cGroup, cObj, cGroups >.
|
virtual |
Method call before all the objects of a given group are inserted into the current one. This method can be used to copy internal information from one group to the other.
- Parameters
-
from The group used as source.
- Returns
- false (the values are update in the method).
Reimplemented from RGroup< cGroup, cObj, cGroups >.
|
virtual |
Method call after an object was deleted from the group.
- Parameters
-
obj Object to delete.
Reimplemented from RGroup< cGroup, cObj, cGroups >.
|
virtual |
Method call each time all the objects are deleted from the group.
- Returns
- false (the values are update in the method).
Reimplemented from RGroup< cGroup, cObj, cGroups >.
Member Data Documentation
|
protected |
Must the group be re-evaluated?