Concept Reference. More...
#include <gconceptref.h>
Public Member Functions | |
GConceptRef (GConcept *concept) | |
GConceptRef (GConcept *concept, double w) | |
GConceptRef (const GConceptRef &ref) | |
int | Compare (const GConceptRef &ref) const |
int | Compare (const GConcept &concept) const |
int | Compare (const GConcept *concept) const |
size_t | GetId (void) const |
GConcept * | GetConcept (void) const |
GConceptType * | GetType (void) const |
size_t | GetTypeId (void) const |
double | GetWeight (void) const |
void | SetWeight (double w) |
GConceptRef & | operator= (const GConceptRef &ref) |
GConceptRef & | operator+= (double w) |
GConceptRef & | operator-= (double w) |
GConceptRef & | operator*= (double w) |
GConceptRef & | operator/= (double w) |
virtual | ~GConceptRef (void) |
Protected Attributes | |
GConcept * | Concept |
double | Weight |
Detailed Description
Concept Reference.
The GConceptRef class provides a representation for reference of a given concept in a vector. In practice, it is composed from a concept and an associated weight.
Constructor & Destructor Documentation
GConceptRef | ( | GConcept * | concept | ) |
Constructor of a concept reference.
- Parameters
-
concept Concept.
GConceptRef | ( | GConcept * | concept, |
double | w | ||
) |
Constructor of a concept reference.
- Parameters
-
concept Concept. w Weight associated with the reference.
GConceptRef | ( | const GConceptRef & | ref | ) |
Copy constructor of a concept reference.
- Parameters
-
ref Concept reference.
|
virtual |
Destructor of a concept reference.
Member Function Documentation
int Compare | ( | const GConceptRef & | ref | ) | const |
Compare two concept references related to their concept.
- See also
- R::RContainer
- Parameters
-
ref Concept reference.
- Returns
- int
int Compare | ( | const GConcept & | concept | ) | const |
Compare a concept reference and a concept.
- See also
- R::RContainer
- Parameters
-
concept Concept.
- Returns
- int
int Compare | ( | const GConcept * | concept | ) | const |
Compare a concept reference and a concept.
- See also
- R::RContainer
- Parameters
-
concept Concept.
- Returns
- int
size_t GetId | ( | void | ) | const |
Get the identifier of the concept.
GConcept* GetConcept | ( | void | ) | const |
Get the concept.
GConceptType* GetType | ( | void | ) | const |
Get the type of the concept.
size_t GetTypeId | ( | void | ) | const |
Get the identifier of the type of the concept.
double GetWeight | ( | void | ) | const |
Get the weight of the concept reference.
- Returns
- Weight as double.
void SetWeight | ( | double | w | ) |
Set the weight of the concept reference.
- Parameters
-
w Weight.
GConceptRef& operator= | ( | const GConceptRef & | ref | ) |
Assignment operator for concept references.
- Parameters
-
ref Concept reference.
GConceptRef& operator+= | ( | double | w | ) |
Add a weight to the current one.
- Parameters
-
w Weight to add.
GConceptRef& operator-= | ( | double | w | ) |
Subtract a weight to the current one.
- Parameters
-
w Weight to subtract.
GConceptRef& operator*= | ( | double | w | ) |
Multiply a weight to the current one.
- Parameters
-
w Weight to multiply.
GConceptRef& operator/= | ( | double | w | ) |
Divide a weight to the current one.
- Parameters
-
w Weight to divide.
Member Data Documentation
|
protected |
Concept.
|
protected |
Weight associated with the concept.