Skip to content

Commit

Permalink
Commented out but included timing experiments to measure capabilities…
Browse files Browse the repository at this point in the history
… of alpha complex implementation.
  • Loading branch information
Mikael Vejdemo-Johansson committed Oct 22, 2024
1 parent c1f8c1b commit 2991013
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions src/test/scala/org/appliedtopology/tda4j/AlphaComplexSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,61 @@ class AlphaComplexSpec extends org.specs2.mutable.Specification with ScalaCheck
it0 must containTheSameElementsAs(ref0)
}
}
/*
"Timing experiments" >> {
def timing(points : Array[Array[Double]]) = {
val alpha = AlphaShapes(points)
val ref0 : Seq[Simplex[Int]] = alpha.metricSpace.elements.toSeq.map(Simplex(_))
val it0 : Seq[Simplex[Int]] = alpha.iterateDimension(0).toSeq
val ref1 : Iterator[Simplex[Int]] = alpha.iterateDimension(1)
val ref2 : Iterator[Simplex[Int]] = alpha.iterateDimension(2)
ref1.tapEach(_ => ())
ref2.tapEach(_ => ())
it0 must containTheSameElementsAs(ref0)
}
"50 points 2 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(2), Gen.const(50)))(timing)
}
"100 points 2 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(2), Gen.const(100)))(timing)
}
"500 points 2 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(2), Gen.const(500)))(timing)
}
"50 points 3 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(3), Gen.const(50)))(timing)
}
"100 points 3 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(3), Gen.const(100)))(timing)
}
"500 points 3 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(3), Gen.const(500)))(timing)
}
"50 points 5 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(5), Gen.const(50)))(timing)
}
"100 points 5 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(5), Gen.const(100)))(timing)
}
"500 points 5 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(5), Gen.const(500)))(timing)
}
"50 points 10 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(10), Gen.const(50)))(timing)
}
"100 points 10 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(10), Gen.const(100)))(timing)
}
"500 points 10 dimensions" >> {
forAll(matrixGen[Double](Gen.double, Gen.const(10), Gen.const(500)))(timing)
}
}
*/
}

0 comments on commit 2991013

Please sign in to comment.