Companion object for constructing and operating on Pair objects.
Attributes
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The names of the product elements.
Attributes
- Inherited from:
- Mirror
The name of the type.
The name of the type.
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
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)
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.
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
acoefficients (according to the figure on Wikipedia article describing Generalized ContinuedFraction). - bs
-
the
bcoefficients (according to the figure on Wikipedia article describing Generalized ContinuedFraction).
Attributes
- Returns
-
a
LazyListofLongs.