Returns the set of Vertexes from the incoming edges. It avoids to unmarshall edges.
343572
@SuppressWarnings("unchecked")
	public Set<OGraphVertex> browseInEdgesVertexes() {
		final Set<OGraphVertex> resultset = new HashSet<OGraphVertex>();

		Set<OGraphEdge> temp = in != null ? in.get() : null;

		if (temp == null) {
			final Set<ODocument> docEdges = (Set<ODocument>) document.field(OGraphDatabase.VERTEX_FIELD_IN);

			// TRANSFORM ALL THE EDGES
			if (docEdges != null)
				for (ODocument d : docEdges) {
					resultset.add((OGraphVertex) database.getUserObjectByRecord((ODocument) d.field(OGraphDatabase.EDGE_FIELD_OUT), null));
				}
		} else {
			for (OGraphEdge edge : temp) {
				resultset.add(edge.getOut());
			}
		}

		return resultset;
	}
1322468
def get_edges(ont):
    
    logging.info("QUERYING:"+ont)
    edges = [(c,SUBCLASS_OF, d) for (c,d) in fetchall_isa(ont)]
    edges += fetchall_svf(ont)
    edges += [(c,SUBPROPERTY_OF, d) for (c,d) in fetchall_subPropertyOf(ont)]
    if len(edges) == 0:
        logging.warn("No edges for {}".format(ont))
    return edges
1042308
@Override
  public Set<FlowEdge> getEdges(String nodeId) {
    try {
      rwLock.readLock().lock();
      DataNode dataNode = this.dataNodeMap.getOrDefault(nodeId, null);
      return getEdges(dataNode);
    } finally {
      rwLock.readLock().unlock();
    }
  }
745059
def full_subgraph(self, vertices):
        
        subgraph_vertices = {v for v in vertices}
        subgraph_edges = {edge
                          for v in subgraph_vertices
                          for edge in self._out_edges[v]
                          if self._heads[edge] in subgraph_vertices}
        subgraph_heads = {edge: self._heads[edge]
                          for edge in subgraph_edges}
        subgraph_tails = {edge: self._tails[edge]
                          for edge in subgraph_edges}
        return DirectedGraph._raw(
            vertices=subgraph_vertices,
            edges=subgraph_edges,
            heads=subgraph_heads,
            tails=subgraph_tails,
        )
1035232
def get_vertex_fingerprints(self, vertex_strings, edge_strings, num_iter=None):
        """"""
        import hashlib
        def str2array(x):
            """convert a hash string to a numpy array of bytes"""
            if len(x) == 0:
                return np.zeros(0, np.ubyte)
            elif sys.version_info[0] == 2:
                return np.frombuffer(x, np.ubyte)
            else:
                return np.frombuffer(x.encode(), np.ubyte)
        hashrow = lambda x: np.frombuffer(hashlib.sha1(x.data).digest(), np.ubyte)
        # initialization
        result = np.zeros((self.num_vertices, 20), np.ubyte)
        for i in range(self.num_vertices):
            result[i] = hashrow(str2array(vertex_strings[i]))
        for i in range(self.num_edges):
            a, b = self.edges[i]
            tmp = hashrow(str2array(edge_strings[i]))
            result[a] += tmp
            result[b] += tmp
        work = result.copy()
        # iterations
        if num_iter is None:
            num_iter = self.max_distance
        for i in range(num_iter):
            for a, b in self.edges:
                work[a] += result[b]
                work[b] += result[a]
            #for a in xrange(self.num_vertices):
            #    for b in xrange(self.num_vertices):
            #        work[a] += hashrow(result[b]*self.distances[a, b])
            for a in range(self.num_vertices):
                result[a] = hashrow(work[a])
        return result
612668
def edgepaths(self):
        
        edgepaths = super(Graph, self).edgepaths
        edgepaths.crs = self.crs
        return edgepaths
462155
def from_edge_pairs(cls, vertices, edge_pairs):
        
        vertices = set(vertices)
        edges = set()
        heads = {}
        tails = {}

        # Number the edges arbitrarily.
        edge_identifier = itertools.count()
        for tail, head in edge_pairs:
            edge = next(edge_identifier)
            edges.add(edge)
            heads[edge] = head
            tails[edge] = tail

        return cls._raw(
            vertices=vertices,
            edges=edges,
            heads=heads,
            tails=tails,
        )
83718
def vertices_per_edge(self):
        """"""
        import numpy as np
        return np.asarray([vertices_in_common(e[0], e[1]) for e in self.f[self.faces_per_edge]])
398726
private Set<Integer> getSuccessors(Graph g, Integer vertex) {
        if (g instanceof DirectedGraph) {
            DirectedGraph<?> dg = (DirectedGraph)g;
            return dg.successors(vertex);
        }
        else
            return Collections.<Integer>emptySet();
    }
1042205
def _adjacency_to_edges(adjacency):
    """"""
    edges = set()
    for u in adjacency:
        for v in adjacency[u]:
            try:
                edge = (u, v) if u <= v else (v, u)
            except TypeError:
                # Py3 does not allow sorting of unlike types
                if (v, u) in edges:
                    continue
                edge = (u, v)

            edges.add(edge)
    return edges
599255
def get_subgraph_from_edge_list(graph, edge_list):
    """"""
    node_list = get_vertices_from_edge_list(graph, edge_list)
    subgraph = make_subgraph(graph, node_list, edge_list)

    return subgraph
721854
def _get_edge_set(self, tol=0.1):
        
        edges = []
        for surface in self.surfaces:
            if isinstance(surface, GriddedSurface):
                return edges.append(surface.mesh)
            elif isinstance(surface, PlanarSurface):
                # Top edge determined from two end points
                edge = []
                for pnt in [surface.top_left, surface.top_right]:
                    edge.append([pnt.longitude, pnt.latitude, pnt.depth])
                edges.append(numpy.array(edge))
            elif isinstance(surface,
                            (ComplexFaultSurface, SimpleFaultSurface)):
                # Rectangular meshes are downsampled to reduce their
                # overall size
                edges.append(downsample_trace(surface.mesh, tol))
            else:
                raise ValueError("Surface %s not recognised" % str(surface))
        return edges
137818
def edges_sparse(self):
        
        sparse = graph.edges_to_coo(self.edges,
                                    count=len(self.vertices))
        return sparse
106856
def to_graph(self):
        
        edges = set()
        for clause, target in self.edges_iter():
            for source, signature in clause:
                edges.add((source, target, signature))

        return Graph.from_tuples(edges)
679933
def _get_connected_subgraphs(vertices, vertices_neighbours):
    
    remaining_vertices = set(vertices)
    subgraphs = []
    while remaining_vertices:
        subgraph = set(_dfs(remaining_vertices.pop(), vertices_neighbours))
        remaining_vertices.difference_update(subgraph)
        subgraphs.append(subgraph)

    return subgraphs
157096
def edges(self, source=None, relation=None, target=None):
        
        edgematch = lambda e: (
            (source is None or source == e.source) and
            (relation is None or relation == e.relation) and
            (target is None or target == e.target)
        )
        variables = self.variables()
        edges = [t for t in self._triples if t.target in variables]
        return list(filter(edgematch, edges))
658439
def get_all_edge_nodes(self):
        """"""
        edge_nodes = set(e for es in self.edges for e in es)
        for edges in self.edges_rel.values():
            rel_nodes = set(e for es in edges for e in es)
            edge_nodes.update(rel_nodes)
        return edge_nodes