forked from kscience/kmath
Deleted useless annotations JvmName
, JsName
and Suppress
This commit is contained in:
parent
fb01d85197
commit
31ccf744c5
@ -29,21 +29,18 @@ public interface AbstractPolynomialSpace<C, P: AbstractPolynomial<C>> : Ring<P>
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntPlus")
|
|
||||||
public operator fun C.plus(other: Int): C
|
public operator fun C.plus(other: Int): C
|
||||||
/**
|
/**
|
||||||
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntMinus")
|
|
||||||
public operator fun C.minus(other: Int): C
|
public operator fun C.minus(other: Int): C
|
||||||
/**
|
/**
|
||||||
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [other] copies of [this].
|
* The operation is equivalent to sum of [other] copies of [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntTimes")
|
|
||||||
public operator fun C.times(other: Int): C
|
public operator fun C.times(other: Int): C
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -53,21 +50,18 @@ public interface AbstractPolynomialSpace<C, P: AbstractPolynomial<C>> : Ring<P>
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantPlus")
|
|
||||||
public operator fun Int.plus(other: C): C
|
public operator fun Int.plus(other: C): C
|
||||||
/**
|
/**
|
||||||
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantMinus")
|
|
||||||
public operator fun Int.minus(other: C): C
|
public operator fun Int.minus(other: C): C
|
||||||
/**
|
/**
|
||||||
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [this] copies of [other].
|
* The operation is equivalent to sum of [this] copies of [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantTimes")
|
|
||||||
public operator fun Int.times(other: C): C
|
public operator fun Int.times(other: C): C
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -148,32 +142,26 @@ public interface AbstractPolynomialSpace<C, P: AbstractPolynomial<C>> : Ring<P>
|
|||||||
/**
|
/**
|
||||||
* Check if the instant is zero constant.
|
* Check if the instant is zero constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsZero")
|
|
||||||
public fun C.isZero(): Boolean = this == constantZero
|
public fun C.isZero(): Boolean = this == constantZero
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT zero constant.
|
* Check if the instant is NOT zero constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotZero")
|
|
||||||
public fun C.isNotZero(): Boolean = !isZero()
|
public fun C.isNotZero(): Boolean = !isZero()
|
||||||
/**
|
/**
|
||||||
* Check if the instant is unit constant.
|
* Check if the instant is unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsOne")
|
|
||||||
public fun C.isOne(): Boolean = this == constantOne
|
public fun C.isOne(): Boolean = this == constantOne
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT unit constant.
|
* Check if the instant is NOT unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotOne")
|
|
||||||
public fun C.isNotOne(): Boolean = !isOne()
|
public fun C.isNotOne(): Boolean = !isOne()
|
||||||
/**
|
/**
|
||||||
* Check if the instant is minus unit constant.
|
* Check if the instant is minus unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsMinusOne")
|
|
||||||
public fun C.isMinusOne(): Boolean = this == -constantOne
|
public fun C.isMinusOne(): Boolean = this == -constantOne
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT minus unit constant.
|
* Check if the instant is NOT minus unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotMinusOne")
|
|
||||||
public fun C.isNotMinusOne(): Boolean = !isMinusOne()
|
public fun C.isNotMinusOne(): Boolean = !isMinusOne()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -330,7 +318,7 @@ public interface AbstractPolynomialSpace<C, P: AbstractPolynomial<C>> : Ring<P>
|
|||||||
* @param C the type of constants. Polynomials have them as a coefficients in their terms.
|
* @param C the type of constants. Polynomials have them as a coefficients in their terms.
|
||||||
* @param P the type of polynomials.
|
* @param P the type of polynomials.
|
||||||
*/
|
*/
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME", "PARAMETER_NAME_CHANGED_ON_OVERRIDE")
|
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||||
public interface AbstractPolynomialSpaceOverRing<C, P: AbstractPolynomial<C>, A: Ring<C>> : AbstractPolynomialSpace<C, P> {
|
public interface AbstractPolynomialSpaceOverRing<C, P: AbstractPolynomial<C>, A: Ring<C>> : AbstractPolynomialSpace<C, P> {
|
||||||
|
|
||||||
public val ring: A
|
public val ring: A
|
||||||
@ -341,21 +329,18 @@ public interface AbstractPolynomialSpaceOverRing<C, P: AbstractPolynomial<C>, A:
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntPlus")
|
|
||||||
public override operator fun C.plus(other: Int): C = ring { optimizedAddMultiplied(this@plus, one, other) }
|
public override operator fun C.plus(other: Int): C = ring { optimizedAddMultiplied(this@plus, one, other) }
|
||||||
/**
|
/**
|
||||||
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntMinus")
|
|
||||||
public override operator fun C.minus(other: Int): C = ring { optimizedAddMultiplied(this@minus, one, -other) }
|
public override operator fun C.minus(other: Int): C = ring { optimizedAddMultiplied(this@minus, one, -other) }
|
||||||
/**
|
/**
|
||||||
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [other] copies of [this].
|
* The operation is equivalent to sum of [other] copies of [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntTimes")
|
|
||||||
public override operator fun C.times(other: Int): C = ring { optimizedMultiply(this@times, other) }
|
public override operator fun C.times(other: Int): C = ring { optimizedMultiply(this@times, other) }
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -365,21 +350,18 @@ public interface AbstractPolynomialSpaceOverRing<C, P: AbstractPolynomial<C>, A:
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantPlus")
|
|
||||||
public override operator fun Int.plus(other: C): C = ring { optimizedAddMultiplied(other, one, this@plus) }
|
public override operator fun Int.plus(other: C): C = ring { optimizedAddMultiplied(other, one, this@plus) }
|
||||||
/**
|
/**
|
||||||
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantMinus")
|
|
||||||
public override operator fun Int.minus(other: C): C = ring { optimizedAddMultiplied(-other, one, this@minus) }
|
public override operator fun Int.minus(other: C): C = ring { optimizedAddMultiplied(-other, one, this@minus) }
|
||||||
/**
|
/**
|
||||||
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [this] copies of [other].
|
* The operation is equivalent to sum of [this] copies of [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantTimes")
|
|
||||||
public override operator fun Int.times(other: C): C = ring { optimizedMultiply(other, this@times) }
|
public override operator fun Int.times(other: C): C = ring { optimizedMultiply(other, this@times) }
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
@ -28,21 +28,18 @@ public interface AbstractRationalFunctionalSpace<C, P: AbstractPolynomial<C>, R:
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntPlus")
|
|
||||||
public operator fun C.plus(other: Int): C
|
public operator fun C.plus(other: Int): C
|
||||||
/**
|
/**
|
||||||
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntMinus")
|
|
||||||
public operator fun C.minus(other: Int): C
|
public operator fun C.minus(other: Int): C
|
||||||
/**
|
/**
|
||||||
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [other] copies of [this].
|
* The operation is equivalent to sum of [other] copies of [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntTimes")
|
|
||||||
public operator fun C.times(other: Int): C
|
public operator fun C.times(other: Int): C
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -52,21 +49,18 @@ public interface AbstractRationalFunctionalSpace<C, P: AbstractPolynomial<C>, R:
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantPlus")
|
|
||||||
public operator fun Int.plus(other: C): C
|
public operator fun Int.plus(other: C): C
|
||||||
/**
|
/**
|
||||||
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantMinus")
|
|
||||||
public operator fun Int.minus(other: C): C
|
public operator fun Int.minus(other: C): C
|
||||||
/**
|
/**
|
||||||
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [this] copies of [other].
|
* The operation is equivalent to sum of [this] copies of [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantTimes")
|
|
||||||
public operator fun Int.times(other: C): C
|
public operator fun Int.times(other: C): C
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -189,32 +183,26 @@ public interface AbstractRationalFunctionalSpace<C, P: AbstractPolynomial<C>, R:
|
|||||||
/**
|
/**
|
||||||
* Check if the instant is zero constant.
|
* Check if the instant is zero constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsZero")
|
|
||||||
public fun C.isZero(): Boolean = this == constantZero
|
public fun C.isZero(): Boolean = this == constantZero
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT zero constant.
|
* Check if the instant is NOT zero constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotZero")
|
|
||||||
public fun C.isNotZero(): Boolean = !isZero()
|
public fun C.isNotZero(): Boolean = !isZero()
|
||||||
/**
|
/**
|
||||||
* Check if the instant is unit constant.
|
* Check if the instant is unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsOne")
|
|
||||||
public fun C.isOne(): Boolean = this == constantOne
|
public fun C.isOne(): Boolean = this == constantOne
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT unit constant.
|
* Check if the instant is NOT unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotOne")
|
|
||||||
public fun C.isNotOne(): Boolean = !isOne()
|
public fun C.isNotOne(): Boolean = !isOne()
|
||||||
/**
|
/**
|
||||||
* Check if the instant is minus unit constant.
|
* Check if the instant is minus unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsMinusOne")
|
|
||||||
public fun C.isMinusOne(): Boolean = this == -constantOne
|
public fun C.isMinusOne(): Boolean = this == -constantOne
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT minus unit constant.
|
* Check if the instant is NOT minus unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotMinusOne")
|
|
||||||
public fun C.isNotMinusOne(): Boolean = !isMinusOne()
|
public fun C.isNotMinusOne(): Boolean = !isMinusOne()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -520,7 +508,7 @@ public interface AbstractRationalFunctionalSpace<C, P: AbstractPolynomial<C>, R:
|
|||||||
// endregion
|
// endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME", "PARAMETER_NAME_CHANGED_ON_OVERRIDE")
|
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||||
public interface AbstractRationalFunctionalSpaceOverRing<C, P: AbstractPolynomial<C>, R: AbstractRationalFunction<C, P>, A: Ring<C>> : AbstractRationalFunctionalSpace<C, P, R> {
|
public interface AbstractRationalFunctionalSpaceOverRing<C, P: AbstractPolynomial<C>, R: AbstractRationalFunction<C, P>, A: Ring<C>> : AbstractRationalFunctionalSpace<C, P, R> {
|
||||||
|
|
||||||
public val ring: A
|
public val ring: A
|
||||||
@ -531,21 +519,18 @@ public interface AbstractRationalFunctionalSpaceOverRing<C, P: AbstractPolynomia
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntPlus")
|
|
||||||
public override operator fun C.plus(other: Int): C = ring { optimizedAddMultiplied(this@plus, one, other) }
|
public override operator fun C.plus(other: Int): C = ring { optimizedAddMultiplied(this@plus, one, other) }
|
||||||
/**
|
/**
|
||||||
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntMinus")
|
|
||||||
public override operator fun C.minus(other: Int): C = ring { optimizedAddMultiplied(this@minus, one, -other) }
|
public override operator fun C.minus(other: Int): C = ring { optimizedAddMultiplied(this@minus, one, -other) }
|
||||||
/**
|
/**
|
||||||
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [other] copies of [this].
|
* The operation is equivalent to sum of [other] copies of [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntTimes")
|
|
||||||
public override operator fun C.times(other: Int): C = ring { optimizedMultiply(this@times, other) }
|
public override operator fun C.times(other: Int): C = ring { optimizedMultiply(this@times, other) }
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -555,21 +540,18 @@ public interface AbstractRationalFunctionalSpaceOverRing<C, P: AbstractPolynomia
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantPlus")
|
|
||||||
public override operator fun Int.plus(other: C): C = ring { optimizedAddMultiplied(other, one, this@plus) }
|
public override operator fun Int.plus(other: C): C = ring { optimizedAddMultiplied(other, one, this@plus) }
|
||||||
/**
|
/**
|
||||||
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantMinus")
|
|
||||||
public override operator fun Int.minus(other: C): C = ring { optimizedAddMultiplied(-other, one, this@minus) }
|
public override operator fun Int.minus(other: C): C = ring { optimizedAddMultiplied(-other, one, this@minus) }
|
||||||
/**
|
/**
|
||||||
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [this] copies of [other].
|
* The operation is equivalent to sum of [this] copies of [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantTimes")
|
|
||||||
public override operator fun Int.times(other: C): C = ring { optimizedMultiply(other, this@times) }
|
public override operator fun Int.times(other: C): C = ring { optimizedMultiply(other, this@times) }
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -611,7 +593,7 @@ public interface AbstractRationalFunctionalSpaceOverRing<C, P: AbstractPolynomia
|
|||||||
// endregion
|
// endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME", "PARAMETER_NAME_CHANGED_ON_OVERRIDE")
|
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||||
public interface AbstractRationalFunctionalSpaceOverPolynomialSpace<C, P: AbstractPolynomial<C>, R: AbstractRationalFunction<C, P>, A: Ring<C>> : AbstractRationalFunctionalSpace<C, P, R> {
|
public interface AbstractRationalFunctionalSpaceOverPolynomialSpace<C, P: AbstractPolynomial<C>, R: AbstractRationalFunction<C, P>, A: Ring<C>> : AbstractRationalFunctionalSpace<C, P, R> {
|
||||||
|
|
||||||
public val polynomialRing: AbstractPolynomialSpace<C, P>
|
public val polynomialRing: AbstractPolynomialSpace<C, P>
|
||||||
@ -622,21 +604,18 @@ public interface AbstractRationalFunctionalSpaceOverPolynomialSpace<C, P: Abstra
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
* The operation is equivalent to adding [other] copies of unit of underlying ring to [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntPlus")
|
|
||||||
public override operator fun C.plus(other: Int): C = polynomialRing { this@plus + other }
|
public override operator fun C.plus(other: Int): C = polynomialRing { this@plus + other }
|
||||||
/**
|
/**
|
||||||
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
* Returns difference between the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
* The operation is equivalent to subtraction [other] copies of unit of underlying ring from [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntMinus")
|
|
||||||
public override operator fun C.minus(other: Int): C = polynomialRing { this@minus - other }
|
public override operator fun C.minus(other: Int): C = polynomialRing { this@minus - other }
|
||||||
/**
|
/**
|
||||||
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
* Returns product of the constant and the integer represented as constant (member of underlying ring).
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [other] copies of [this].
|
* The operation is equivalent to sum of [other] copies of [this].
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIntTimes")
|
|
||||||
public override operator fun C.times(other: Int): C = polynomialRing { this@times * other }
|
public override operator fun C.times(other: Int): C = polynomialRing { this@times * other }
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -646,21 +625,18 @@ public interface AbstractRationalFunctionalSpaceOverPolynomialSpace<C, P: Abstra
|
|||||||
*
|
*
|
||||||
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
* The operation is equivalent to adding [this] copies of unit of underlying ring to [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantPlus")
|
|
||||||
public override operator fun Int.plus(other: C): C = polynomialRing { this@plus + other }
|
public override operator fun Int.plus(other: C): C = polynomialRing { this@plus + other }
|
||||||
/**
|
/**
|
||||||
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
* Returns difference between the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
* The operation is equivalent to subtraction [this] copies of unit of underlying ring from [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantMinus")
|
|
||||||
public override operator fun Int.minus(other: C): C = polynomialRing { this@minus - other }
|
public override operator fun Int.minus(other: C): C = polynomialRing { this@minus - other }
|
||||||
/**
|
/**
|
||||||
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
* Returns product of the integer represented as constant (member of underlying ring) and the constant.
|
||||||
*
|
*
|
||||||
* The operation is equivalent to sum of [this] copies of [other].
|
* The operation is equivalent to sum of [this] copies of [other].
|
||||||
*/
|
*/
|
||||||
@JvmName("intConstantTimes")
|
|
||||||
public override operator fun Int.times(other: C): C = polynomialRing { this@times * other }
|
public override operator fun Int.times(other: C): C = polynomialRing { this@times * other }
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -736,32 +712,26 @@ public interface AbstractRationalFunctionalSpaceOverPolynomialSpace<C, P: Abstra
|
|||||||
/**
|
/**
|
||||||
* Check if the instant is zero constant.
|
* Check if the instant is zero constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsZero")
|
|
||||||
public override fun C.isZero(): Boolean = polynomialRing { this@isZero.isZero() }
|
public override fun C.isZero(): Boolean = polynomialRing { this@isZero.isZero() }
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT zero constant.
|
* Check if the instant is NOT zero constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotZero")
|
|
||||||
public override fun C.isNotZero(): Boolean = polynomialRing { this@isNotZero.isNotZero() }
|
public override fun C.isNotZero(): Boolean = polynomialRing { this@isNotZero.isNotZero() }
|
||||||
/**
|
/**
|
||||||
* Check if the instant is unit constant.
|
* Check if the instant is unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsOne")
|
|
||||||
public override fun C.isOne(): Boolean = polynomialRing { this@isOne.isOne() }
|
public override fun C.isOne(): Boolean = polynomialRing { this@isOne.isOne() }
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT unit constant.
|
* Check if the instant is NOT unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotOne")
|
|
||||||
public override fun C.isNotOne(): Boolean = polynomialRing { this@isNotOne.isNotOne() }
|
public override fun C.isNotOne(): Boolean = polynomialRing { this@isNotOne.isNotOne() }
|
||||||
/**
|
/**
|
||||||
* Check if the instant is minus unit constant.
|
* Check if the instant is minus unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsMinusOne")
|
|
||||||
public override fun C.isMinusOne(): Boolean = polynomialRing { this@isMinusOne.isMinusOne() }
|
public override fun C.isMinusOne(): Boolean = polynomialRing { this@isMinusOne.isMinusOne() }
|
||||||
/**
|
/**
|
||||||
* Check if the instant is NOT minus unit constant.
|
* Check if the instant is NOT minus unit constant.
|
||||||
*/
|
*/
|
||||||
@JvmName("constantIsNotMinusOne")
|
|
||||||
public override fun C.isNotMinusOne(): Boolean = polynomialRing { this@isNotMinusOne.isNotMinusOne() }
|
public override fun C.isNotMinusOne(): Boolean = polynomialRing { this@isNotMinusOne.isNotMinusOne() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -331,7 +331,6 @@ internal fun Map<Variable, UInt>.cleanUp() = filterValues { it > 0U }
|
|||||||
* @param A the intersection of [Ring] of [C] and [ScaleOperations] of [C].
|
* @param A the intersection of [Ring] of [C] and [ScaleOperations] of [C].
|
||||||
* @param ring the [A] instance.
|
* @param ring the [A] instance.
|
||||||
*/
|
*/
|
||||||
@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE", "INAPPLICABLE_JVM_NAME")
|
|
||||||
public class LabeledPolynomialSpace<C, A : Ring<C>>(
|
public class LabeledPolynomialSpace<C, A : Ring<C>>(
|
||||||
public override val ring: A,
|
public override val ring: A,
|
||||||
) : AbstractPolynomialSpaceOverRing<C, LabeledPolynomial<C>, A> {
|
) : AbstractPolynomialSpaceOverRing<C, LabeledPolynomial<C>, A> {
|
||||||
@ -768,7 +767,6 @@ public class LabeledPolynomialSpace<C, A : Ring<C>>(
|
|||||||
override val one: LabeledPolynomial<C> = LabeledPolynomial<C>(mapOf(emptyMap<Variable, UInt>() to constantOne))
|
override val one: LabeledPolynomial<C> = LabeledPolynomial<C>(mapOf(emptyMap<Variable, UInt>() to constantOne))
|
||||||
|
|
||||||
// TODO: Docs
|
// TODO: Docs
|
||||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "CovariantEquals")
|
|
||||||
override infix fun LabeledPolynomial<C>.equalsTo(other: LabeledPolynomial<C>): Boolean =
|
override infix fun LabeledPolynomial<C>.equalsTo(other: LabeledPolynomial<C>): Boolean =
|
||||||
when {
|
when {
|
||||||
this === other -> true
|
this === other -> true
|
||||||
|
@ -305,7 +305,6 @@ public class LabeledRationalFunctionSpace<C, A: Ring<C>>(
|
|||||||
/**
|
/**
|
||||||
* Checks equality of the rational functions.
|
* Checks equality of the rational functions.
|
||||||
*/
|
*/
|
||||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "CovariantEquals")
|
|
||||||
public override infix fun LabeledRationalFunction<C>.equalsTo(other: LabeledRationalFunction<C>): Boolean {
|
public override infix fun LabeledRationalFunction<C>.equalsTo(other: LabeledRationalFunction<C>): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
|
||||||
|
@ -263,7 +263,6 @@ public fun <C, A: Ring<C>> C.asNumberedPolynomial() : NumberedPolynomial<C> = Nu
|
|||||||
* @param A the intersection of [Ring] of [C] and [ScaleOperations] of [C].
|
* @param A the intersection of [Ring] of [C] and [ScaleOperations] of [C].
|
||||||
* @param ring the [A] instance.
|
* @param ring the [A] instance.
|
||||||
*/
|
*/
|
||||||
@Suppress("PARAMETER_NAME_CHANGED_ON_OVERRIDE", "INAPPLICABLE_JVM_NAME")
|
|
||||||
public open class NumberedPolynomialSpace<C, A : Ring<C>>(
|
public open class NumberedPolynomialSpace<C, A : Ring<C>>(
|
||||||
public final override val ring: A,
|
public final override val ring: A,
|
||||||
) : AbstractPolynomialSpaceOverRing<C, NumberedPolynomial<C>, A> {
|
) : AbstractPolynomialSpaceOverRing<C, NumberedPolynomial<C>, A> {
|
||||||
@ -532,7 +531,6 @@ public open class NumberedPolynomialSpace<C, A : Ring<C>>(
|
|||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Docs
|
// TODO: Docs
|
||||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "CovariantEquals")
|
|
||||||
override infix fun NumberedPolynomial<C>.equalsTo(other: NumberedPolynomial<C>): Boolean =
|
override infix fun NumberedPolynomial<C>.equalsTo(other: NumberedPolynomial<C>): Boolean =
|
||||||
when {
|
when {
|
||||||
this === other -> true
|
this === other -> true
|
||||||
|
@ -302,7 +302,6 @@ public class NumberedRationalFunctionSpace<C, A: Ring<C>> (
|
|||||||
/**
|
/**
|
||||||
* Checks equality of the rational functions.
|
* Checks equality of the rational functions.
|
||||||
*/
|
*/
|
||||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "CovariantEquals")
|
|
||||||
public override infix fun NumberedRationalFunction<C>.equalsTo(other: NumberedRationalFunction<C>): Boolean {
|
public override infix fun NumberedRationalFunction<C>.equalsTo(other: NumberedRationalFunction<C>): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public fun <T> T.asPolynomial() : Polynomial<T> = Polynomial(listOf(this))
|
|||||||
* @param A type of underlying ring of constants. It's [Ring] of [C].
|
* @param A type of underlying ring of constants. It's [Ring] of [C].
|
||||||
* @param ring underlying ring of constants of type [A].
|
* @param ring underlying ring of constants of type [A].
|
||||||
*/
|
*/
|
||||||
@Suppress("INAPPLICABLE_JVM_NAME") // TODO: KT-31420
|
//@Suppress("INAPPLICABLE_JVM_NAME") // TODO: KT-31420
|
||||||
public open class PolynomialSpace<C, A : Ring<C>>(
|
public open class PolynomialSpace<C, A : Ring<C>>(
|
||||||
public final override val ring: A,
|
public final override val ring: A,
|
||||||
) : AbstractPolynomialSpaceOverRing<C, Polynomial<C>, A> {
|
) : AbstractPolynomialSpaceOverRing<C, Polynomial<C>, A> {
|
||||||
@ -322,7 +322,6 @@ public open class PolynomialSpace<C, A : Ring<C>>(
|
|||||||
override val zero: Polynomial<C> = Polynomial(emptyList())
|
override val zero: Polynomial<C> = Polynomial(emptyList())
|
||||||
override val one: Polynomial<C> = Polynomial(listOf(constantZero))
|
override val one: Polynomial<C> = Polynomial(listOf(constantZero))
|
||||||
|
|
||||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "CovariantEquals")
|
|
||||||
public override infix fun Polynomial<C>.equalsTo(other: Polynomial<C>): Boolean =
|
public override infix fun Polynomial<C>.equalsTo(other: Polynomial<C>): Boolean =
|
||||||
when {
|
when {
|
||||||
this === other -> true
|
this === other -> true
|
||||||
|
@ -287,7 +287,6 @@ public class RationalFunctionSpace<C, A : Ring<C>> (
|
|||||||
/**
|
/**
|
||||||
* Checks equality of the rational functions.
|
* Checks equality of the rational functions.
|
||||||
*/
|
*/
|
||||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER", "CovariantEquals")
|
|
||||||
public override infix fun RationalFunction<C>.equalsTo(other: RationalFunction<C>): Boolean =
|
public override infix fun RationalFunction<C>.equalsTo(other: RationalFunction<C>): Boolean =
|
||||||
when {
|
when {
|
||||||
this === other -> true
|
this === other -> true
|
||||||
|
@ -6,6 +6,7 @@ import kotlin.contracts.*
|
|||||||
import kotlin.jvm.JvmName
|
import kotlin.jvm.JvmName
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: Docs
|
// TODO: Docs
|
||||||
|
|
||||||
// region Sort of legacy
|
// region Sort of legacy
|
||||||
@ -485,8 +486,8 @@ public fun NumberedPolynomial<Double>.substitute(args: Map<Int, Double>): Number
|
|||||||
val deg = degs.getOrElse(variable) { 0u }
|
val deg = degs.getOrElse(variable) { 0u }
|
||||||
if (deg == 0u) product else product * substitutor.pow(deg.toInt())
|
if (deg == 0u) product else product * substitutor.pow(deg.toInt())
|
||||||
}
|
}
|
||||||
if (newDegs !in acc) acc[newDegs] = c
|
if (newDegs !in acc) acc[newDegs] = newC
|
||||||
else acc[newDegs] = acc[newDegs]!! + c
|
else acc[newDegs] = acc[newDegs]!! + newC
|
||||||
}
|
}
|
||||||
return NumberedPolynomial<Double>(acc)
|
return NumberedPolynomial<Double>(acc)
|
||||||
}
|
}
|
||||||
@ -504,8 +505,8 @@ public fun <C> NumberedPolynomial<C>.substitute(ring: Ring<C>, args: Map<Int, C>
|
|||||||
val deg = degs.getOrElse(variable) { 0u }
|
val deg = degs.getOrElse(variable) { 0u }
|
||||||
if (deg == 0u) product else product * power(substitutor, deg)
|
if (deg == 0u) product else product * power(substitutor, deg)
|
||||||
}
|
}
|
||||||
if (newDegs !in acc) acc[newDegs] = c
|
if (newDegs !in acc) acc[newDegs] = newC
|
||||||
else acc[newDegs] = acc[newDegs]!! + c
|
else acc[newDegs] = acc[newDegs]!! + newC
|
||||||
}
|
}
|
||||||
return NumberedPolynomial<C>(acc)
|
return NumberedPolynomial<C>(acc)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user