|
|
|
@ -17,6 +17,7 @@ import net.pokeranalytics.android.ui.graph.GraphUnderlyingEntry |
|
|
|
import net.pokeranalytics.android.ui.view.DefaultLegendValues |
|
|
|
import net.pokeranalytics.android.ui.view.DefaultLegendValues |
|
|
|
import net.pokeranalytics.android.ui.view.LegendContent |
|
|
|
import net.pokeranalytics.android.ui.view.LegendContent |
|
|
|
import net.pokeranalytics.android.util.ColorUtils |
|
|
|
import net.pokeranalytics.android.util.ColorUtils |
|
|
|
|
|
|
|
import net.pokeranalytics.android.util.TextFormat |
|
|
|
import kotlin.math.abs |
|
|
|
import kotlin.math.abs |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
@ -95,21 +96,17 @@ class Report(var options: Calculator.Options) { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* A sessionGroup of computable items identified by a name |
|
|
|
* A sessionGroup of computable items identified by a name |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
class ComputableGroup(query: Query, stats: List<Stat>? = null) { |
|
|
|
class ComputableGroup(var query: Query, var stats: List<Stat>? = null) { |
|
|
|
|
|
|
|
|
|
|
|
// constructor(query: Query, statIds: List<Stat>? = null) : this(query.name, query.conditions) |
|
|
|
/** |
|
|
|
// |
|
|
|
* A subgroup used to compute stat variation |
|
|
|
// private constructor(name: String = "", conditions: List<QueryCondition> = listOf(), statIds: List<Stat>? = null) |
|
|
|
*/ |
|
|
|
|
|
|
|
var comparedGroup: ComputableGroup? = null |
|
|
|
var query: Query = query |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* The display name of the group |
|
|
|
* The computed statIds of the comparable sessionGroup |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
// val name: String |
|
|
|
var comparedComputedResults: ComputedResults? = null |
|
|
|
// get() { |
|
|
|
|
|
|
|
// return this.query.name |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* A list of _conditions to get |
|
|
|
* A list of _conditions to get |
|
|
|
@ -164,21 +161,6 @@ class ComputableGroup(query: Query, stats: List<Stat>? = null) { |
|
|
|
return sets |
|
|
|
return sets |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* The list of statIds to display |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
var stats: List<Stat>? = stats |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* A subgroup used to compute stat variation |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
var comparedGroup: ComputableGroup? = null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* The computed statIds of the comparable sessionGroup |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
var comparedComputedResults: ComputedResults? = null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun cleanup() { |
|
|
|
fun cleanup() { |
|
|
|
this._computables = null |
|
|
|
this._computables = null |
|
|
|
this._sessionSets = null |
|
|
|
this._sessionSets = null |
|
|
|
@ -220,10 +202,10 @@ class ComputedResults(group: ComputableGroup, shouldManageMultiGroupProgressValu |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Point(value, data = data.objectIdentifier) |
|
|
|
Point(value, data = data.objectIdentifier) |
|
|
|
} |
|
|
|
} |
|
|
|
this._addEvolutionValue(point, stat = stat) |
|
|
|
this.addEvolutionValue(point, stat = stat) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun _addEvolutionValue(point: Point, stat: Stat) { |
|
|
|
private fun addEvolutionValue(point: Point, stat: Stat) { |
|
|
|
val evolutionValues = this._evolutionValues[stat] |
|
|
|
val evolutionValues = this._evolutionValues[stat] |
|
|
|
if (evolutionValues != null) { |
|
|
|
if (evolutionValues != null) { |
|
|
|
evolutionValues.add(point) |
|
|
|
evolutionValues.add(point) |
|
|
|
@ -364,9 +346,7 @@ class ComputedResults(group: ComputableGroup, shouldManageMultiGroupProgressValu |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun finalize() { |
|
|
|
fun finalize() { |
|
|
|
|
|
|
|
|
|
|
|
this.consolidateProgressStats() |
|
|
|
this.consolidateProgressStats() |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// MPAndroidChart |
|
|
|
// MPAndroidChart |
|
|
|
|