Feature/booleans #341
@ -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 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 interface class space/kscience/kmath/linear/LinearSolver {
|
||||||
public abstract fun inverse (Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
|
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;
|
public abstract fun solve (Lspace/kscience/kmath/nd/Structure2D;Lspace/kscience/kmath/nd/Structure2D;)Lspace/kscience/kmath/nd/Structure2D;
|
||||||
|
@ -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.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.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)
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,12 @@ public interface LogicAlgebra<T : Any> : Algebra<T> {
|
|||||||
*/
|
*/
|
||||||
public infix fun T.or(other: T): T
|
public infix fun T.or(other: T): T
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logic 'xor'
|
||||||
|
*/
|
||||||
|
public infix fun T.xor(other: T): T
|
||||||
|
|
||||||
|
|
||||||
public companion object {
|
public companion object {
|
||||||
public val TRUE: Symbol by symbol
|
public val TRUE: Symbol by symbol
|
||||||
public val FALSE: 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.and(other: Boolean): Boolean = this && other
|
||||||
|
|
||||||
override fun Boolean.or(other: Boolean): Boolean = this || other
|
override fun Boolean.or(other: Boolean): Boolean = this || other
|
||||||
|
|
||||||
|
override fun Boolean.xor(other: Boolean): Boolean = this xor other
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user