예제 #1
0
 /**
  * @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;
 }
예제 #2
0
 /**
  * @param pos
  * @param a
  * @param p
  * @param c
  * @param cvar
  */
 public void save(int pos, DataBlock a, Matrix p, double c, double cvar) {
   int np = pos - m_start;
   if (np < 0) {
     return;
   }
   if (m_bA) {
     m_a.save(np, a);
   }
   if (m_bP && p != null) {
     m_P.save(np, p);
   }
   m_c[np] = c;
   m_cvar[np] = cvar;
 }
예제 #3
0
 /**
  * @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;
 }
예제 #4
0
 /**
  * @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;
 }
예제 #5
0
 /**
  * @param idx
  * @return
  */
 public SubMatrix P(int idx) {
   return (m_P == null || idx < m_start) ? null : m_P.matrix(idx - m_start);
 }