Java Array Merge merge(double[]... args)

Here you can find the source of merge(double[]... args)

Description

merge

License

Apache License

Declaration

public static double[] merge(double[]... args) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double[] merge(double[]... args) {
        int size = 0;
        for (int i = 0; i < args.length; i++) {
            size += args[i].length;//from  ww w  .j  a va  2s.c  om
        }

        double[] merged = new double[size];
        int start = 0;
        for (int i = 0; i < args.length; i++) {
            System.arraycopy(args[i], 0, merged, start, args.length);
            start += args[i].length;
        }
        return merged;
    }
}

Related

  1. merge(byte[] src, byte[] src2, int start, int length)
  2. merge(byte[] src1, byte[] src2)
  3. merge(byte[]... arrays)
  4. merge(byte[]... bytes)
  5. merge(double[] a, int[] b, int p, int q, int r)
  6. merge(E[] a1, E[] a2)
  7. merge(E[] arrayA, E[] arrayB)
  8. merge(final byte[] b1, final byte[] b2)
  9. merge(final byte[]... data)