Fix weird guard check

This commit is contained in:
Iaroslav 2020-09-21 19:02:12 +07:00
parent 1c11d25306
commit 964ac8a702
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -11,10 +11,11 @@ import kscience.kmath.structures.Buffer
* @author Iaroslav Postovalov * @author Iaroslav Postovalov
*/ */
public class EjmlVector internal constructor(public val origin: SimpleMatrix) : Point<Double> { public class EjmlVector internal constructor(public val origin: SimpleMatrix) : Point<Double> {
override val size: Int get() = origin.numRows() public override val size: Int
get() = origin.numRows()
init { init {
require(origin.numCols() == 1) { error("Only single column matrices are allowed") } require(origin.numCols() == 1) { "Only single column matrices are allowed" }
} }
public override operator fun get(index: Int): Double = origin[index] public override operator fun get(index: Int): Double = origin[index]