Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.

fj.function
Class BigIntegers

java.lang.Object
  extended by fj.function.BigIntegers

public final class BigIntegers
extends Object

Curried functions over Integers.


Field Summary
static F<BigInteger,BigInteger> abs
          Absolute value.
static F<BigInteger,F<BigInteger,BigInteger>> add
          Curried Integer addition.
static F<BigInteger,F<BigInteger,BigInteger>> multiply
          Curried Integer multiplication.
static F<BigInteger,BigInteger> negate
          Negation.
static F<BigInteger,F<Integer,BigInteger>> power
          Power.
static F<BigInteger,F<BigInteger,BigInteger>> remainder
          Remainder.
static F<BigInteger,F<BigInteger,BigInteger>> subtract
          Curried Integer subtraction.
 
Method Summary
static BigInteger product(List<BigInteger> ints)
          Returns the product of a list of big integers.
static BigInteger sum(List<BigInteger> ints)
          Sums a list of big integers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

add

public static final F<BigInteger,F<BigInteger,BigInteger>> add
Curried Integer addition.


multiply

public static final F<BigInteger,F<BigInteger,BigInteger>> multiply
Curried Integer multiplication.


subtract

public static final F<BigInteger,F<BigInteger,BigInteger>> subtract
Curried Integer subtraction.


negate

public static final F<BigInteger,BigInteger> negate
Negation.


abs

public static final F<BigInteger,BigInteger> abs
Absolute value.


remainder

public static final F<BigInteger,F<BigInteger,BigInteger>> remainder
Remainder.


power

public static final F<BigInteger,F<Integer,BigInteger>> power
Power.

Method Detail

sum

public static BigInteger sum(List<BigInteger> ints)
Sums a list of big integers.

Parameters:
ints - A list of big integers to sum.
Returns:
The sum of the big integers in the list.

product

public static BigInteger product(List<BigInteger> ints)
Returns the product of a list of big integers.

Parameters:
ints - A list of big integers to multiply together.
Returns:
The product of the big integers in the list.

Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.