Skip to content

Commit

Permalink
Cosmit in 'Searching'
Browse files Browse the repository at this point in the history
  • Loading branch information
superbobry committed May 26, 2016
1 parent f960a76 commit 00b850a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/org/jetbrains/bio/viktor/Searching.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package org.jetbrains.bio.viktor
*
* If [target] already appears in this vector, the returned
* index is just before the leftmost occurrence of [target].
*
* @since 0.2.3
*/
fun StridedVector.searchSorted(target: Double): Int {
var lo = 0
Expand All @@ -21,7 +23,7 @@ fun StridedVector.searchSorted(target: Double): Int {
}

/** Returns the index of the minimum element. */
fun StridedVector. argMin(): Int {
fun StridedVector.argMin(): Int {
require(size > 0) { "no data" }
var minPos = 0
var minValue = java.lang.Double.POSITIVE_INFINITY
Expand Down

0 comments on commit 00b850a

Please sign in to comment.