Interface IntegerSequence
- All Superinterfaces:
Function<Natural,Integer>, Function<Natural, Integer>, Relation<Natural, Integer>, Sequence<Integer>
- All Known Implementing Classes:
BellSequence, CatalanSequence, FactorialSequence, FibonacciSequence, PrimePiSequence, PrimeSequence, SquareSequence, TriangularSequence
-
Method Summary
Methods inherited from interface Function
andThen, compose, contains, evaluate, getBackend, isContinuous, isDifferentiable, setBackendMethods inherited from interface Relation
getCodomain
-
Method Details
-
getLong
default long getLong(int n) Convenience method for small indices that fit in a long.Use this when you know the sequence value will fit in a
long. For arbitrary-precision results, useSequence.get(Natural)orSequence.get(int).- Parameters:
n- the index- Returns:
- a(n) as long
- Throws:
ArithmeticException- if the value doesn't fit in a long
-
getLong
Convenience method to get value as long using Natural index.- Parameters:
n- the index- Returns:
- a(n) as long
- Throws:
ArithmeticException- if the value doesn't fit in a long
-