Skip to content

Commit

Permalink
Rename object fields
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpeeters committed Dec 20, 2023
1 parent 027151c commit ecad5f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/poly/shared/src/main/scala/polynomial/object.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ object `object`:

type Store[S, A] = cats.data.Store[S, A]

case class Monomial[A, B, Y](input: A => Y, output: B)
case class Monomial[A, B, Y](yᵉˣᵖ: A => Y, coeff: B)

sealed trait Binomial[+A1, +B1, +A2, +B2, Y]
object Binomial:
case class Term1[A1, B1, Y](input: A1 => Y, output: B1) extends Binomial[A1, B1, Nothing, Nothing, Y]
case class Term2[A2, B2, Y](input: A2 => Y, output: B2) extends Binomial[Nothing, Nothing, A2, B2, Y]
case class Term1[A1, B1, Y](yᵉˣᵖ: A1 => Y, coeff: B1) extends Binomial[A1, B1, Nothing, Nothing, Y]
case class Term2[A2, B2, Y](yᵉˣᵖ: A2 => Y, coeff: B2) extends Binomial[Nothing, Nothing, A2, B2, Y]

sealed trait Trinomial[+A1, +B1, +A2, +B2, +A3, +B3, Y]
object Trinomial:
case class Term1[A1, B1, Y](input: A1 => Y, output: B1) extends Trinomial[A1, B1, Nothing, Nothing, Nothing, Nothing, Y]
case class Term2[A2, B2, Y](input: A2 => Y, output: B2) extends Trinomial[Nothing, Nothing, A2, B2, Nothing, Nothing, Y]
case class Term3[A3, B3, Y](input: A3 => Y, output: B3) extends Trinomial[Nothing, Nothing, Nothing, Nothing, A3, B3, Y]
case class Term1[A1, B1, Y](yᵉˣᵖ: A1 => Y, coeff: B1) extends Trinomial[A1, B1, Nothing, Nothing, Nothing, Nothing, Y]
case class Term2[A2, B2, Y](yᵉˣᵖ: A2 => Y, coeff: B2) extends Trinomial[Nothing, Nothing, A2, B2, Nothing, Nothing, Y]
case class Term3[A3, B3, Y](yᵉˣᵖ: A3 => Y, coeff: B3) extends Trinomial[Nothing, Nothing, Nothing, Nothing, A3, B3, Y]

0 comments on commit ecad5f5

Please sign in to comment.