Package ch.akuhn.org.ggobi.plugins.ggvis

Examples of ch.akuhn.org.ggobi.plugins.ggvis.Points


 
  @Test
  public void testIsomapSizeZero() {
    Isomap isomap = new NullIsomap(0);
    isomap.run();
    Points points = isomap.getPoints();
    assertEquals(0, points.size());
  }
View Full Code Here


 
  @Test
  public void testIsomapSizeOne() {
    Isomap isomap = new NullIsomap(1);
    isomap.run();
    Points points = isomap.getPoints();
    assertEquals(1, points.size());
    assertEquals(0, points.x[0], Double.MIN_VALUE);
    assertEquals(0, points.y[0], Double.MIN_VALUE);
  }
View Full Code Here

 
  @Test
  public void shouldWorkWith1Element() {
    Isomap isomap = new I(1, 3);
    isomap.run();
    Points points = isomap.getPoints();
    assertEquals(1, points.x.length);
  }
View Full Code Here

  @Test
  public void shouldWorkWithLessElementsThanNeighbors() {
    int k = 6, less = 1;
    Isomap isomap = new I(k-less,k);
    isomap.run();
    Points points = isomap.getPoints();
    assertEquals(k-less, points.x.length);
  }
View Full Code Here

  @Test
  public void shouldWorkWithMoreThanFewElements() {
    int few = 10, more = 2;
    Isomap isomap = new I(few+more, 3);
    isomap.run();
    Points points = isomap.getPoints();
    assertEquals(few+more, points.x.length);
  }
View Full Code Here

    private MultidimensionalScalingListener fListener;
    private PrintStream fOut;
    private double fThreshold = 1e-6;

    public MultidimensionalScaling initialConfiguration(double[] x, double[] y) {
        fInitialConfiguration = new Points(x, y);
        return this;
    }
View Full Code Here

            protected double dist(int i, int j) {
                return corr.get(i, j);
            }
        };
        isomap.run();
        Points points = isomap.getPoints();
        x = points.x;
        y = points.y;       
       
//        persistPoints();
//        loadPoints();
View Full Code Here

     */
    public void constructDeeDimensionalEmbedding() {
        this.applyTauOperator();
        Eigenvalues eigen = Eigenvalues.of(graph).largest(2);
        eigen.run();
        points = new Points(n);
        for (int i = 0; i < n; i++) {
            points.x[i] = Math.sqrt(eigen.value[0]) * eigen.vector[0].get(i);
            points.y[i] = Math.sqrt(eigen.value[1]) * eigen.vector[1].get(i);
        }
    }
View Full Code Here

        this.constructNeighborhoodGraph();
        this.computeShortestPathWithDijkstra();
        this.constructDeeDimensionalEmbedding();
      }
      else {
        points = new Points(n);
      }
      graph = null;
    }
View Full Code Here

TOP

Related Classes of ch.akuhn.org.ggobi.plugins.ggvis.Points

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.