public void createEdgesConnecting(UniqueVertexGraph gGraph,String sStartNode,List lOtherNodes,HashMap hAppearenceHistogram){
  double dStartWeight=0;
  double dIncreaseWeight=0;
  if (lOtherNodes != null)   if (lOtherNodes.size() == 0) {
    VertexImpl v=new VertexImpl();
    v.setLabel(sStartNode);
    try {
      gGraph.add(v);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return;
  }
  java.util.Iterator iIter=lOtherNodes.iterator();
  Vertex vOldA=gGraph.locateVertex(new VertexImpl(sStartNode));
  Vertex vA;
  if (vOldA != null)   vA=vOldA;
 else {
    vA=new VertexImpl();
    vA.setLabel(sStartNode);
    try {
      gGraph.add(vA);
    }
 catch (    Exception e) {
    }
  }
  EdgeCachedLocator ecl;
  if (eclLocator == null)   ecl=new EdgeCachedLocator(100);
 else   ecl=eclLocator;
  while (iIter.hasNext()) {
    VertexImpl vB=new VertexImpl();
    vB.setLabel((String)iIter.next());
    double dOldWeight=0;
    double dNewWeight=0;
    dStartWeight=1.0;
    dIncreaseWeight=dStartWeight;
    WeightedEdge weCorrectEdge=(WeightedEdge)ecl.locateDirectedEdgeInGraph(gGraph,vA,vB);
    if (weCorrectEdge == null)     dNewWeight=dStartWeight;
 else {
      dOldWeight=weCorrectEdge.getWeight();
      dNewWeight=dOldWeight + dIncreaseWeight;
    }
    try {
      if (weCorrectEdge == null) {
        ecl.addedEdge(gGraph.addEdge(vA,vB,dNewWeight));
      }
 else       weCorrectEdge.setWeight(dNewWeight);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

public void createEdgesConnecting ( UniqueVertexGraph gGraph , String sStartNode , List lOtherNodes , HashMap hAppearenceHistogram ) { double dStartWeight = 0 ; double dIncreaseWeight = 0 ; if ( lOtherNodes != null ) if ( lOtherNodes . size ( ) == 0 ) { VertexImpl v = new VertexImpl ( ) ; v . setLabel ( sStartNode ) ; try { gGraph . add ( v ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return ; } java . util . Iterator iIter = lOtherNodes . iterator ( ) ; Vertex vOldA = gGraph . locateVertex ( new VertexImpl ( sStartNode ) ) ; Vertex vA ; if ( vOldA != null ) vA = vOldA ; else { vA = new VertexImpl ( ) ; vA . setLabel ( sStartNode ) ; try { gGraph . add ( vA ) ; } catch ( Exception e ) { } } EdgeCachedLocator ecl ; if ( eclLocator == null ) ecl = new EdgeCachedLocator ( 100 ) ; else ecl = eclLocator ; while ( iIter . hasNext ( ) ) { VertexImpl vB = new VertexImpl ( ) ; vB . setLabel ( ( String ) iIter . next ( ) ) ; double dOldWeight = 0 ; double dNewWeight = 0 ; dStartWeight = 1.0 ; dIncreaseWeight = dStartWeight ; WeightedEdge weCorrectEdge = ( WeightedEdge ) ecl . locateDirectedEdgeInGraph ( gGraph , vA , vB ) ; if ( weCorrectEdge == null ) dNewWeight = dStartWeight ; else { dOldWeight = weCorrectEdge . getWeight ( ) ; dNewWeight = dOldWeight + dIncreaseWeight ; } try { if ( weCorrectEdge == null ) { ecl . addedEdge ( gGraph . addEdge ( vA , vB , dNewWeight ) ) ; } else weCorrectEdge . setWeight ( dNewWeight ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } }
creates an edge in [ ggraph ] connecting [ sbasenode ] to each node in the [ lothernodes ] list of nodes . if an edge exists , its weight is increased by [ iincreaseweight ] , else its weight is set to [ istartweight ]
