[mod] modified SharedMemory to include a map of all groups

- this is to get sensor parent groups if no truth is calculated
This commit is contained in:
2020-01-29 01:19:11 -06:00
parent 961d14e96e
commit ab825f8bf0

View File

@@ -28,6 +28,7 @@ case class SharedMemory(sensor: Map[Time, Map[Cell, Map[Group, Vector[SensorResu
groundTruth: Map[Time, Map[Cell, Map[Group, Truth]]], groundTruth: Map[Time, Map[Cell, Map[Group, Truth]]],
groundTruthConfig: Map[Time, Map[Group, Truth]], groundTruthConfig: Map[Time, Map[Group, Truth]],
config: SimulationConfig, config: SimulationConfig,
groups: Map[String, Group],
output: Vector[BroadcastObject[Boolean]]) { output: Vector[BroadcastObject[Boolean]]) {
// memory optimization: remove sensor and throw output into output // memory optimization: remove sensor and throw output into output
// only map Truths from config into groundtruth, do a if groundTruth.contains(time) groundTruth(time) else prevTruth in case of time.start Truth(None) (or better map it to time.start anyways in parser) // only map Truths from config into groundtruth, do a if groundTruth.contains(time) groundTruth(time) else prevTruth in case of time.start Truth(None) (or better map it to time.start anyways in parser)