Algebraic

com.phasmidsoftware.number.algebra.eager.Algebraic
See theAlgebraic companion trait
object Algebraic

Represents a mathematical solution, which can be either linear or quadratic in nature. This object provides factory methods for creating instances of Algebraic.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Algebraic.type

Members list

Value members

Concrete methods

Creates an Algebraic from a given Rational value.

Creates an Algebraic from a given Rational value.

Value parameters

r

the rational value used to construct the solution

Attributes

Returns

an Algebraic instance constructed from the given rational value

def apply(base: Structure, offset: Structure, coefficient: Int): 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

Implicits

Implicits

LatexRenderer for Algebraic (general case).

LatexRenderer for Algebraic (general case).

Attempts to render based on the concrete type.

Attributes