private void step3(DBIDRef id, WritableDBIDDataStore pi, WritableDoubleDataStore lambda, DBIDs processedIDs, WritableDoubleDataStore m) {
    DBIDVar p_i = DBIDUtil.newVar();
    // for i = 1..n
    for(DBIDIter it = processedIDs.iter(); it.valid(); it.advance()) {
      double l_i = lambda.doubleValue(it);
      double m_i = m.doubleValue(it);
      pi.assignVar(it, p_i); // p_i = pi(it)
      double mp_i = m.doubleValue(p_i);

      // if L(i) >= M(i)
      if(l_i >= m_i) {
        // M(P(i)) = min { M(P(i)), L(i) }
        if(l_i < mp_i) {
          m.putDouble(p_i, l_i);
        }

        // L(i) = M(i)
        lambda.putDouble(it, m_i);

        // P(i) = n+1;
        pi.put(it, id);
      }
      else {
        // M(P(i)) = min { M(P(i)), M(i) }
        if(m_i < mp_i) {
          m.putDouble(p_i, m_i);
        }
      }
    }
  }
private void step3 ( DBIDRef id , WritableDBIDDataStore pi , WritableDoubleDataStore lambda , DBIDs processedIDs , WritableDoubleDataStore m ) { DBIDVar p_i = DBIDUtil . newVar ( ) ; for ( DBIDIter it = processedIDs . iter ( ) ; it . valid ( ) ; it . advance ( ) ) { double l_i = lambda . doubleValue ( it ) ; double m_i = m . doubleValue ( it ) ; pi . assignVar ( it , p_i ) ; double mp_i = m . doubleValue ( p_i ) ; if ( l_i >= m_i ) { if ( l_i < mp_i ) { m . putDouble ( p_i , l_i ) ; } lambda . putDouble ( it , m_i ) ; pi . put ( it , id ) ; } else { if ( m_i < mp_i ) { m . putDouble ( p_i , m_i ) ; } } } }
Third step: Determine the values for P and L

@param id the id of the object to be inserted into the pointer
representation
@param pi Pi data store
@param lambda Lambda data store
@param processedIDs the already processed ids
@param m Data store