/** * @param i * @param j * @return */ public double[] componentCovar(int i, int j) { if (m_P == null) { return null; } int n = m_n - m_start; double[] c = new double[n]; for (int z = 0; z < n; ++z) { c[z] = m_P.matrix(z).get(i, j) * m_ser2; } return c; }
/** * @param z * @return */ public double[] zvariance(DataBlock z) { if (m_P == null) { return null; } if (m_r != z.getLength()) { return null; } int iz = check(z); double[] var = new double[m_n - m_start]; if (iz >= 0) { return componentVar(iz); } else { for (int i = 0; i < m_n - m_start; ++i) { var[i] = SymmetricMatrix.quadraticForm(m_P.matrix(i), z) * m_ser2; } } return var; }
/** * @param idx * @param z * @return */ public double zvariance(int idx, DataBlock z) { return m_P == null || idx < m_start ? Double.NaN : SymmetricMatrix.quadraticForm(m_P.matrix(idx - m_start), z) * m_ser2; }
/** * @param idx * @return */ public SubMatrix P(int idx) { return (m_P == null || idx < m_start) ? null : m_P.matrix(idx - m_start); }