/** Attribute for vertex locators in the priority queue Q. */
  protected Object LOC = new Object();
  /** Check if there is a locator associated with a vertex. */
  protected boolean hasLoc(Vertex v) {
    return v.has(LOC);
  }
  /** Get the locator in Q of a vertex. */
  protected Locator getLoc(Vertex v) {
    return (Locator) v.get(LOC);
  }
  /** Associate with a vertex its locator in Q. */
  protected void setLoc(Vertex v, Locator l) {
    v.set(LOC, l);
  }
  /** Remove the locator associated with a vertex. */
  protected void destroyLoc(Vertex v) {
    v.destroy(LOC);
  }
  /** Get the vertex associated with a locator. */
  protected Vertex getVertex(Locator l) {
    return (Vertex) l.element();
  }
  /** Get the distance of a vertex given its locator in Q. */
  protected int getDist(Locator l) {
    return ((Integer) l.key()).intValue();
  }