code: private void updateBetas(final List<Vec> docs, ExecutorService ex)
      {
          final double[] digammaLambdaSum = new double[K];//TODO may want to move this out & reuse
          for(int k = 0; k < K; k++)
              digammaLambdaSum[k] = FastMath.digamma(W*eta+lambdaSums.getD(k));
          List<List<Vec>> docSplits = ListUtils.splitList(docs, SystemInfo.LogicalCores);
          final CountDownLatch latch = new CountDownLatch(docSplits.size());
          for(final List<Vec> docsSub :  docSplits)
          {
              ex.submit(new Runnable()
              {
  
                  @Override
                  public void run()
                  {
                      for(Vec doc : docsSub)//make sure out ELogBeta is up to date
                          for(IndexValue iv : doc)
                          {
                              int indx = iv.getIndex();
                              if(lastUsed[indx] != t)
                              {
                                  for(int k = 0; k < K; k++)
                                  {
                                      double lambda_kj = lambda.get(k).get(indx);
  
                                      double logBeta_kj = FastMath.digamma(eta+lambda_kj)-digammaLambdaSum[k];
                                      ELogBeta.get(k).set(indx, logBeta_kj);
                                      ExpELogBeta.get(k).set(indx, FastMath.exp(logBeta_kj));
                                  }
                                  lastUsed[indx] = t;
                              }
                          }
                      
                      latch.countDown();
                  }
              });
          }
          
          try
          {
              latch.await();
          }
          catch (InterruptedException ex1)
          {
              Logger.getLogger(OnlineLDAsvi.class.getName()).log(Level.SEVERE, null, ex1);
          }
      }
docs: Updates the Beta vectors associated with the {@link #gammaLocal gamma}
  topic distributions so that they can be used to update against the given
  batch of documents. Once updated, the Betas are the only items needed to
  perform updates from the given batch, and the gamma values can be updated
  as the updates are computed.
  
  @param docs the mini batch of documents to update from