Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
M
Multi-Objectives_Optimization_IBEA
Gestion
Activité
Membres
Programmation
Wiki externe
Code
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Déploiement
Releases
Registre de conteneurs
Registre de modèles
Analyse
Analyse des contributeurs
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
SPLiiNe
Multi-Objectives_Optimization_IBEA
Validations
77ab6a56
Valider
77ab6a56
rédigé
Il y a 8 ans
par
Matthieu RÉ
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Implement indicator.cpp
parent
16268cc4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
src/ibea/indicator.cpp
+42
-3
42 ajouts, 3 suppressions
src/ibea/indicator.cpp
avec
42 ajouts
et
3 suppressions
src/ibea/indicator.cpp
+
42
−
3
Voir le fichier @
77ab6a56
#include
"indicator.h"
#include
"indicator.h"
int
espsilon_indicator
(){
/**
* Returns the associated espsilon-indicator. In the complete algorithm, we only
* need to take as arguments an only vector, but we still use here A and B as
* sets of vectors. Furthermore, instead of calling in every
* epsilon_indicator the method coco_evaluate, we better save every f(x) and
* enter as parameters of the function the two vectors f(x1) and f(x2) we want
* to compare.
* @param fa: image of the first vector to compare by f
* @param fb: image of the second vector to compare by f
* @returns: the espsilon-indicator
*/
double
espsilon_indicator
(
double
[][]
a
,
double
[][]
b
,
int
dim_obj
=
a
[
0
],
int
dim_a
=
1
,
int
dim_b
=
1
)
{
int
i
,
j
,
k
;
double
eps
=
0.0
,
eps_j
=
0.0
,
eps_k
=
0.0
,
eps_temp
;
return
0
;
/* Here we search for the value of
* I (A, B) =
* min{eps} (∀x2 ∈ B ∃x1 ∈ A : fi(x1) − eps ≤ fi(x2) for i ∈ {1,...,n}).
* eps is between 0 and the dimension of the vectors
*
*/
for
(
i
=
0
;
i
<
dim_a
;
i
++
)
{
for
(
j
=
0
;
j
<
dim_b
;
j
++
)
{
for
(
k
=
0
;
k
<
dim_obj
;
k
++
)
{
eps_temp
=
b
[
j
][
k
]
-
a
[
i
][
k
];
if
(
k
==
0
)
eps_k
=
eps_temp
;
else
if
(
eps_k
<
eps_temp
)
eps_k
=
eps_temp
;
}
if
(
j
==
0
)
eps_j
=
eps_k
;
else
if
(
eps_j
>
eps_k
)
eps_j
=
eps_k
;
}
if
(
i
==
0
)
eps
=
eps_j
;
else
if
(
eps
<
eps_j
)
eps
=
eps_j
;
}
return
eps
;
}
}
}
\ No newline at end of file
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter