List of Attributes. More...
#include <rattrlist.h>
Public Member Functions | |
RAttrList (const size_t MaxSize) | |
RAttrList (const RAttrList &lst) | |
bool | IsParent (const RAttrList &Child) const |
bool | IsInter (const RAttrList &PosAttr) const |
size_t | GetNbCommon (const RAttrList &PosAttr) const |
void | Diff (const RAttrList &Top, const RAttrList &Child) |
void | Inter (const RAttrList &Fst, const RAttrList &Sec) |
size_t | FindFirstDiff (const RAttrList &PosAttr) const |
RAttrList & | operator= (const RAttrList &src) |
size_t | GetNbAttr (void) const |
void | Print (void) const |
virtual | ~RAttrList (void) |
Public Member Functions inherited from RNumContainer< size_t, true > | |
RNumContainer (size_t max) | |
RNumContainer (const RNumContainer &vector) | |
void | Verify (size_t max) |
void | Init (size_t nb, size_tval) |
int | Compare (const RNumContainer< size_t, true > &) const |
size_t | GetIndex (size_tnb, bool &find) const |
bool | IsSame (const RNumContainer &vi) const |
bool | IsIn (size_tvalue) const |
size_t | Insert (size_tins) |
void | InsertAt (size_tins, size_t pos, bool replace=false) |
void | Delete (size_tdel) |
void | DeleteAt (size_t pos, bool shift=true) |
void | Clear (void) |
void | ReOrder (void) |
void | Randomize (RRandom *rand, size_t nb=0) |
RNumContainer & | operator= (const RNumContainer< size_t, bOrder1 > &src) |
RNumContainer< size_t, true > & | Add (const RNumContainer< size_t, bOrder1 > &src) |
size_t | operator[] (size_t i) const |
size_t & | operator[] (size_t i) |
const size_t * | GetList (void) const |
size_t | GetNb (void) const |
void | Inter (const RNumContainer< size_t, bOrder1 > &src1, const RNumContainer< size_t, bOrder2 > &src2) |
void | Union (const RNumContainer< size_t, bOrder1 > &src1, const RNumContainer< size_t, bOrder2 > &src2) |
~RNumContainer (void) | |
Additional Inherited Members | |
Protected Attributes inherited from RNumContainer< size_t, true > | |
size_t | NbInt |
size_t | MaxInt |
size_t * | List |
Detailed Description
List of Attributes.
The RAttrList class provides a representation of a list of attributes, each attribute is represented by a number. The objects and the nodes are using this class.
Constructor & Destructor Documentation
RAttrList | ( | const size_t | MaxSize | ) |
Construct the list of attributes.
- Parameters
-
MaxSize The maximum number of attributes.
|
virtual |
Destructor of the list.
Member Function Documentation
bool IsParent | ( | const RAttrList & | Child | ) | const |
Look if the current list of attributes is a parent of another list. To be a parent, all the attributes of the current list must be present in the child list.
- Parameters
-
Child List to verify if it is child.
- Returns
- True if the list can be attached, false else.
bool IsInter | ( | const RAttrList & | PosAttr | ) | const |
Verify if there is an intersection between two list of attributes.
- Parameters
-
PosAttr The list of attribute to used for the comparison. return True if there is an intersection, false else.
size_t GetNbCommon | ( | const RAttrList & | PosAttr | ) | const |
Count the number of attributes in common in the two list.
- Parameters
-
PosAttr The list of attribute to used for the comparison.
Compute the difference between two lists in the current one. This means all the attributes that are in the second list and not in the first one.
- Parameters
-
Top The top list used. Child The child list used.
n Compute the intersection between two lists in the current one. This means all the attributes that are in the two lists.
- Parameters
-
Fst The first list. Sec The second list.
size_t FindFirstDiff | ( | const RAttrList & | PosAttr | ) | const |
Find the first different attribute between two lists.
- Parameters
-
PosAttr The list used.
- Returns
- The attribute if one different found, NoAttr else.
Assignment operator.
- Parameters
-
src List used for the assignment.
size_t GetNbAttr | ( | void | ) | const |
Get the number of attributes in the list.
- Returns
- size_t
void Print | ( | void | ) | const |
Print the contains to the screen (separated by tabs).