Exemple #1
0
 edge next() {
   // check hasNext()
   assert(curEdge.isValid());
   // we are already pointing to the next
   edge tmp=curEdge;
   // anticipating the next iteration
   prepareNext();
   return tmp;
 }
Exemple #2
0
  bool addInt(const string &st,const int id) {
    bool result=true;

    if (st==SOURCE) source=id;

    if (st==TARGET) target=id;

    if ((!edgeOk) && (source!=-1) && (target!=-1)) {
      edgeOk=true;
      curEdge=graphBuilder->addEdge(source,target);
    }

    if ((st!=SOURCE) && (st!=TARGET)) {
      if (edgeOk && curEdge.isValid())
        result=graphBuilder->setEdgeValue(curEdge, st, id);
      else
        edgeAttributeError();
    }

    return result;
  }
Exemple #3
0
 bool hasNext() {
   return (curEdge.isValid());
 }
Exemple #4
0
/*
 * Returns true for all edges e in g - T_0,
 *         false otherwise.
 */
bool PlanarityTestImpl::isBackEdge(Graph *g, edge e) {
  return (e.isValid() && !isT0Edge(g, e));
}