Represents a mathematical solution, which can be either linear or quadratic in nature. This object provides factory methods for creating instances of Algebraic.
Constructs an Algebraic based on the provided base and offset monotone values and a specified coefficient for the offset. If the offset is zero, a LinearSolution is returned; otherwise, a QuadraticSolution is returned.
Constructs an Algebraic based on the provided base and offset monotone values and a specified coefficient for the offset. If the offset is zero, a LinearSolution is returned; otherwise, a QuadraticSolution is returned.
Value parameters
base
the base monotone component of the solution
coefficient
an integer used in cases where a quadratic solution is required
offset
the offset monotone component used to determine whether the solution is linear or quadratic
Attributes
Returns
an Algebraic instance, which is either a LinearSolution or a QuadraticSolution