Concatenate three byte arrays.
@param a first third
@param b second third
@param c third third
@return New array made from a, b and c
546508
public static byte [] add(final byte [] a, final byte [] b, final byte [] c) {
    byte [] result = new byte[a.length + b.length + c.length];
    System.arraycopy(a, 0, result, 0, a.length);
    System.arraycopy(b, 0, result, a.length, b.length);
    System.arraycopy(c, 0, result, a.length + b.length, c.length);
    return result;
  }
671689
public static void multTransAB(DMatrixSparseCSC A , DMatrixRMaj B , DMatrixRMaj C )
    {
        if( A.numRows != B.numCols )
            throw new MatrixDimensionException("Inconsistent matrix shapes. "+stringShapes(A,B));
        C.reshape(A.numCols,B.numRows);

        ImplSparseSparseMult_DSCC.multTransAB(A,B,C);
    }
318597
public static String[] concat(String[] ...aa) {
    int l = 0;
    for (String[] a : aa) l += a.length;
    String[] r = new String[l];
    l = 0;
    for (String[] a : aa) {
      System.arraycopy(a, 0, r, l, a.length);
      l += a.length;
    }
    return r;
  }
1334440
private double[][] concatenateArrays(double[][] first, double[][] second){
        // I am sure as hell that should be a better way to do this...
        double[][] result = new double[first.length][first[0].length + second[0].length];
        for(int i = 0; i < first.length; i++){
            for (int j = 0; j < (first[i].length + second[i].length); j++){
                if( j < first[i].length){
                    result[i][j] = first[i][j];
                } else{
                    result[i][j] = second[i][j - first[i].length];
                }
            }
        }
        return result;
    }
1354604
public ByteArrayQueue add(byte[] b, int off, int len) {
		int newLength = addLength(len);
		System.arraycopy(b, off, array, offset + length, len);
		length = newLength;
		return this;
	}
836840
public void write(byte b[], int off, int len) {
    expandIfNecessary(count + len);
    System.arraycopy(b, off, bytes, count, len);
    count += len;
  }
920692
public static void elementMultConjB( InterleavedF64 a , InterleavedF64 b , InterleavedF64 output ) {
		for( int y = 0; y < a.height; y++ ) {

			int index = a.startIndex + y*a.stride;

			for( int x = 0; x < a.width; x++, index += 2 ) {

				double realA = a.data[index];
				double imgA = a.data[index+1];
				double realB = b.data[index];
				double imgB = b.data[index+1];

				output.data[index] = realA*realB + imgA*imgB;
				output.data[index+1] = -realA*imgB + imgA*realB;
			}
		}
	}
1224424
public static void mult(DMatrixRBlock A , DMatrixRBlock B , DMatrixRBlock C )
    {
        if( A.numCols != B.numRows )
            throw new IllegalArgumentException("Columns in A are incompatible with rows in B");
        if( A.numRows != C.numRows )
            throw new IllegalArgumentException("Rows in A are incompatible with rows in C");
        if( B.numCols != C.numCols )
            throw new IllegalArgumentException("Columns in B are incompatible with columns in C");
        if( A.blockLength != B.blockLength || A.blockLength != C.blockLength )
            throw new IllegalArgumentException("Block lengths are not all the same.");

        final int blockLength = A.blockLength;

        DSubmatrixD1 Asub = new DSubmatrixD1(A,0, A.numRows, 0, A.numCols);
        DSubmatrixD1 Bsub = new DSubmatrixD1(B,0, B.numRows, 0, B.numCols);
        DSubmatrixD1 Csub = new DSubmatrixD1(C,0, C.numRows, 0, C.numCols);

        MatrixMult_DDRB.mult(blockLength,Asub,Bsub,Csub);
    }
1294414
public static byte[] append(byte[] first, byte[] second) {
        if ((first == null) || (second == null)) return null;
        byte[] output = new byte[first.length + second.length];
        System.arraycopy(first, 0, output, 0, first.length);
        System.arraycopy(second, 0, output, first.length, second.length);
        return output;
    }
513847
public final static void writeByteArray(final byte[] a, final ObjectOutputStream s) throws IOException {
		writeVByte(a.length, s);
		s.write(a);
	}
137653
public static byte[] append(byte[] a, byte[] b) {
        byte[] z = new byte[a.length + b.length];
        System.arraycopy(a, 0, z, 0, a.length);
        System.arraycopy(b, 0, z, a.length, b.length);
        return z;
    }
1221175
private static int put(byte[] block, int offset, byte[] b, int off, int len) {
    System.arraycopy(b, off, block, offset, len);
    return len;
  }
225828
public static <A, B, C> Triple<A, B, C> newTriple (A a, B b, C c)
    {
        return new Triple<A, B, C>(a, b, c);
    }
147000
public void write(byte[] b)
        throws IOException
    {
        ensureSpareCapacity(b.length);
        System.arraycopy(b,0,_buf,_pos,b.length);
        _pos+=b.length;
    }
1097821
public final <T2, T3> Tuple3<T1, T2, T3> concat(Tuple2<T2, T3> tuple) {
        return new Tuple3<>(v1, tuple.v1, tuple.v2);
    }
875497
private static byte[] decode4to3(byte[] fourBytes) {
		byte[] outBuff1 = new byte[3];
		int count = decode4to3(fourBytes, 0, outBuff1, 0);
		byte[] outBuff2 = new byte[count];

		for (int i = 0; i < count; i++) {
			outBuff2[i] = outBuff1[i];
		}

		return outBuff2;
	}
1268433
function concat(a, b) {
  if (a.concat) { // Is `a` an Array?
    return a.concat(b);
  }
  if (a instanceof Blob) {
    return new Blob([a,b], {type: a.type});
  }
  if (a.set) { // Is `a` a typed array?
    var c = new a.constructor(a.length + b.length);
    c.set(a);
    c.set(b, a.length);
    return c;
  }
  throw new Error("Unknown data type");
}