Feature: Polynomials and rational functions #469

Merged
lounres merged 132 commits from feature/polynomials into dev 2022-07-28 18:04:06 +03:00
7 changed files with 2 additions and 65 deletions
Showing only changes of commit ed634013f6 - Show all commits

View File

@ -610,12 +610,10 @@ public class LabeledPolynomialSpace<C, A : Ring<C>>(
/** /**
* Substitutes provided arguments [arguments] into [this] polynomial. * Substitutes provided arguments [arguments] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun LabeledPolynomial<C>.substitute(arguments: Map<Symbol, C>): LabeledPolynomial<C> = substitute(ring, arguments) public inline fun LabeledPolynomial<C>.substitute(arguments: Map<Symbol, C>): LabeledPolynomial<C> = substitute(ring, arguments)
/** /**
* Substitutes provided arguments [arguments] into [this] polynomial. * Substitutes provided arguments [arguments] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substitutePolynomial") @JvmName("substitutePolynomial")
public inline fun LabeledPolynomial<C>.substitute(arguments: Map<Symbol, LabeledPolynomial<C>>) : LabeledPolynomial<C> = substitute(ring, arguments) public inline fun LabeledPolynomial<C>.substitute(arguments: Map<Symbol, LabeledPolynomial<C>>) : LabeledPolynomial<C> = substitute(ring, arguments)
} }

View File

@ -62,35 +62,29 @@ public class LabeledRationalFunctionSpace<C, A: Ring<C>>(
/** /**
* Substitutes provided constant [argument] into [this] polynomial. * Substitutes provided constant [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun LabeledPolynomial<C>.substitute(argument: Map<Symbol, C>): LabeledPolynomial<C> = substitute(ring, argument) public inline fun LabeledPolynomial<C>.substitute(argument: Map<Symbol, C>): LabeledPolynomial<C> = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] polynomial. * Substitutes provided polynomial [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substitutePolynomial") @JvmName("substitutePolynomial")
public inline fun LabeledPolynomial<C>.substitute(argument: Map<Symbol, LabeledPolynomial<C>>): LabeledPolynomial<C> = substitute(ring, argument) public inline fun LabeledPolynomial<C>.substitute(argument: Map<Symbol, LabeledPolynomial<C>>): LabeledPolynomial<C> = substitute(ring, argument)
/** /**
* Substitutes provided rational function [argument] into [this] polynomial. * Substitutes provided rational function [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substituteRationalFunction") @JvmName("substituteRationalFunction")
public inline fun LabeledPolynomial<C>.substitute(argument: Map<Symbol, LabeledRationalFunction<C>>): LabeledRationalFunction<C> = substitute(ring, argument) public inline fun LabeledPolynomial<C>.substitute(argument: Map<Symbol, LabeledRationalFunction<C>>): LabeledRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided constant [argument] into [this] rational function. * Substitutes provided constant [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun LabeledRationalFunction<C>.substitute(argument: Map<Symbol, C>): LabeledRationalFunction<C> = substitute(ring, argument) public inline fun LabeledRationalFunction<C>.substitute(argument: Map<Symbol, C>): LabeledRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] rational function. * Substitutes provided polynomial [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substitutePolynomial") @JvmName("substitutePolynomial")
public inline fun LabeledRationalFunction<C>.substitute(argument: Map<Symbol, LabeledPolynomial<C>>): LabeledRationalFunction<C> = substitute(ring, argument) public inline fun LabeledRationalFunction<C>.substitute(argument: Map<Symbol, LabeledPolynomial<C>>): LabeledRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided rational function [argument] into [this] rational function. * Substitutes provided rational function [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substituteRationalFunction") @JvmName("substituteRationalFunction")
public inline fun LabeledRationalFunction<C>.substitute(argument: Map<Symbol, LabeledRationalFunction<C>>): LabeledRationalFunction<C> = substitute(ring, argument) public inline fun LabeledRationalFunction<C>.substitute(argument: Map<Symbol, LabeledRationalFunction<C>>): LabeledRationalFunction<C> = substitute(ring, argument)
} }

View File

@ -346,39 +346,32 @@ public open class ListPolynomialSpace<C, A : Ring<C>>(
/** /**
* Evaluates value of [this] polynomial on provided [argument]. * Evaluates value of [this] polynomial on provided [argument].
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.substitute(argument: C): C = substitute(ring, argument) public inline fun ListPolynomial<C>.substitute(argument: C): C = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] polynomial. * Substitutes provided polynomial [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.substitute(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument) public inline fun ListPolynomial<C>.substitute(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.asFunction(): (C) -> C = asFunctionOver(ring) public inline fun ListPolynomial<C>.asFunction(): (C) -> C = asFunctionOver(ring)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.asFunctionOfConstant(): (C) -> C = asFunctionOfConstantOver(ring) public inline fun ListPolynomial<C>.asFunctionOfConstant(): (C) -> C = asFunctionOfConstantOver(ring)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.asFunctionOfPolynomial(): (ListPolynomial<C>) -> ListPolynomial<C> = asFunctionOfPolynomialOver(ring) public inline fun ListPolynomial<C>.asFunctionOfPolynomial(): (ListPolynomial<C>) -> ListPolynomial<C> = asFunctionOfPolynomialOver(ring)
/** /**
* Evaluates value of [this] polynomial on provided [argument]. * Evaluates value of [this] polynomial on provided [argument].
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun ListPolynomial<C>.invoke(argument: C): C = substitute(ring, argument) public inline operator fun ListPolynomial<C>.invoke(argument: C): C = substitute(ring, argument)
/** /**
* Evaluates value of [this] polynomial on provided [argument]. * Evaluates value of [this] polynomial on provided [argument].
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun ListPolynomial<C>.invoke(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument) public inline operator fun ListPolynomial<C>.invoke(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument)
} }

View File

@ -55,83 +55,67 @@ public class ListRationalFunctionSpace<C, A : Ring<C>> (
/** /**
* Evaluates value of [this] polynomial on provided argument. * Evaluates value of [this] polynomial on provided argument.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.substitute(argument: C): C = substitute(ring, argument) public inline fun ListPolynomial<C>.substitute(argument: C): C = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] polynomial. * Substitutes provided polynomial [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.substitute(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument) public inline fun ListPolynomial<C>.substitute(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument)
/** /**
* Substitutes provided rational function [argument] into [this] polynomial. * Substitutes provided rational function [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.substitute(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument) public inline fun ListPolynomial<C>.substitute(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] rational function. * Substitutes provided polynomial [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListRationalFunction<C>.substitute(argument: ListPolynomial<C>): ListRationalFunction<C> = substitute(ring, argument) public inline fun ListRationalFunction<C>.substitute(argument: ListPolynomial<C>): ListRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided rational function [argument] into [this] rational function. * Substitutes provided rational function [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListRationalFunction<C>.substitute(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument) public inline fun ListRationalFunction<C>.substitute(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.asFunction(): (C) -> C = { substitute(ring, it) } public inline fun ListPolynomial<C>.asFunction(): (C) -> C = { substitute(ring, it) }
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.asFunctionOfConstant(): (C) -> C = { substitute(ring, it) } public inline fun ListPolynomial<C>.asFunctionOfConstant(): (C) -> C = { substitute(ring, it) }
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.asFunctionOfPolynomial(): (ListPolynomial<C>) -> ListPolynomial<C> = { substitute(ring, it) } public inline fun ListPolynomial<C>.asFunctionOfPolynomial(): (ListPolynomial<C>) -> ListPolynomial<C> = { substitute(ring, it) }
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListPolynomial<C>.asFunctionOfRationalFunction(): (ListRationalFunction<C>) -> ListRationalFunction<C> = { substitute(ring, it) } public inline fun ListPolynomial<C>.asFunctionOfRationalFunction(): (ListRationalFunction<C>) -> ListRationalFunction<C> = { substitute(ring, it) }
/** /**
* Represent [this] rational function as a regular context-less function. * Represent [this] rational function as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListRationalFunction<C>.asFunctionOfPolynomial(): (ListPolynomial<C>) -> ListRationalFunction<C> = { substitute(ring, it) } public inline fun ListRationalFunction<C>.asFunctionOfPolynomial(): (ListPolynomial<C>) -> ListRationalFunction<C> = { substitute(ring, it) }
/** /**
* Represent [this] rational function as a regular context-less function. * Represent [this] rational function as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun ListRationalFunction<C>.asFunctionOfRationalFunction(): (ListRationalFunction<C>) -> ListRationalFunction<C> = { substitute(ring, it) } public inline fun ListRationalFunction<C>.asFunctionOfRationalFunction(): (ListRationalFunction<C>) -> ListRationalFunction<C> = { substitute(ring, it) }
/** /**
* Evaluates value of [this] polynomial on provided argument. * Evaluates value of [this] polynomial on provided argument.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun ListPolynomial<C>.invoke(argument: C): C = substitute(ring, argument) public inline operator fun ListPolynomial<C>.invoke(argument: C): C = substitute(ring, argument)
/** /**
* Evaluates value of [this] polynomial on provided argument. * Evaluates value of [this] polynomial on provided argument.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun ListPolynomial<C>.invoke(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument) public inline operator fun ListPolynomial<C>.invoke(argument: ListPolynomial<C>): ListPolynomial<C> = substitute(ring, argument)
/** /**
* Evaluates value of [this] polynomial on provided argument. * Evaluates value of [this] polynomial on provided argument.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun ListPolynomial<C>.invoke(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument) public inline operator fun ListPolynomial<C>.invoke(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument)
/** /**
* Evaluates value of [this] rational function on provided argument. * Evaluates value of [this] rational function on provided argument.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun ListRationalFunction<C>.invoke(argument: ListPolynomial<C>): ListRationalFunction<C> = substitute(ring, argument) public inline operator fun ListRationalFunction<C>.invoke(argument: ListPolynomial<C>): ListRationalFunction<C> = substitute(ring, argument)
/** /**
* Evaluates value of [this] rational function on provided argument. * Evaluates value of [this] rational function on provided argument.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun ListRationalFunction<C>.invoke(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument) public inline operator fun ListRationalFunction<C>.invoke(argument: ListRationalFunction<C>): ListRationalFunction<C> = substitute(ring, argument)
} }

View File

@ -113,135 +113,111 @@ public class NumberedRationalFunctionSpace<C, A: Ring<C>> (
/** /**
* Substitutes provided constant [argument] into [this] polynomial. * Substitutes provided constant [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedPolynomial<C>.substitute(argument: Map<Int, C>): NumberedPolynomial<C> = substitute(ring, argument) public inline fun NumberedPolynomial<C>.substitute(argument: Map<Int, C>): NumberedPolynomial<C> = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] polynomial. * Substitutes provided polynomial [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substitutePolynomial") @JvmName("substitutePolynomial")
public inline fun NumberedPolynomial<C>.substitute(argument: Map<Int, NumberedPolynomial<C>>): NumberedPolynomial<C> = substitute(ring, argument) public inline fun NumberedPolynomial<C>.substitute(argument: Map<Int, NumberedPolynomial<C>>): NumberedPolynomial<C> = substitute(ring, argument)
/** /**
* Substitutes provided rational function [argument] into [this] polynomial. * Substitutes provided rational function [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substituteRationalFunction") @JvmName("substituteRationalFunction")
public inline fun NumberedPolynomial<C>.substitute(argument: Map<Int, NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, argument) public inline fun NumberedPolynomial<C>.substitute(argument: Map<Int, NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided constant [argument] into [this] rational function. * Substitutes provided constant [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedRationalFunction<C>.substitute(argument: Map<Int, C>): NumberedRationalFunction<C> = substitute(ring, argument) public inline fun NumberedRationalFunction<C>.substitute(argument: Map<Int, C>): NumberedRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] rational function. * Substitutes provided polynomial [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substitutePolynomial") @JvmName("substitutePolynomial")
public inline fun NumberedRationalFunction<C>.substitute(argument: Map<Int, NumberedPolynomial<C>>): NumberedRationalFunction<C> = substitute(ring, argument) public inline fun NumberedRationalFunction<C>.substitute(argument: Map<Int, NumberedPolynomial<C>>): NumberedRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided rational function [argument] into [this] rational function. * Substitutes provided rational function [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substituteRationalFunction") @JvmName("substituteRationalFunction")
public inline fun NumberedRationalFunction<C>.substitute(argument: Map<Int, NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, argument) public inline fun NumberedRationalFunction<C>.substitute(argument: Map<Int, NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided constant [argument] into [this] polynomial. * Substitutes provided constant [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedPolynomial<C>.substitute(argument: Buffer<C>): NumberedPolynomial<C> = substitute(ring, argument) public inline fun NumberedPolynomial<C>.substitute(argument: Buffer<C>): NumberedPolynomial<C> = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [argument] into [this] polynomial. * Substitutes provided polynomial [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substitutePolynomial") @JvmName("substitutePolynomial")
public inline fun NumberedPolynomial<C>.substitute(argument: Buffer<NumberedPolynomial<C>>): NumberedPolynomial<C> = substitute(ring, argument) public inline fun NumberedPolynomial<C>.substitute(argument: Buffer<NumberedPolynomial<C>>): NumberedPolynomial<C> = substitute(ring, argument)
/** /**
* Substitutes provided rational function [argument] into [this] polynomial. * Substitutes provided rational function [argument] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substituteRationalFunction") @JvmName("substituteRationalFunction")
public inline fun NumberedPolynomial<C>.substitute(argument: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, argument) public inline fun NumberedPolynomial<C>.substitute(argument: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided constant [argument] into [this] rational function. * Substitutes provided constant [argument] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedRationalFunction<C>.substitute(argument: Buffer<C>): NumberedRationalFunction<C> = substitute(ring, argument) public inline fun NumberedRationalFunction<C>.substitute(argument: Buffer<C>): NumberedRationalFunction<C> = substitute(ring, argument)
/** /**
* Substitutes provided polynomial [arguments] into [this] rational function. * Substitutes provided polynomial [arguments] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substitutePolynomial") @JvmName("substitutePolynomial")
public inline fun NumberedRationalFunction<C>.substitute(arguments: Buffer<NumberedPolynomial<C>>): NumberedRationalFunction<C> = substitute(ring, arguments) public inline fun NumberedRationalFunction<C>.substitute(arguments: Buffer<NumberedPolynomial<C>>): NumberedRationalFunction<C> = substitute(ring, arguments)
/** /**
* Substitutes provided rational function [arguments] into [this] rational function. * Substitutes provided rational function [arguments] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("substituteRationalFunction") @JvmName("substituteRationalFunction")
public inline fun NumberedRationalFunction<C>.substitute(arguments: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, arguments) public inline fun NumberedRationalFunction<C>.substitute(arguments: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, arguments)
/** /**
* Substitutes provided constant [arguments] into [this] polynomial. * Substitutes provided constant [arguments] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedPolynomial<C>.substituteFully(arguments: Buffer<C>): C = substituteFully(ring, arguments) public inline fun NumberedPolynomial<C>.substituteFully(arguments: Buffer<C>): C = substituteFully(ring, arguments)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedPolynomial<C>.asFunction(): (Buffer<C>) -> C = asFunctionOver(ring) public inline fun NumberedPolynomial<C>.asFunction(): (Buffer<C>) -> C = asFunctionOver(ring)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedPolynomial<C>.asFunctionOfConstant(): (Buffer<C>) -> C = asFunctionOfConstantOver(ring) public inline fun NumberedPolynomial<C>.asFunctionOfConstant(): (Buffer<C>) -> C = asFunctionOfConstantOver(ring)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedPolynomial<C>.asFunctionOfPolynomial(): (Buffer<NumberedPolynomial<C>>) -> NumberedPolynomial<C> = asFunctionOfPolynomialOver(ring) public inline fun NumberedPolynomial<C>.asFunctionOfPolynomial(): (Buffer<NumberedPolynomial<C>>) -> NumberedPolynomial<C> = asFunctionOfPolynomialOver(ring)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedPolynomial<C>.asFunctionOfRationalFunction(): (Buffer<NumberedRationalFunction<C>>) -> NumberedRationalFunction<C> = asFunctionOfRationalFunctionOver(ring) public inline fun NumberedPolynomial<C>.asFunctionOfRationalFunction(): (Buffer<NumberedRationalFunction<C>>) -> NumberedRationalFunction<C> = asFunctionOfRationalFunctionOver(ring)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedRationalFunction<C>.asFunctionOfPolynomial(): (Buffer<NumberedPolynomial<C>>) -> NumberedRationalFunction<C> = asFunctionOfPolynomialOver(ring) public inline fun NumberedRationalFunction<C>.asFunctionOfPolynomial(): (Buffer<NumberedPolynomial<C>>) -> NumberedRationalFunction<C> = asFunctionOfPolynomialOver(ring)
/** /**
* Represent [this] polynomial as a regular context-less function. * Represent [this] polynomial as a regular context-less function.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline fun NumberedRationalFunction<C>.asFunctionOfRationalFunction(): (Buffer<NumberedRationalFunction<C>>) -> NumberedRationalFunction<C> = asFunctionOfRationalFunctionOver(ring) public inline fun NumberedRationalFunction<C>.asFunctionOfRationalFunction(): (Buffer<NumberedRationalFunction<C>>) -> NumberedRationalFunction<C> = asFunctionOfRationalFunctionOver(ring)
/** /**
* Evaluates value of [this] polynomial on provided [arguments]. * Evaluates value of [this] polynomial on provided [arguments].
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline operator fun NumberedPolynomial<C>.invoke(arguments: Buffer<C>): C = substituteFully(ring, arguments) public inline operator fun NumberedPolynomial<C>.invoke(arguments: Buffer<C>): C = substituteFully(ring, arguments)
/** /**
* Substitutes provided [arguments] into [this] polynomial. * Substitutes provided [arguments] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("invokePolynomial") @JvmName("invokePolynomial")
public inline operator fun NumberedPolynomial<C>.invoke(arguments: Buffer<NumberedPolynomial<C>>): NumberedPolynomial<C> = substitute(ring, arguments) public inline operator fun NumberedPolynomial<C>.invoke(arguments: Buffer<NumberedPolynomial<C>>): NumberedPolynomial<C> = substitute(ring, arguments)
/** /**
* Substitutes provided [arguments] into [this] polynomial. * Substitutes provided [arguments] into [this] polynomial.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("invokeRationalFunction") @JvmName("invokeRationalFunction")
public inline operator fun NumberedPolynomial<C>.invoke(arguments: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, arguments) public inline operator fun NumberedPolynomial<C>.invoke(arguments: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, arguments)
/** /**
* Substitutes provided [arguments] into [this] rational function. * Substitutes provided [arguments] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("invokePolynomial") @JvmName("invokePolynomial")
public inline operator fun NumberedRationalFunction<C>.invoke(arguments: Buffer<NumberedPolynomial<C>>): NumberedRationalFunction<C> = substitute(ring, arguments) public inline operator fun NumberedRationalFunction<C>.invoke(arguments: Buffer<NumberedPolynomial<C>>): NumberedRationalFunction<C> = substitute(ring, arguments)
/** /**
* Substitutes provided [arguments] into [this] rational function. * Substitutes provided [arguments] into [this] rational function.
*/ */
@Suppress("NOTHING_TO_INLINE")
@JvmName("invokeRationalFunction") @JvmName("invokeRationalFunction")
public inline operator fun NumberedRationalFunction<C>.invoke(arguments: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, arguments) public inline operator fun NumberedRationalFunction<C>.invoke(arguments: Buffer<NumberedRationalFunction<C>>): NumberedRationalFunction<C> = substitute(ring, arguments)
} }

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
@file:Suppress("FunctionName", "NOTHING_TO_INLINE") @file:Suppress("FunctionName")
package space.kscience.kmath.functions package space.kscience.kmath.functions
@ -309,21 +309,18 @@ public class LabeledPolynomialTermSignatureBuilder {
* *
* Declaring another power of the same variable will increase its degree by received degree. * Declaring another power of the same variable will increase its degree by received degree.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun Symbol.pow(deg: UInt): Unit = this inPowerOf deg public inline infix fun Symbol.pow(deg: UInt): Unit = this inPowerOf deg
/** /**
* Declares power of [this] variable of degree [deg]. * Declares power of [this] variable of degree [deg].
* *
* Declaring another power of the same variable will increase its degree by received degree. * Declaring another power of the same variable will increase its degree by received degree.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun Symbol.`in`(deg: UInt): Unit = this inPowerOf deg public inline infix fun Symbol.`in`(deg: UInt): Unit = this inPowerOf deg
/** /**
* Declares power of [this] variable of degree [deg]. * Declares power of [this] variable of degree [deg].
* *
* Declaring another power of the same variable will increase its degree by received degree. * Declaring another power of the same variable will increase its degree by received degree.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun Symbol.of(deg: UInt): Unit = this inPowerOf deg public inline infix fun Symbol.of(deg: UInt): Unit = this inPowerOf deg
} }
@ -370,7 +367,6 @@ public class LabeledPolynomialBuilder<C>(
* Declaring another monomial with the same signature will add [this] coefficient to existing one. If the sum of such * Declaring another monomial with the same signature will add [this] coefficient to existing one. If the sum of such
* coefficients is zero at any moment the monomial won't be removed but will be left as it is. * coefficients is zero at any moment the monomial won't be removed but will be left as it is.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun C.with(noinline block: LabeledPolynomialTermSignatureBuilder.() -> Unit): Unit = this.invoke(block) public inline infix fun C.with(noinline block: LabeledPolynomialTermSignatureBuilder.() -> Unit): Unit = this.invoke(block)
/** /**
* Declares monomial with [this] coefficient and signature constructed by [block]. * Declares monomial with [this] coefficient and signature constructed by [block].

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/ */
@file:Suppress("FunctionName", "NOTHING_TO_INLINE") @file:Suppress("FunctionName")
package space.kscience.kmath.functions package space.kscience.kmath.functions
@ -296,21 +296,18 @@ public class NumberedPolynomialTermSignatureBuilder {
* *
* Declaring another power of the same variable will increase its degree by received degree. * Declaring another power of the same variable will increase its degree by received degree.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun Int.pow(deg: UInt): Unit = this inPowerOf deg public inline infix fun Int.pow(deg: UInt): Unit = this inPowerOf deg
/** /**
* Declares power of variable #[this] of degree [deg]. * Declares power of variable #[this] of degree [deg].
* *
* Declaring another power of the same variable will increase its degree by received degree. * Declaring another power of the same variable will increase its degree by received degree.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun Int.`in`(deg: UInt): Unit = this inPowerOf deg public inline infix fun Int.`in`(deg: UInt): Unit = this inPowerOf deg
/** /**
* Declares power of variable #[this] of degree [deg]. * Declares power of variable #[this] of degree [deg].
* *
* Declaring another power of the same variable will increase its degree by received degree. * Declaring another power of the same variable will increase its degree by received degree.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun Int.of(deg: UInt): Unit = this inPowerOf deg public inline infix fun Int.of(deg: UInt): Unit = this inPowerOf deg
} }
@ -358,7 +355,6 @@ public class NumberedPolynomialBuilder<C>(
* Declaring another monomial with the same signature will add [this] coefficient to existing one. If the sum of such * Declaring another monomial with the same signature will add [this] coefficient to existing one. If the sum of such
* coefficients is zero at any moment the monomial won't be removed but will be left as it is. * coefficients is zero at any moment the monomial won't be removed but will be left as it is.
*/ */
@Suppress("NOTHING_TO_INLINE")
public inline infix fun C.with(noinline block: NumberedPolynomialTermSignatureBuilder.() -> Unit): Unit = this.invoke(block) public inline infix fun C.with(noinline block: NumberedPolynomialTermSignatureBuilder.() -> Unit): Unit = this.invoke(block)
/** /**
* Declares monomial with [this] coefficient and signature constructed by [block]. * Declares monomial with [this] coefficient and signature constructed by [block].