This commit is contained in:
Alexander Nozik 2021-05-18 10:22:33 +03:00
parent 72f4d7c7e6
commit a67c112793
3 changed files with 15 additions and 0 deletions

View File

@ -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;

View File

@ -177,4 +177,6 @@ public object MstLogicAlgebra : LogicAlgebra<MST> {
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)
}

View File

@ -54,6 +54,12 @@ public interface LogicAlgebra<T : Any> : Algebra<T> {
*/
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<Boolean> {
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
}