| | |
| | | val b2 = r >= config.mutationRate |
| | | if (b1) special = true |
| | | res[f] = (b1 || b2) |
| | | if (res[f] == true) println("p: $pValue --- n: $nValue --- r: $r") |
| | | // if (res[f] == true) println("p: $pValue --- n: $nValue --- r: $r") |
| | | } |
| | | // repeat(config.factorCount) { i-> |
| | | // if (p?.getByFactorIndex(i) == null || n.getByFactorIndex(i) == null) { |
| | | // res.add(false) |
| | | // return@repeat |
| | | // } |
| | | // val pValue = p.getByFactorIndex(i)!! |
| | | // val nValue = n.getByFactorIndex(i)!! |
| | | // val r = abs((pValue - nValue) / pValue) |
| | | // val b1 = r >= (2 * config.mutationRate) |
| | | // val b2 = r >= config.mutationRate |
| | | // if (b1) special = true |
| | | // res.add(b1 || b2) |
| | | // } |
| | | |
| | | return res |
| | | } |
| | |
| | | val b1 = special && (eIndex - sIndex) >= (config.mutationNum / 2) |
| | | val b2 = (eIndex - sIndex) >= config.mutationNum |
| | | special = false |
| | | println("sIndex: $sIndex --- eIndex: $eIndex --- special: $special") |
| | | // println("sIndex: $sIndex --- eIndex: $eIndex --- special: $special") |
| | | return b1 || b2 |
| | | } |
| | | } |