/** * Constructs a copy of the specified sampled function. This constructor * <em>copies</em> (does not reference) the array of function values from * the specified sampled function. * @param r the function to copy. */ public Real1(Real1 r) { this(r._s, copy(r._v)); }
/** * Gets the array of row permutation (pivot) indices p. In this * decomposition of the m-by-n matrix A, row i was interchanged * with row p[i], for i = 0, 1, 2, ..., m-1. * @return the pivot indices p. */ public int[] getPivotIndices() { return copy(_p); }
/** * Gets the real parts of the eigenvalues. * @return array of real parts = real(diag(D)). */ public double[] getRealEigenvalues() { return copy(_d); }
/** * Gets the imaginary parts of the eigenvalues * @return array of imaginary parts = imag(diag(D)) */ public double[] getImagEigenvalues() { return copy(_e); }
/** * Gets the real parts of the eigenvalues. * @return array of real parts = real(diag(D)). */ public double[] getRealEigenvalues() { return copy(_d); }
/** * Copies elements from one specified array to another. * @param rx source array. * @param ry destination array. */ public static void copy(byte[] rx, byte[] ry) { copy(rx.length,rx,ry); }
/** * Copies elements from one specified array to another. * @param n1 number of elements to copy in 1st dimension. * @param n2 number of elements to copy in 2nd dimension. * @param rx source array. * @param ry destination array. */ public static void copy(int n1, int n2, byte[][] rx, byte[][] ry) { for (int i2=0; i2<n2; ++i2) copy(n1,rx[i2],ry[i2]); }
/** * Copies elements from one specified array to another. * @param rx source array. * @param ry destination array. */ public static void copy(short[] rx, short[] ry) { copy(rx.length,rx,ry); }
/** * Copies elements from one specified array to another. * @param rx source array. * @param ry destination array. */ public static void copy(short[][] rx, short[][] ry) { int n2 = rx.length; for (int i2=0; i2<n2; ++i2) copy(rx[i2],ry[i2]); }
/** * Copies elements from one specified array to another. * @param rx source array. * @param ry destination array. */ public static void copy(int[] rx, int[] ry) { copy(rx.length,rx,ry); }
/** * Copies elements from one specified array to another. * @param rx source array. * @param ry destination array. */ public static void copy(long[][] rx, long[][] ry) { int n2 = rx.length; for (int i2=0; i2<n2; ++i2) copy(rx[i2],ry[i2]); }
/** * Copies elements from one specified array to another. * @param n1 number of elements to copy in 1st dimension. * @param n2 number of elements to copy in 2nd dimension. * @param rx source array. * @param ry destination array. */ public static void copy(int n1, int n2, long[][] rx, long[][] ry) { for (int i2=0; i2<n2; ++i2) copy(n1,rx[i2],ry[i2]); }
/** * Copies elements from one specified array to another. * @param rx source array. * @param ry destination array. */ public static void copy(float[][][] rx, float[][][] ry) { int n3 = rx.length; for (int i3=0; i3<n3; ++i3) copy(rx[i3],ry[i3]); }
/** * Copies elements from one specified array to another. * @param rx source array. * @param ry destination array. */ public static void copy(double[][][] rx, double[][][] ry) { int n3 = rx.length; for (int i3=0; i3<n3; ++i3) copy(rx[i3],ry[i3]); }
/** * Copies elements from one specified array to another. * @param n1 number of elements to copy in 1st dimension. * @param cx source array. * @param cy destination array. */ public static void ccopy(int n1, double[] cx, double[] cy) { copy(2*n1,cx,cy); }
/** * Gets a copy of the array of function values. * @return array of sampled function values f(x). */ public float[] getFunction() { return copy(_f); }
/** * Gets indices of points in this node. * @return the array of indices. */ public int[] getIndices() { return copy(1+_kmax-_kmin,_kmin,_i); }
/** * Gets all elements of this matrix into the specified array. * @param a the array. */ public void get(double[][] a) { copy(_a,a); }
/** * Gets the matrix V' (V transposed) of right singular vectors. * The right singular vectors are in the rows of V'. * @return the matrix V'. */ public DMatrix getVTranspose() { return new DMatrix(_mn,_n,copy(_vt)); }
/** * Gets the m-by-n matrix factor Q. * @return the m-by-n matrix factor Q. */ public DMatrix getQ() { double[] q = copy(_qr); LapackInfo li = new LapackInfo(); _lapack.dorgqr(_m,_n,_k,q,_m,_tau,_work,_lwork,li); li.check("dorgqr"); return new DMatrix(_m,_n,q); }