Examples of IVertex


Examples of prolog.core.IVertex

    IVertex[] vs=LG.vertices;
    int vsL=vs.length; // total vertices: vsL
    // compute total edges: esL
    int esL=0;
    for(int i=0;i<vsL;i++) {
      IVertex F=vs[i];
      IEdge[] es=F.outLinks;
      esL+=es.length;
    }
   
    if(esL==0) return; // no edges - exception
   
    // allocate vertices, edges
    beginGraph(vsL,esL);
   
    // add vertices
    for(int i=0;i<vsL;i++) {
      IVertex F=vs[i];
      MobilePoint P=(MobilePoint)F.data;
      setVertex(i,mp2p(P,2*LG.radius));
    }
   
    // add edges
    int eCount=0;
    for(int i=0;i<vsL;i++) {
      IVertex F=vs[i];
      IEdge[] es=F.outLinks;
      for(int j=0;j<es.length;j++) {
        IEdge E=es[j];
        setEdge(eCount++,i,E.to);  
      }
View Full Code Here

Examples of prolog.core.IVertex

    N.setZ((double)RP.z);
  }

  public void addGraph(Cat RG,boolean add) {
    for(int i=0;i<size();i++) {
      IVertex V=vertices[i];
  
      RankedData RD=(RankedData)RG.rawVertexData(V.key);
      //Object RS=RG.getSelected(V.key);
      Object RS=getIFilter().filterVertex(RD);
      // V = key + data
      Vertex3D GV;

      int shape=setShape(RD,V);
      Color3f color=comp2col(RD.component,RD.hyper);
 
      if(add) {
        if(shape<Shape.maxSimple)
          GV=jworld.addVertex(shape,color,V);
        else {
          Shape dataShape=new Shape(color);
          GV=jworld.addVertex(dataShape.toNode(shape,RS),RS); //$$
        }
      }
      else GV=(Vertex3D)(V.key);
     
      MobilePoint N=new MobilePoint(RS,RD,GV,radius,size());
      V.data=N; // V contains N && N contains V - careful with toString!!!

      initPosition(V,N);
    }
    for(int i=0;i<size();i++) {
      IVertex F=vertices[i];
    
      MobilePoint MFrom=(MobilePoint)(F.data);
      Vertex3D From=MFrom.V;
      
      IEdge[] es=F.outLinks;
      for(int j=0;j<es.length;j++) {
        IEdge E=es[j];
        IVertex T=vertices[E.to];
        MobilePoint MTo=(MobilePoint)(T.data);
        Vertex3D To=MTo.V;
        if(add) E.data=jworld.addEdge(From,To,E.data); //$$
      }
    }
View Full Code Here

Examples of prolog.core.IVertex

    if(Params.stopAll) running=false;
    if(energy>0) oldenergy=energy;
    energy=0;
    for (int i=0;i<size();i++) {
      if(!running) break;
      IVertex V=vertices[i];
      MobilePoint n = getPoint(i);
      vertexStep(i,n);   
      edgeStep(i,n,V.outLinks);
      energy=applyDelta(n,energy);
    }
View Full Code Here

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.model.IVertex

                }
                IOntologyConcept ontologyConcept = (IOntologyConcept) object;
                SimpleVertex simpleVertex = graphModel.getVertexByConcept(ontologyConcept);
                if (simpleVertex != null) {
                    SuperVertex superVertex = simpleVertex.getSuperVertex();
                    IVertex vertex = superVertex == null ? simpleVertex : superVertex;
                    if (hide) {
                        graphModel.removeVertex(vertex);
                    } else {
                        graphModel.addVertex(vertex);
                    }
View Full Code Here

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.model.IVertex

            for (IArc arc : this.graphModel.getArcs()) {
                arc.paintIfNeeded(g);
            }
            List<SimpleVertex> vertices = new LinkedList<SimpleVertex>(this.graphModel.getSimpleVertices());
            for (ListIterator<SimpleVertex> it = vertices.listIterator(vertices.size()); it.hasPrevious();) {
                IVertex v = it.previous();
                v.paintIfNeeded(g, this, this.selectedVertices.contains(v));
            }
            List<SuperVertex> superVertices = new LinkedList<SuperVertex>(this.graphModel.getSuperVertices());
            for (ListIterator<SuperVertex> it = superVertices.listIterator(superVertices.size()); it.hasPrevious();) {
                IVertex v = it.previous();
                v.paintIfNeeded(g, this, this.selectedVertices.contains(v));
            }
            this.currentTool.paint(g);
        }
    }
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.