Java BigInteger Calculate subArray(BigInteger[] input, int start, int end)

Here you can find the source of subArray(BigInteger[] input, int start, int end)

Description

Generates a subarray of a given BigInteger array.

License

Open Source License

Parameter

Parameter Description
input - the input BigInteger array
start - the start index
end - the end index

Return

a subarray of input, ranging from start to end

Declaration

public static BigInteger[] subArray(BigInteger[] input, int start,
        int end) 

Method Source Code

//package com.java2s;
import java.math.BigInteger;

public class Main {
    /**//from w ww .  j a va2s . c om
     * Generates a subarray of a given BigInteger array.
     *
     * @param input -
     *              the input BigInteger array
     * @param start -
     *              the start index
     * @param end   -
     *              the end index
     * @return a subarray of <tt>input</tt>, ranging from <tt>start</tt> to
     *         <tt>end</tt>
     */
    public static BigInteger[] subArray(BigInteger[] input, int start,
            int end) {
        BigInteger[] result = new BigInteger[end - start];
        System.arraycopy(input, start, result, 0, end - start);
        return result;
    }
}

Related

  1. splitFloat(BigInteger rawFloat, int signWidth, int exponentWidth, int mantissaWidth)
  2. sqrt(BigInteger n)
  3. sqrt(BigInteger n)
  4. sqrt(BigInteger n)
  5. square(BigInteger x)
  6. substring(final String lhs, final BigInteger _start, final BigInteger _end)
  7. sum(BigInteger valueA, BigInteger valueB)
  8. sum(BigInteger... values)
  9. sumOfDigits(BigInteger ab)