Package prolog.core

Examples of prolog.core.Cat


    int v=10;
    int e0=5;
    int e=10;
    int g=0;
    int m=15;
    Cat RG=
      Params.randomRanked(seed,v0,v,e0,e,g,m);
    return RG;
  }
View Full Code Here


    int v0=50;
    int v=30;
    int e0=2;
    int e=4;
   
    Cat RG=Params.randomCat(seed,v0,v,e0,e);
    ObjectStack S=new ObjectStack();
    do
      RG.runGraphRanker();RG.markComponents();RG.rankSort();
      int cycles=RG.checkCycle();
     
      S.push(RG);

      Prolog3D.pp("\nas saved:"+RG);
      Prolog3D.pp("cycles="+cycles+",size="+RG.size());
   

      Prolog3D.drawGraph(RG,time,r,w,h);
     
      RG=(Cat)RG.trim(false,Math.round(RG.size()/2));

    
    }
    while(RG.size()>0);
    //Prolog3D.pp("S="+S);
    return S;
  }
View Full Code Here

    int v0=20;
    int v=10;
    int e0=4;
    int e=6;
   
    Cat RG=Params.randomCat(seed,v0,v,e0,e);

    Prolog3D.pp("\nas saved:"+RG);
    //Prolog3D.pp("cycles="+cycles+",size="+RG.size());
   
    Prolog3D M=new Prolog3D("TreeTest");
View Full Code Here

  }

  public static void dhyp() {
    Params.bgfile="";
    Params.bgColor=new Color3f(0,0,0);
    Cat G=new Cat();
  
    G.addHyperArrow("ABC->DE",new Object[]{"A","B","C"},new Object[]{"D","E"});
    G.addHyperArrow("BD->EFG",new Object[]{"B","D"},new Object[]{"E","F","G"});
    G.addHyperArrow("CF->B",new Object[]{"C","F"},new Object[]{"B"});
    G.addHyperArrow("BG->DF",new Object[]{"B","G"},new Object[]{"D","F"});
    G.addHyperArrow("FG->ABCD",new Object[]{"F","G"},new Object[]{"A","B","C","D"});
    //G.dualize();
    Prolog3D.pp(Cat.showInfo(G));
    
    int r=400;
    int w=600;
View Full Code Here

  }
 
   public static void hyp0() {
    Params.bgfile="";
    Params.bgColor=new Color3f(0,0,0);
    Cat G=new Cat();
  
    G.addHyperEdge("ABC",new Object[]{"A","B","C"});
    G.addHyperEdge("BD",new Object[]{"B","D"});
    G.addHyperEdge("CD",new Object[]{"C","D"});
    G.addHyperEdge("BCD",new Object[]{"B","C","D"});
   
    //G.dualize();
    Prolog3D.pp(Cat.showInfo(G));
    
    int r=400;
View Full Code Here

  }
 
  public static void hyp() {
    Params.bgfile="";
    Params.bgColor=new Color3f(0,0,0);
    Cat G=new Cat();
  
    G.addHyperEdge("AB",new Object[]{"A","B"});
    G.addHyperEdge("BC",new Object[]{"B","C"});
    G.addHyperEdge("CA",new Object[]{"C","A"});
   
    //G.dualize();
    Prolog3D.pp(Cat.showInfo(G));
    
    int r=400;
View Full Code Here

  }
 
  /**   Tests drawing an attributed graph/category
   */
  public static void ctest() {
    Cat C=new Cat();
    C.setProp("one","p","1");
    C.setProp("two","p","2");
    C.setProp("two","pp","22");
    float k=1.0f;
    C.setMorphism("one","two","dir","12");
    C.setMorphism("two","one","dir","21");
    C.setMorphism("one","two","color","blue");
    Prolog3D.pp(Cat.showInfo(C));
    Prolog3D.drawGraph(C,10,400,400,400);
  }
View Full Code Here

  /**
     Runs a layout engine on an attributed graph/category
     in a world of a given 3D radius
   */
  public void runLayout(int radius) {
    Cat C=world.getAgents();
    //Prolog3D.pp(Cat.showInfo(C));
    //Prolog3D.pp(C.toString());
    LayoutEngine L=new SmartLayout(this,C,radius,false);
    L.run();
  }
View Full Code Here

  private Agent3D viewHolder;
 
  public World() {
    super();
    viewHolder=null;
    agents=new Cat();
    objects=new Cat();
    makeUniverse();
    this.scene = createSceneGraph();
  }
View Full Code Here

    }
    return G.toString();
  }

  public static Cat collectChildren(Node N) {
    Cat cat=new Cat();
    Object O=N.getUserData();
    HashMap H;
    if(O instanceof HashMap) H=(HashMap)O;
    else H=null;
    if(null==H) H=new HashMap();
View Full Code Here

TOP

Related Classes of prolog.core.Cat

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.