[Date Prev] [Date Next] [Thread Prev] [Thread Next] Indexes: Main | Date | Thread | Author

Fwd: [ba-ohs-talk] Touchgraphed backlink DB


Peter,
With pleasure.  Do you ever sleep?
A center node is good :-)
Jack    (01)

>Reply-To: "Peter  Jones" <ppj@concept67.fsnet.co.uk>
>From: "Peter  Jones" <ppj@concept67.fsnet.co.uk>
>
>Hi Jack,
>
>Could you forward this to the ba-ohs-talk list please? My main mail ISP
>seems to have croaked (not-so-Freeserve.co.uk).
>
>Thanks,
>
>I've added a center node to stop the graph flying apart. New code:
>
>public void getBDBGraph()
>  {
>     String line = "";
>     Node bootroot = new Node("Bootstrap Mail Lists");
>     bootroot.setColor(new Color(233,0,0));
>     try
>     {
>         BufferedReader bdbReader = new BufferedReader(new
>FileReader("C:\\Temp\\backlinks.txt"));
>         while(line != null)
>         {
>            line = bdbReader.readLine();
>            if(line == null) {continue;}
>               //System.out.println(line);   //4 dbug
>            int midspace = line.indexOf(9); //hunts TAB chars
>            if(midspace != -1)
>            {
>               //System.out.println("midspace: " + midspace);  //4 dbug
>               int linelngth= line.length();
>               String firststr = line.substring(0, midspace-1);
>               String secondstr= line.substring(midspace+1, linelngth);
>                  Node r = tgPanel.getGES().findNode(firststr);
>                  if(r == null)
>                  {
>                     r = new Node(firststr);
>                     tgPanel.addNode(r);
>                     tgPanel.addEdge(bootroot, r, 4000);
>                  }
>
>                  Node n = tgPanel.getGES().findNode(secondstr);
>                  if(n == null)
>                  {
>                     n = new Node(secondstr);
>                     tgPanel.addNode(n);
>                  }
>
>                  if(tgPanel.findEdge(r, n)==null)
>                  {
>                     tgPanel.addEdge(r, n, 4000);
>                  }
>
>                }
>             }
>             tgPanel.setLocale(bootroot,2);
>          }
>       catch(IOException exc)
>       {
>          System.out.println("getBDBGraph: " + exc);
>       }
>
>    }
>
>That's about all I can do without altering Alex' class code elsewhere, I
>think.
>
>One thing you might notice about the graph is that the in views where there
>is a node with a large number of connections (around 70), the damping takes
>a long time to kick in for that node. It bounces around quite dramatically.
>Perhaps a good thing would be to add a way to increase the damping for a
>node depending on the number of edges connected to it.
>
>--
>Cheers,
>Peter
>    (02)