Feature/booleans #341

Merged
altavir merged 13 commits from feature/booleans into dev 2021-05-19 03:36:37 +03:00
4 changed files with 6 additions and 5 deletions
Showing only changes of commit fff7377687 - Show all commits

View File

@ -29,6 +29,7 @@
- Separated benchmarks and examples - Separated benchmarks and examples
- Rewritten EJML module without ejml-simple - Rewritten EJML module without ejml-simple
- Stability of kmath-ast and kmath-kotilngrad promoted to EXPERIMENTAL. - Stability of kmath-ast and kmath-kotilngrad promoted to EXPERIMENTAL.
- ColumnarData returns nullable column
### Deprecated ### Deprecated

View File

@ -19,7 +19,7 @@ import space.kscience.kmath.structures.Buffer
public interface ColumnarData<out T> { public interface ColumnarData<out T> {
public val size: Int public val size: Int
public operator fun get(symbol: Symbol): Buffer<T> public operator fun get(symbol: Symbol): Buffer<T>?
} }
/** /**

View File

@ -27,10 +27,10 @@ public interface XYColumnarData<T, out X : T, out Y : T> : ColumnarData<T> {
*/ */
public val y: Buffer<Y> public val y: Buffer<Y>
override fun get(symbol: Symbol): Buffer<T> = when (symbol) { override fun get(symbol: Symbol): Buffer<T>? = when (symbol) {
Symbol.x -> x Symbol.x -> x
Symbol.y -> y Symbol.y -> y
else -> error("A column for symbol $symbol not found") else -> null
} }
} }

View File

@ -17,10 +17,10 @@ import space.kscience.kmath.structures.Buffer
public interface XYZColumnarData<T, out X : T, out Y : T, out Z : T> : XYColumnarData<T, X, Y> { public interface XYZColumnarData<T, out X : T, out Y : T, out Z : T> : XYColumnarData<T, X, Y> {
public val z: Buffer<Z> public val z: Buffer<Z>
override fun get(symbol: Symbol): Buffer<T> = when (symbol) { override fun get(symbol: Symbol): Buffer<T>? = when (symbol) {
Symbol.x -> x Symbol.x -> x
Symbol.y -> y Symbol.y -> y
Symbol.z -> z Symbol.z -> z
else -> error("A column for symbol $symbol not found") else -> null
} }
} }