Esempio n. 1
0
  /**
   * Returns pre values.
   *
   * @param ids unique node ids
   * @param off start offset
   * @param len number of ids
   * @return sorted pre values
   */
  public final int[] pre(final int[] ids, final int off, final int len) {
    if (meta.updindex) return idmap.pre(ids, off, len);

    final IntList p = new IntList(ids.length);
    for (int i = off; i < len; ++i) p.add(preold(ids[i]));
    return p.sort().toArray();
  }
Esempio n. 2
0
 /**
  * Returns a pre value.
  *
  * @param id unique node id
  * @return pre value or -1 if id was not found
  */
 public final int pre(final int id) {
   return meta.updindex ? idmap.pre(id) : preold(id);
 }