We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69379bb commit 749b4dcCopy full SHA for 749b4dc
1 file changed
core/src/main/kotlin/org/evomaster/core/search/gene/collection/EnumGene.kt
@@ -82,8 +82,15 @@ class EnumGene<T : Comparable<T>>(
82
83
val list = elements
84
.toList() // need ordering to specify index of selection, so Set would not do
85
- .sorted() // sort, to make meaningful list comparisons
86
.map { if (it is String) it.intern() as T else it } //if strings, make sure to intern them
+ .run {
87
+ if(valueNames == null){
88
+ sorted() // sort, to make meaningful list comparisons, but only if examples are not named.
89
+ // otherwise we lose vector alignment
90
+ } else {
91
+ this
92
+ }
93
94
95
/*
96
we need to make sure that, if we are adding a list that has content equal to
0 commit comments