From 936114519755927c67b309a543781b97be6546be Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 27 Aug 2020 17:06:33 +0300 Subject: [PATCH] Fix dead test --- .../dataforge/vision/gdml/bmanStatistics.kt | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/visionforge-gdml/src/jvmTest/kotlin/hep/dataforge/vision/gdml/bmanStatistics.kt b/visionforge-gdml/src/jvmTest/kotlin/hep/dataforge/vision/gdml/bmanStatistics.kt index a8af85c6..d737d2ae 100644 --- a/visionforge-gdml/src/jvmTest/kotlin/hep/dataforge/vision/gdml/bmanStatistics.kt +++ b/visionforge-gdml/src/jvmTest/kotlin/hep/dataforge/vision/gdml/bmanStatistics.kt @@ -1,5 +1,8 @@ package hep.dataforge.vision.gdml +import hep.dataforge.vision.solid.AbstractProxy +import hep.dataforge.vision.solid.prototype +import hep.dataforge.vision.visitor.countDistinct import hep.dataforge.vision.visitor.countDistinctBy import hep.dataforge.vision.visitor.flowStatistics import kotlinx.coroutines.Dispatchers @@ -7,6 +10,7 @@ import kotlinx.coroutines.withContext import nl.adaptivity.xmlutil.StAXReader import scientifik.gdml.GDML import java.io.File +import kotlin.reflect.KClass suspend fun main() { withContext(Dispatchers.Default) { @@ -19,16 +23,18 @@ suspend fun main() { val vision = xml.toVision() - vision.flowStatistics().countDistinctBy { it.type }.forEach { (depth, size) -> + vision.flowStatistics>{ _, child -> + child.prototype::class + }.countDistinct().forEach { (depth, size) -> println("$depth\t$size") } - println("***REDUCED***") - - vision.optimizeGdml() - - vision.flowStatistics().countDistinctBy { it.type }.forEach { (depth, size) -> - println("$depth\t$size") - } +// println("***REDUCED***") +// +// vision.optimizeGdml() +// +// vision.flowStatistics().countDistinctBy { it.type }.forEach { (depth, size) -> +// println("$depth\t$size") +// } } } \ No newline at end of file