Package org.gephi.filters.spi

Examples of org.gephi.filters.spi.NodeFilter.evaluate()


                    }
                }
                List<Node> nodesToRemove = new ArrayList<Node>();
                for (Node n : hgraph.getNodes()) {
                    for (NodeFilter nf : nodeFilters) {
                        if (!nf.evaluate(hgraph, n)) {
                            nodesToRemove.add(n);
                            break;
                        }
                    }
                }
View Full Code Here


                    Node source = e.getSource().getNodeData().getNode(hgraphView.getViewId());
                    Node target = e.getTarget().getNodeData().getNode(hgraphView.getViewId());
                    boolean remove = false;
                    switch (option) {
                        case SOURCE:
                            remove = !filter.evaluate(hgraph, source);
                            break;
                        case TARGET:
                            remove = !filter.evaluate(hgraph, target);
                            break;
                        case BOTH:
View Full Code Here

                    switch (option) {
                        case SOURCE:
                            remove = !filter.evaluate(hgraph, source);
                            break;
                        case TARGET:
                            remove = !filter.evaluate(hgraph, target);
                            break;
                        case BOTH:
                            remove = !filter.evaluate(hgraph, source) || !filter.evaluate(hgraph, target);
                            break;
                        case ANY:
View Full Code Here

                            break;
                        case TARGET:
                            remove = !filter.evaluate(hgraph, target);
                            break;
                        case BOTH:
                            remove = !filter.evaluate(hgraph, source) || !filter.evaluate(hgraph, target);
                            break;
                        case ANY:
                            remove = !filter.evaluate(hgraph, source) && !filter.evaluate(hgraph, target);
                            break;
                    }
View Full Code Here

                            break;
                        case TARGET:
                            remove = !filter.evaluate(hgraph, target);
                            break;
                        case BOTH:
                            remove = !filter.evaluate(hgraph, source) || !filter.evaluate(hgraph, target);
                            break;
                        case ANY:
                            remove = !filter.evaluate(hgraph, source) && !filter.evaluate(hgraph, target);
                            break;
                    }
View Full Code Here

                            break;
                        case BOTH:
                            remove = !filter.evaluate(hgraph, source) || !filter.evaluate(hgraph, target);
                            break;
                        case ANY:
                            remove = !filter.evaluate(hgraph, source) && !filter.evaluate(hgraph, target);
                            break;
                    }
                    if (remove) {
                        hgraph.removeEdge(e);
                    }
View Full Code Here

                            break;
                        case BOTH:
                            remove = !filter.evaluate(hgraph, source) || !filter.evaluate(hgraph, target);
                            break;
                        case ANY:
                            remove = !filter.evaluate(hgraph, source) && !filter.evaluate(hgraph, target);
                            break;
                    }
                    if (remove) {
                        hgraph.removeEdge(e);
                    }
View Full Code Here

                }
                List<Node> nodesToRemove = new ArrayList<Node>();
                for (Node n : hgraph.getNodes()) {
                    boolean remove = true;
                    for (NodeFilter nf : nodeFilters) {
                        if (nf.evaluate(hgraph, n)) {
                            remove = false;
                        }
                    }
                    if (remove) {
                        nodesToRemove.add(n);
View Full Code Here

            HierarchicalGraph hgraph = (HierarchicalGraph) graph;
            Filter filter = filters[0];
            if (filter instanceof NodeFilter && ((NodeFilter) filter).init(hgraph)) {
                NodeFilter nodeFilter = (NodeFilter) filter;
                for (Node n : hgraph.getNodes().toArray()) {
                    if (nodeFilter.evaluate(hgraph, n)) {
                        hgraph.removeNode(n);
                    }
                }
                nodeFilter.finish();
            }
View Full Code Here

                }
                List<Node> nodesToRemove = new ArrayList<Node>();
                for (Node n : hgraph.getNodes()) {
                    boolean remove = true;
                    for (NodeFilter nf : nodeFilters) {
                        if (nf.evaluate(hgraph, n)) {
                            remove = false;
                        }
                    }
                    if (remove) {
                        nodesToRemove.add(n);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.