- SetIteratorEncodingEdge *eeit = n->edges.iterator();
- uint newsize = n->getSize();
- while (eeit->hasNext()) {
- EncodingEdge *ee = eeit->next();
- if (ee->left != NULL && ee->left != n && nodes.contains(ee->left)) {
- uint intersectSize = n->s->getUnionSize(ee->left->s);
- if (intersectSize > newsize)
- newsize = intersectSize;
- }
- if (ee->right != NULL && ee->right != n && nodes.contains(ee->right)) {
- uint intersectSize = n->s->getUnionSize(ee->right->s);
- if (intersectSize > newsize)
- newsize = intersectSize;
- }
- if (ee->dst != NULL && ee->dst != n && nodes.contains(ee->dst)) {
- uint intersectSize = n->s->getUnionSize(ee->dst->s);
- if (intersectSize > newsize)
- newsize = intersectSize;
- }
+ uint nSize = n->getSize();
+ uint newSize = allValues.getSize() + nSize;
+ for (uint i = 0; i < nSize; i++) {
+ if (allValues.contains(n->getIndex(i)))
+ newSize--;