Exemple #1
0
void zmq::dist_t::reverse_match ()
{
    pipes_t::size_type prev_matching = matching;

    // Reset matching to 0
    unmatch ();

    // Mark all matching pipes as not matching and vice-versa.
    // To do this, push all pipes that are eligible but not
    // matched - i.e. between "matching" and "eligible" -
    // to the beginning of the queue.
    for (pipes_t::size_type i = prev_matching; i < eligible; ++i) {
        pipes.swap (i, matching++);
    }
}
Exemple #2
0
void search(Trav *t) {
    ElemList *idx;
    int i;
    ElemId id;

    unmatch(&elem(t->match));
    t->match = 0;
    for (i=t->cur; i<=t->last; i++) {
        idx = index(gsp, searchSpaces[i]);
        id = traverse(idx, t, t->p);
        if (success) {
            match( &elem(id) );
            t->match = id;
            t->cur = i;
            return;
        }
    }
}
Exemple #3
0
void unmatchNodeAndEdge(Trav *t) {
    unmatch(&elem(t->match));
    unmatch(&elem(t->edge));
    t->match = 0;
    t->edge  = 0;
}