[chord] chord Digest, Vol 65, Issue 3
刘昶言
buptlcy at gmail.com
Thu Dec 18 01:41:32 EST 2008
And i have modify the code for the bug ,but i think maybe the method is
ugly.
it is like this:
pred_list.C
void
pred_list::update_pred (const chord_node &p)
{
ptr<location> curp = pred ();
ptr<location> ploc;
if (between (curp->id (), myID, p.x))
ploc = locations->insert (p);
if(oldpred_ != pred()){
stable_pred = false;
}
oldpred_ = pred ();
}
bool
pred_list::isstable ()
{
// Won't be true until update_pred has been called once.
#ifndef PRED_LIST
return oldpred_ == pred ();
#else /* !PRED_LIST */
bool predlist_isstable = stable_predlist && stable_pred;
if(oldpred_ == pred ()) {
stable_pred = true;
}
return predlist_isstable;
#endif /* PRED_LIST */
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://amsterdam.lcs.mit.edu/pipermail/chord/attachments/20081218/156dde62/attachment.htm
More information about the chord
mailing list