Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
asubb committed Sep 29, 2022
1 parent a46acc5 commit e20ae36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .lift/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignoreRules = [ "TooGenericExceptionCaught" ]
2 changes: 1 addition & 1 deletion http/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies {

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationRuntimeVersion")

implementation("io.netty:netty-all:4.1.65.Final")
implementation("io.netty:netty-all:4.1.82.Final")
implementation("io.javalin:javalin:3.13.7")

testImplementation("org.http4k:http4k-core:4.0.0.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fun BeanStream<Window<Sample>>.windowFunction(func: (Pair<Int, Int>) -> Sample):
* as a window function over the stream of windowed samples.
*/
fun BeanStream<Window<Sample>>.rectangle(): BeanStream<Window<Sample>> {
return this.windowFunction { sampleOf(rectangleFunc(0, 0)) }
return this.windowFunction { sampleOf(rectangleFunc()) }
}

/**
Expand All @@ -149,7 +149,7 @@ fun BeanStream<Window<Sample>>.rectangle(): BeanStream<Window<Sample>> {
*
* @return the sequence of n consequent calculated values of the function.
*/
fun rectangleFunc(n: Int): Sequence<Double> = (0 until n).asSequence().map { rectangleFunc(it, n) }
fun rectangleFunc(n: Int): Sequence<Double> = (0 until n).asSequence().map { rectangleFunc() }

/**
* Calculates the [i]-th element out of [n] of [rectangle](https://en.wikipedia.org/wiki/Window_function#Rectangular_window)
Expand All @@ -160,7 +160,7 @@ fun rectangleFunc(n: Int): Sequence<Double> = (0 until n).asSequence().map { rec
*
* @return the function value.
*/
fun rectangleFunc(i: Int, n: Int): Double = 1.0
fun rectangleFunc(): Double = 1.0

/**
* Applies [MapWindowFn] with [triangular](https://en.wikipedia.org/wiki/Window_function#Triangular_window)
Expand Down

0 comments on commit e20ae36

Please sign in to comment.