Pair

com.phasmidsoftware.number.core.misc.Pair
See thePair companion object
case class Pair(b: Long, a: Long)

A pair of coefficients. The a value is always 1 in the case of a simple Continued Fraction. The b value is always positive (except for the b which precedes a Continue Fraction, which may be negative).

CONSIDER representing this by a Rational. However, these coefficients are really independent entities.

Value parameters

a

the a value.

b

the b value.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product

Concrete fields

lazy val toRational: Rational

This method returns a Rational defined as a divided by b. It isn't really useful generally when evaluating continued fractions because we never really need this result

This method returns a Rational defined as a divided by b. It isn't really useful generally when evaluating continued fractions because we never really need this result

Attributes

Returns

a/b as a Rational.