Pair

com.phasmidsoftware.number.core.misc.Pair
See thePair companion class
object Pair

Companion object for constructing and operating on Pair objects.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Pair.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(b: Long): Pair

Method to construct a Pair from a single Long value (useful for simple continued fractions).

Method to construct a Pair from a single Long value (useful for simple continued fractions).

Value parameters

b

the coefficient.

Attributes

Returns

a Pair of form Pair(b, 1)

def list(xs: List[Long]): List[Pair]

Utility method to convert a List[Long] to a List[Pair].

Utility method to convert a List[Long] to a List[Pair].

Value parameters

xs

a list of Longs.

Attributes

Returns

a list of Pairs.

def zip(bs: LazyList[Long], as: LazyList[Long]): LazyList[Pair]

Method to zip together two LazyLists of Long such that the result is a LazyList of Pair.

Method to zip together two LazyLists of Long such that the result is a LazyList of Pair.

Value parameters

as

the a coefficients (according to the figure on Wikipedia article describing Generalized ContinuedFraction).

bs

the b coefficients (according to the figure on Wikipedia article describing Generalized ContinuedFraction).

Attributes

Returns

a LazyList of Longs.