/** * If the set does not contain the mate of the specified edge, adds * the edge to the set, remembers the edge added, and returns true. * Otherwise, if the set already contains the mate, removes the mate * from the set, remembers the mate removed, and returns false. */ boolean add(Node a, Node b, Node c, Tet nabc) { _index = indexOfMate(a,b); if (_filled[_index]) { setCurrent(); remove(_index); return false; } else { _a[_index] = a; _b[_index] = b; _c[_index] = c; _nabc[_index] = nabc; _filled[_index] = true; ++_n; if (_n>_nmax*_factor && _nmax<MAX_CAPACITY) doubleCapacity(); setCurrent(); return true; } }