/** * Removes the given vertex and its edges from the graph. * * @param vertex the vertex to remove * @return the new graph containing the existing vertices and edges without * the removed vertex and its edges */ public Graph<K, VV, EV> removeVertex(Vertex<K, VV> vertex) { List<Vertex<K, VV>> vertexToBeRemoved = new ArrayList<>(); vertexToBeRemoved.add(vertex); return removeVertices(vertexToBeRemoved); } /**
/** * Removes the given list of vertices and its edges from the graph. * * @param verticesToBeRemoved the list of vertices to be removed * @return the resulted graph containing the initial vertices and edges minus the vertices * and edges removed. */ public Graph<K, VV, EV> removeVertices(List<Vertex<K, VV>> verticesToBeRemoved) { return removeVertices(this.context.fromCollection(verticesToBeRemoved)); }
/** * Performs Difference on the vertex and edge sets of the input graphs * removes common vertices and edges. If a source/target vertex is removed, * its corresponding edge will also be removed * * @param graph the graph to perform difference with * @return a new graph where the common vertices and edges have been removed */ public Graph<K, VV, EV> difference(Graph<K, VV, EV> graph) { DataSet<Vertex<K, VV>> removeVerticesData = graph.getVertices(); return this.removeVertices(removeVerticesData); }
/** * Removes the given vertex and its edges from the graph. * * @param vertex the vertex to remove * @return the new graph containing the existing vertices and edges without * the removed vertex and its edges */ public Graph<K, VV, EV> removeVertex(Vertex<K, VV> vertex) { List<Vertex<K, VV>> vertexToBeRemoved = new ArrayList<>(); vertexToBeRemoved.add(vertex); return removeVertices(vertexToBeRemoved); } /**
/** * Removes the given vertex and its edges from the graph. * * @param vertex the vertex to remove * @return the new graph containing the existing vertices and edges without * the removed vertex and its edges */ public Graph<K, VV, EV> removeVertex(Vertex<K, VV> vertex) { List<Vertex<K, VV>> vertexToBeRemoved = new ArrayList<>(); vertexToBeRemoved.add(vertex); return removeVertices(vertexToBeRemoved); } /**
/** * Removes the given vertex and its edges from the graph. * * @param vertex the vertex to remove * @return the new graph containing the existing vertices and edges without * the removed vertex and its edges */ public Graph<K, VV, EV> removeVertex(Vertex<K, VV> vertex) { List<Vertex<K, VV>> vertexToBeRemoved = new ArrayList<>(); vertexToBeRemoved.add(vertex); return removeVertices(vertexToBeRemoved); } /**
/** * Performs Difference on the vertex and edge sets of the input graphs * removes common vertices and edges. If a source/target vertex is removed, * its corresponding edge will also be removed * * @param graph the graph to perform difference with * @return a new graph where the common vertices and edges have been removed */ public Graph<K, VV, EV> difference(Graph<K, VV, EV> graph) { DataSet<Vertex<K, VV>> removeVerticesData = graph.getVertices(); return this.removeVertices(removeVerticesData); }
/** * Performs Difference on the vertex and edge sets of the input graphs * removes common vertices and edges. If a source/target vertex is removed, * its corresponding edge will also be removed * * @param graph the graph to perform difference with * @return a new graph where the common vertices and edges have been removed */ public Graph<K, VV, EV> difference(Graph<K, VV, EV> graph) { DataSet<Vertex<K, VV>> removeVerticesData = graph.getVertices(); return this.removeVertices(removeVerticesData); }
/** * Removes the given list of vertices and its edges from the graph. * * @param verticesToBeRemoved the list of vertices to be removed * @return the resulted graph containing the initial vertices and edges minus the vertices * and edges removed. */ public Graph<K, VV, EV> removeVertices(List<Vertex<K, VV>> verticesToBeRemoved) { return removeVertices(this.context.fromCollection(verticesToBeRemoved)); }
/** * Removes the given list of vertices and its edges from the graph. * * @param verticesToBeRemoved the list of vertices to be removed * @return the resulted graph containing the initial vertices and edges minus the vertices * and edges removed. */ public Graph<K, VV, EV> removeVertices(List<Vertex<K, VV>> verticesToBeRemoved) { return removeVertices(this.context.fromCollection(verticesToBeRemoved)); }
/** * Performs Difference on the vertex and edge sets of the input graphs * removes common vertices and edges. If a source/target vertex is removed, * its corresponding edge will also be removed * * @param graph the graph to perform difference with * @return a new graph where the common vertices and edges have been removed */ public Graph<K, VV, EV> difference(Graph<K, VV, EV> graph) { DataSet<Vertex<K, VV>> removeVerticesData = graph.getVertices(); return this.removeVertices(removeVerticesData); }
/** * Removes the given list of vertices and its edges from the graph. * * @param verticesToBeRemoved the list of vertices to be removed * @return the resulted graph containing the initial vertices and edges minus the vertices * and edges removed. */ public Graph<K, VV, EV> removeVertices(List<Vertex<K, VV>> verticesToBeRemoved) { return removeVertices(this.context.fromCollection(verticesToBeRemoved)); }