Package com.evelopers.unimod.glayout.graph

Examples of com.evelopers.unimod.glayout.graph.SimpleVertex


        }

        public int compare(Object o1, Object o2) {
            SimpleEdge e1   = (SimpleEdge) o1;
            SimpleEdge e2   = (SimpleEdge) o2;
            SimpleVertex v1 = e1.getAnother(v);
            SimpleVertex v2 = e2.getAnother(v);
            double x1       = v1.getVertexext()
                                .getLeftTop()
                                .getX();
            double x2 = v2.getVertexext()
                          .getLeftTop()
                          .getX();
            Double dx1 = new Double(x1);
            Double dx2 = new Double(x2);
View Full Code Here


        }

        public int compare(Object o1, Object o2) {
            SimpleEdge e1   = (SimpleEdge) o1;
            SimpleEdge e2   = (SimpleEdge) o2;
            SimpleVertex v1 = e1.getAnother(v);
            SimpleVertex v2 = e2.getAnother(v);
            double x1       =
                Math.abs(v1.getVertexext().getLeftTop().getX()
                         - v.getVertexext().getLeftTop().getX());
            double x2 =
                Math.abs(v2.getVertexext().getLeftTop().getX()
                         - v.getVertexext().getLeftTop().getX());
            Double dx1 = new Double(x1);
            Double dx2 = new Double(x2);

            return dx1.compareTo(dx2);
View Full Code Here

     * @param f face to check
     * @return result
     */
    public boolean isCycle(Face f) {
        Chain ac        = new Chain(f.getGraph());
        SimpleVertex sv = (SimpleVertex) f.getVertices()
                                          .get(0);
        ac              = GraphHelper.getInstance()
                                     .dfsChainSearchOri(f, ac, sv, sv);

        // removing unneeded association
View Full Code Here

        double maxy     = Double.MIN_VALUE;
        ListIterator li = sg.getVertices()
                            .listIterator();

        while (li.hasNext()) {
            SimpleVertex element = (SimpleVertex) li.next();

            if (element.getVisY() > maxy) {
                maxy = element.getVisY();
            }

            if (element.getVisXR() > maxx) {
                maxx = element.getVisXR();
            }

            if (element.getVisXL() > maxx) {
                maxx = element.getVisXL();
            }
        }

        maxx += 2;
        maxy += 2;
View Full Code Here

                   .listIterator();
        }

        while (li.hasNext()) {
            SimpleEdge element = (SimpleEdge) li.next();
            SimpleVertex svc   = element.getAnother(sv);

            if ((sg.getVertices()
                       .indexOf(sv) != -1) && (sg.getVertices()
                                                     .indexOf(svc) != -1)
                    && (sg.getEdges()
                              .indexOf(element) != -1) && (svc.getProperty(obj) == null)) {
                dfsFill(sg, svc, obj, prop, hv);
            }
        }
    }
View Full Code Here

        while (li.hasNext()) {
            SimpleEdge element = (SimpleEdge) li.next();

            if (sg.getEdges()
                      .indexOf(element) != -1) {
                SimpleVertex svc = element.getAnother(current);

                if ((svc == target) && (ac.getEdges()
                                              .indexOf(element) == -1)) {
                    ac.addEdge(element);
                    ac.addVertex(svc);

                    return ac;
                }

                if (svc.getProperty(this) == null) {
                    Chain acc = (Chain) ac.instanceCopy();
                    acc.addEdge(element);
                    acc.addVertex(svc);

                    Chain res = dfsChainSearch(sg, acc, svc, target, ori);
View Full Code Here

            List zeroinc    = new ArrayList();
            ListIterator li = temp.getVertices()
                                  .listIterator();

            while (li.hasNext()) {
                SimpleVertex vertex = (SimpleVertex) li.next();

                if (vertex.getEdgesRelativeIncoming(temp)
                              .size() == 0) {
                    zeroinc.add(vertex);
                }
            }
View Full Code Here

    private void setForList(List l, double topnum) {
        ListIterator li = l.listIterator();

        while (li.hasNext()) {
            SimpleVertex vertex = (SimpleVertex) li.next();
            vertex.setTopnum(topnum);
        }
    }
View Full Code Here

    private void removeForList(List l, SimpleGraph temp) {
        ListIterator li = l.listIterator();

        while (li.hasNext()) {
            SimpleVertex vertex = (SimpleVertex) li.next();
            temp.removeVertex(vertex);
            temp.removeEdges(vertex.getEdgesRelativeOutgoing(temp));
        }
    }
View Full Code Here

        SimpleGraph sg    = new SimpleGraph();
        SimpleVertex[] sv = new SimpleVertex[vsize];
        SimpleEdge[] se   = new SimpleEdge[esize];

        for (int i = 0; i < sv.length; i++) {
            sv[i] = new SimpleVertex();

            if (vnums != null) {
                sv[i].setOrthX(vnums[i][0]);
                sv[i].setOrthY(vnums[i][1]);
            }
View Full Code Here

TOP

Related Classes of com.evelopers.unimod.glayout.graph.SimpleVertex

Copyright © 2018 www.massapicom. 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.