Linear PROMETHEE Criterion. More...

#include <rpromcriterion.h>

Inheritance diagram for RPromLinearCriterion:
[legend]
Collaboration diagram for RPromLinearCriterion:
[legend]

Public Member Functions

 RPromLinearCriterion (tCriteriaType type, double p, double q, double w, const RString &name=RString::Null, size_t nb=30)
 
 RPromLinearCriterion (tCriteriaType type, const RParam *params, const RString &name=RString::Null, size_t nb=30)
 
void Set (double p, double q, double w, bool active=true)
 
virtual void Set (const RParam *param)
 
double GetP (void) const
 
double GetQ (void) const
 
virtual double ComputePref (double u, double v)
 
- Public Member Functions inherited from RPromCriterion
 RPromCriterion (tCriteriaType type, double w, const RString &name=RString::Null, size_t nb=30)
 
int Compare (const RPromCriterion &crit) const
 
int Compare (const RPromCriterion *crit) const
 
int Compare (const size_t id) const
 
int Compare (const RString &name) const
 
int Compare (const char *name) const
 
bool IsActive (void) const
 
tCriteriaType GetType (void) const
 
double GetWeight (void) const
 
RString GetName (void) const
 
void Normalize (void)
 
void ComputeFiCrit (RPromKernel *kern)
 
 ~RPromCriterion (void)
 

Static Public Member Functions

static RParamStructCreateParam (const RString &name, const RString &desc=RString::Null)
 

Protected Attributes

double P
 
double Q
 
- Protected Attributes inherited from RPromCriterion
size_t Id
 
RString Name
 
tCriteriaType Type
 
double Weight
 
bool Active
 
- Protected Attributes inherited from iRContainer< C >
C ** Tab
 
size_t NbPtr
 
size_t MaxPtr
 
size_t LastPtr
 
size_t IncPtr
 

Additional Inherited Members

- Public Types inherited from RPromCriterion
enum  tCriteriaType { Minimize, Maximize }
 Criteria Type. More...
 
- Protected Member Functions inherited from RContainer< RPromCritValue, false, false >
 RContainer (size_t m, size_t i=0)
 
 RContainer (const RContainer< RPromCritValue, true, false > &src)
 
 RContainer (const RContainer< RPromCritValue, false, false > &src)
 
int Compare (const RContainer< RPromCritValue, false, false > &) 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< RPromCritValue, a, o > &src)
 
RContaineroperator= (const RContainer< RPromCritValue, true, false > &src)
 
RContaineroperator= (const RContainer< RPromCritValue, false, false > &src)
 
void Copy (const RContainer< RPromCritValue, a, false > &src)
 
RContaineroperator+= (const RContainer< RPromCritValue, 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 RPromCritValueoperator[] (size_t idx) const
 
RPromCritValueoperator[] (size_t idx)
 
const RPromCritValueGetPtrAt (size_t idx) const
 
RPromCritValueGetPtrAt (size_t idx)
 
RPromCritValueGetPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0) const
 
RPromCritValueGetPtr (const TUse &tag, size_t min=0, size_t max=0) const
 
RPromCritValueGetInsertPtr (const TUse &tag, bool sortkey, size_t min=0, size_t max=0)
 
RPromCritValueGetInsertPtr (const TUse &tag, size_t min=0, size_t max=0)
 
RPromCritValueGetInsertPtrAt (const TUse &tag, size_t pos)
 
RContainer< RPromCritValue,
false, false > * 
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 RPromCritValue **tab, size_t min=0, size_t max=0) const
 
size_t GetTab (RPromCritValue **tab, size_t min=0, size_t max=0)
 
void InsertPtrAt (RPromCritValue *ins, size_t pos, bool del)
 
void InsertPtrAt (RPromCritValue *ins, size_t pos)
 
void InsertPtr (RPromCritValue *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< RPromCritValue > &src1, const iRContainer< RPromCritValue > &src2)
 
void Union (const iRContainer< RPromCritValue > &src1, const iRContainer< RPromCritValue > &src2)
 
virtual ~RContainer (void)
 
- Protected Member Functions inherited from iRContainer< C >
void Create (const iRContainer< C > &src)
 
iRContainerNormalCopy (const iRContainer< C > &src)
 
void DeepCopy (const iRContainer< C > &src)
 
iRContainerAdd (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)
 
iRContaineroperator= (const iRContainer< C > &src)
 
void Copy (const iRContainer< C > &src)
 
iRContaineroperator+= (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)
 
- Static Protected Member Functions inherited from RContainer< RPromCritValue, false, false >
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)
 

Detailed Description

Linear PROMETHEE Criterion.

The RPromLinearCriterion class provides a representation for a PROMETHEE Criterion.

Constructor & Destructor Documentation

RPromLinearCriterion ( tCriteriaType  type,
double  p,
double  q,
double  w,
const RString name = RString::Null,
size_t  nb = 30 
)

Construct a criterion.

Parameters
typeType of the criterion.
pPreference threshold.
qIndifference threshold.
wWeight of the criterion.
nameName of the criterion.
nbNumber of solution.
RPromLinearCriterion ( tCriteriaType  type,
const RParam params,
const RString name = RString::Null,
size_t  nb = 30 
)

Construct a criterion.

Parameters
typeType of the criterion.
paramsParameters.
nameName of the criterion.
nbNumber of solution.

Member Function Documentation

void Set ( double  p,
double  q,
double  w,
bool  active = true 
)

Set the parameters.

Parameters
pPreference threshold.
qIndifference threshold.
wWeight of the criterion.
activeIs the criterion active ?
virtual void Set ( const RParam param)
virtual

Set the parameter of the parameter.

Parameters
paramPointer to a structure parameter.

Reimplemented from RPromCriterion.

double GetP ( void  ) const
Returns
the preference threshold.
double GetQ ( void  ) const
Returns
the indifference threshold.
virtual double ComputePref ( double  u,
double  v 
)
virtual

Compute the preference of a solution with the value u and a solution with the value v. This preference must be in [0,1].

This method compares the normalized difference of values, d:

  1. If d<Q=: No solutions must be preferred to the other one. The method returns 0.
  2. If Q<d<P: One of the solution has a degree of preference computed as (d-Q)/(P-Q).
  3. If d>=P: One of the solution must always be preferred. The method returns 1.
    Parameters
    uValue of the first solution.
    vValue of the second solution.
    Returns
    the result of the preference function defined.

Implements RPromCriterion.

static RParamStruct* CreateParam ( const RString name,
const RString desc = RString::Null 
)
static

Create a parameter corresponding to a PROMETHEE criteria.

Parameters
nameName of the criteria.
descDescription of the criteria.

Member Data Documentation

double P
protected

Value for the preference threshold of the PROMETHEE method.

double Q
protected

Value for the indifference threshold of the PROMETHEE method.