Package net.wigis.graph.dnv.layout.helpers

Examples of net.wigis.graph.dnv.layout.helpers.Grid


      // + level + " Number of Nodes: " + graph.getGraphSize( level ) );

      Vector2D difference = new Vector2D();
      float length;

      Grid grid = new Grid( k * 2, graph, level );
      List<DNVNode> potentialNodes;

      // float maxYAtDistance1 = Float.NEGATIVE_INFINITY;
      // float minYAtDistance1 = Float.POSITIVE_INFINITY;
      // float tempY;
      // float distance;
      // repulsive forces
      for( DNVNode v : graph.getNodes( level ) )
      {
        v.setForce( 0, 0 );
        potentialNodes = grid.getPotentialNodes( v );
        for( DNVNode u : potentialNodes )
        {
          if( u != v )
          {
            difference.set( v.getPosition() );
View Full Code Here


    // level + " Number of Nodes: " + graph.getGraphSize( level ) );

    Vector2D difference = new Vector2D();
    float length;

    Grid grid = new Grid( k * 2, nodes );
    List<DNVNode> potentialNodes;

    // repulsive forces
    for( DNVNode v : nodes )
    {
      v.setForce( 0, 0 );
      potentialNodes = grid.getPotentialNodes( v );
      for( DNVNode u : potentialNodes )
      {
        if( u != v )
        {
          difference.set( v.getPosition() );
View Full Code Here

    }
  }

  private synchronized void avoidLabels( Collection<DNVNode> nodes, Collection<DNVNode> allNodes )
  {
    Grid grid = new Grid( 150, allNodes );
   
    List<DNVNode> nodesList = new ArrayList<DNVNode>( nodes );
   
    for( DNVNode n1 : nodesList )
    {
//      System.out.println( nodesList.size() + " vs. " + grid.getPotentialNodes( n1 ).size() );
      for( DNVNode n2 : grid.getPotentialNodes( n1 ) )
      {
        if( n1 != n2 )
        {
          double dx = 0;
          double dy = 0;
View Full Code Here

    // level + " Number of Nodes: " + graph.getGraphSize( level ) );

    Vector2D difference = new Vector2D();
    float length;

    Grid grid = new Grid( k * 2, nodes );
    List<DNVNode> potentialNodes;

    // repulsive forces
    for( DNVNode v : nodes )
    {
      v.setForce( 0, 0 );
      potentialNodes = grid.getPotentialNodes( v );
      for( DNVNode u : potentialNodes )
      {
        if( u != v )
        {
          difference.set( v.getPosition() );
View Full Code Here

TOP

Related Classes of net.wigis.graph.dnv.layout.helpers.Grid

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.