Projects a CDKRGraph bitset on the source graph G1.
@param  set  CDKRGraph BitSet to project
@return      The associate BitSet in G1
180574
public BitSet projectG1(BitSet set) {
        BitSet projection = new BitSet(getFirstGraphSize());
        CDKRNode xNode = null;

        for (int x = set.nextSetBit(0); x >= 0; x = set.nextSetBit(x + 1)) {
            xNode = getGraph().get(x);
            projection.set(xNode.getRMap().getId1());
        }
        return projection;
    }
625260
static BitSet xor(BitSet x, BitSet y) {
        BitSet z = copy(x);
        z.xor(y);
        return z;
    }
501723
BitSet toEdgeVector(final int[] path) {
        final BitSet incidence = new BitSet(edges.size());
        int len = path.length - 1;
        for (int i = 0; i < len; i++) {
            incidence.set(indexOfEdge(path[i], path[i + 1]));
        }
        return incidence;
    }
1082255
private static Set<ProjectModel> getAllApplications(GraphContext graphContext)
    {
        Set<ProjectModel> apps = new HashSet<>();
        Iterable<ProjectModel> appProjects = graphContext.findAll(ProjectModel.class);
        for (ProjectModel appProject : appProjects)
            apps.add(appProject);
        return apps;
    }
948631
public static Set<String> tupleToString(Set<Tuple> set) {
		Set<String> result = new LinkedHashSet<String>();
		for (Tuple tuple : set) {
			String element = tuple.getElement();
			result.add(element);
		}
		return result;
	}
1085255
public BitSet projectG2(BitSet set) {
        BitSet projection = new BitSet(secondGraphSize);
        RNode xNode = null;

        for (int x = set.nextSetBit(0); x >= 0; x = set.nextSetBit(x + 1)) {
            xNode = (RNode) graph.get(x);
            projection.set(xNode.rMap.id2);
        }
        return projection;
    }
17401
public Circle set (ICircle c) {
        return set(c.x(), c.y(), c.radius());
    }
1062136
public static <K, VV, EV> Graph<K, VV, EV> fromDataSet(DataSet<Vertex<K, VV>> vertices,
			DataSet<Edge<K, EV>> edges, ExecutionEnvironment context) {

		return new Graph<>(vertices, edges, context);
	}
1371333
private static BitSet available(int[][] graph, IAtom[] atoms, EdgeToBondMap bonds) {

        final BitSet available = new BitSet();

        // for all atoms, select those that require a double-bond
        ATOMS: for (int i = 0; i < atoms.length; i++) {

            final IAtom atom = atoms[i];

            // preconditions
            if (atom.getAtomicNumber() == null)
                throw new IllegalArgumentException("atom " + (i + 1) + " had unset atomic number");
            if (atom.getFormalCharge() == null)
                throw new IllegalArgumentException("atom " + (i + 1) + " had unset formal charge");
            if (atom.getImplicitHydrogenCount() == null)
                throw new IllegalArgumentException("atom " + (i + 1) + " had unset implicit hydrogen count");

            if (!atom.getFlag(ISAROMATIC)) continue;

            // count preexisting pi-bonds, a higher bond order causes a skip
            int nPiBonds = 0;
            for (final int w : graph[i]) {
                IBond.Order order = bonds.get(i, w).getOrder();
                if (order == DOUBLE) {
                    nPiBonds++;
                } else if (order.numeric() > 2) {
                    continue ATOMS;
                }
            }

            // check if a pi bond can be assigned
            final int element = atom.getAtomicNumber();
            final int charge = atom.getFormalCharge();
            final int valence = graph[i].length + atom.getImplicitHydrogenCount() + nPiBonds;

            if (available(element, charge, valence)) {
                available.set(i);
            }
        }

        return available;
    }
421059
public static <G extends PartiallyOrdered<?>> Context antichain(final List<G> set) {
        return new Context(set, set, new Equal());
    }
749680
public static <T> Set<T> cast(Set<?> set) {
    return set == null ? null : new CastingSet<T>(set);
  }
1302160
public void addNode(CDKRNode newNode) {
        getGraph().add(newNode);
        getGraphBitSet().set(getGraph().size() - 1);
    }
622647
public Set<OGraphEdge> getInEdges(final String iEdgeLabel) {
		Set<OGraphEdge> temp = in != null ? in.get() : null;

		if (temp == null) {
			if (iEdgeLabel == null)
				temp = new HashSet<OGraphEdge>();
			in = new SoftReference<Set<OGraphEdge>>(temp);

			final Set<Object> docs = document.field(OGraphDatabase.VERTEX_FIELD_IN);

			if (docs != null) {
				// TRANSFORM ALL THE ARCS
				for (Object o : docs) {
					final ODocument doc = (ODocument) ((OIdentifiable) o).getRecord();
					if (iEdgeLabel != null && !iEdgeLabel.equals(doc.field(OGraphDatabase.LABEL)))
						continue;

					temp.add((OGraphEdge) database.getUserObjectByRecord(doc, null));
				}
			}
		} else if (iEdgeLabel != null) {
			// FILTER THE EXISTENT COLLECTION
			HashSet<OGraphEdge> filtered = new HashSet<OGraphEdge>();
			for (OGraphEdge e : temp) {
				if (iEdgeLabel.equals(e.getLabel()))
					filtered.add(e);
			}
			temp = filtered;
		}

		return temp;
	}
143380
public AbstractPrintQuery addAttributeSet(final AttributeSet _set)
        throws EFapsException
    {
        final String key = "linkfrom[" + _set.getName() + "#" + _set.getAttributeName() + "]";
        final OneSelect oneselect = new OneSelect(this, key);
        this.allSelects.add(oneselect);
        this.attr2OneSelect.put(_set.getAttributeName(), oneselect);
        oneselect.analyzeSelectStmt();
        for (final String setAttrName : _set.getSetAttributes()) {
            if (!setAttrName.equals(_set.getAttributeName())) {
                oneselect.getFromSelect().addOneSelect(new OneSelect(this, _set.getAttribute(setAttrName)));
            }
        }
        oneselect.getFromSelect().getMainOneSelect().setAttribute(_set.getAttribute(_set.getAttributeName()));
        return this;
    }
1054995
public BitSet toBitSet() {
		final BitSet set = new BitSet(length());
		for (int i = 0, n = length(); i < n; ++i) {
			set.set(i, getGene(i).getBit());
		}
		return set;
	}
1364923
private SortedSet<ClassDoc> get(Map<ClassDoc, SortedSet<ClassDoc>> map, ClassDoc cd) {
        SortedSet<ClassDoc> aset = map.get(cd);
        if (aset == null) {
            return new TreeSet<>(comparator);
        }
        return aset;
    }
215143
public void build(Keyset keyset)
    {
        if (keyset.hasValues())
        {
            DawgBuilder dawgBuilder = new DawgBuilder();
            buildDawg(keyset, dawgBuilder);
            buildFromDawg(dawgBuilder);
            dawgBuilder.clear();
        }
        else
        {
            buildFromKeyset(keyset);
        }
    }