Checking of min and max factor value was added.

It is possible user to swap these two values.

Change-Id: Ib375d705e42f7257aa9b16d72ab834020e401cde
Reviewed-on: https://gerrit.libreoffice.org/72483
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Todor Balabanov 2019-05-17 17:13:13 +03:00 committed by Tomaž Vajngerl
parent 7f373a4c88
commit a2720a2432

View File

@ -128,8 +128,8 @@ public final class DEPSSolverImpl extends BaseEvolutionarySolver
agents[i].setPbest(m_library.getSelectedPoint(i));
DEGTBehavior deGTBehavior = new DEGTBehavior();
deGTBehavior.MIN_FACTOR = m_minFactor.getValue();
deGTBehavior.MAX_FACTOR = m_maxFactor.getValue();
deGTBehavior.MIN_FACTOR = Math.min(m_minFactor.getValue(), m_maxFactor.getValue());
deGTBehavior.MAX_FACTOR = Math.max(m_minFactor.getValue(), m_maxFactor.getValue());
deGTBehavior.CR = m_CR.getValue();
PSGTBehavior psGTBehavior = new PSGTBehavior();