Skip to content

Commit b60351c

Browse files
committed
simplify molecule data class.
1 parent a379219 commit b60351c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

core/src/main/kotlin/org/evomaster/core/search/algorithms/CroAlgorithm.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ import org.evomaster.core.search.Individual
55
import org.evomaster.core.search.algorithms.wts.WtsEvalIndividual
66
import kotlin.math.abs
77

8-
data class Molecule<T : Individual>(
9-
var suite: WtsEvalIndividual<T>,
10-
var kineticEnergy: Double,
11-
var numCollisions: Int
12-
)
13-
148
/**
159
* Chemical Reaction Optimization (CRO)
1610
*
@@ -24,6 +18,12 @@ class CroAlgorithm<T> : AbstractGeneticAlgorithm<T>() where T : Individual {
2418

2519
private data class EnergyContext(var container: Double)
2620

21+
data class Molecule<T : Individual>(
22+
var suite: WtsEvalIndividual<T>,
23+
var kineticEnergy: Double,
24+
var numCollisions: Int
25+
)
26+
2727
private val molecules: MutableList<Molecule<T>> = mutableListOf()
2828

2929
// container is the global energy reservoir.

0 commit comments

Comments
 (0)