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 conteneur
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é
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
SPLiiNe
Multi-Objectives_Optimization_IBEA
Validations
6e047fbe
Valider
6e047fbe
rédigé
8 years ago
par
Jonathan CROUZET
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Implemented binary tournament for Population
parent
74f9bf69
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/ibea/tournament.cpp
+25
-1
25 ajouts, 1 suppression
src/ibea/tournament.cpp
src/ibea/tournament.h
+4
-1
4 ajouts, 1 suppression
src/ibea/tournament.h
avec
29 ajouts
et
2 suppressions
src/ibea/tournament.cpp
+
25
−
1
Voir le fichier @
6e047fbe
#include
"../coco/coco.h"
#include
"population.h"
#include
"population.h"
#include
"tournament.h"
#include
"tournament.h"
void
binary_tournament
(
Population
pop_in
,
Population
pop_out
){
void
binary_tournament
(
Population
population_in
,
&
Population
population_out
,
int
mu
,
coco_random_state_t
*
random_generator
)
{
int
size_in
=
population_in
.
getCurrentSize
();
int
size_out
=
population_out
.
getCurrentSize
();
int
i
,
j
for
(
int
k
=
0
;
k
<
mu
;
k
++
){
i
=
(
int
)
coco_random_uniform
(
random_generator
)
*
size_in
j
=
(
int
)
coco_random_uniform
(
random_generator
)
*
size_in
if
(
population_in
.
getFit
(
i
)
>
population_in
.
getFit
(
j
))
{
for
(
int
m
=
0
;
m
<
population_out
.
getDim
();
m
++
){
population_out
.
setIndiv
(
size_out
+
k
,
m
,
population_in
.
getIndiv
(
i
,
m
))
}
}
else
{
for
(
int
m
=
0
;
m
<
population_out
.
getDim
();
m
++
){
population_out
.
setIndiv
(
size_out
+
k
,
m
,
population_in
.
getIndiv
(
j
,
m
))
}
}
}
}
}
Ce diff est replié.
Cliquez pour l'agrandir.
src/ibea/tournament.h
+
4
−
1
Voir le fichier @
6e047fbe
#ifndef TOURNAMENT_H
#ifndef TOURNAMENT_H
#define TOURNAMENT_H
#define TOURNAMENT_H
void
binary_tournament
(
Population
pop_in
,
Population
pop_out
);
void
binary_tournament
(
Population
population_in
,
Population
population_out
,
int
mu
,
coco_random_state_t
*
random_generator
);
#endif
#endif
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