diff --git a/kmath-core/api/kmath-core.api b/kmath-core/api/kmath-core.api index ead4b96b5..b424b59ff 100644 --- a/kmath-core/api/kmath-core.api +++ b/kmath-core/api/kmath-core.api @@ -522,6 +522,11 @@ public final class space/kscience/kmath/linear/LFeature : space/kscience/kmath/l public static final field INSTANCE Lspace/kscience/kmath/linear/LFeature; } +public abstract interface class space/kscience/kmath/linear/LUDecompositionFeature : space/kscience/kmath/linear/MatrixFeature { + public abstract fun getL ()Lspace/kscience/kmath/nd/Structure2D; + public abstract fun getU ()Lspace/kscience/kmath/nd/Structure2D; +} + public abstract interface class space/kscience/kmath/linear/LinearSolver { public abstract fun inverse (Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D; public abstract fun solve (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D; diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt index fb2e38449..4729f19ea 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/MstAlgebra.kt @@ -177,4 +177,6 @@ public object MstLogicAlgebra : LogicAlgebra { override fun MST.and(other: MST): MST = MST.Binary(Boolean::and.name, this, other) override fun MST.or(other: MST): MST = MST.Binary(Boolean::or.name, this, other) + + override fun MST.xor(other: MST): MST = MST.Binary(Boolean::xor.name, this, other) } diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/LogicAlgebra.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/LogicAlgebra.kt index 406967897..9037525e1 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/LogicAlgebra.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/operations/LogicAlgebra.kt @@ -54,6 +54,12 @@ public interface LogicAlgebra : Algebra { */ public infix fun T.or(other: T): T + /** + * Logic 'xor' + */ + public infix fun T.xor(other: T): T + + public companion object { public val TRUE: Symbol by symbol public val FALSE: Symbol by symbol @@ -74,4 +80,6 @@ public object BooleanAlgebra : LogicAlgebra { override fun Boolean.and(other: Boolean): Boolean = this && other override fun Boolean.or(other: Boolean): Boolean = this || other + + override fun Boolean.xor(other: Boolean): Boolean = this xor other } \ No newline at end of file