Exemple #1
0
  public double getY(int index) {
    if (index < 0 || index >= xy.length) {
      System.exit(0);
    }

    long u = points.getLastUpdateTime();
    if (tableLastUpdated != u) updateStructure(u);

    return xy[index].y;
  }
Exemple #2
0
  public void setX(int index, double x) {
    if (index < 0 || index >= xy.length) {
      System.exit(0);
    }

    long u = points.getLastUpdateTime();
    if (tableLastUpdated != u) updateStructure(u);

    xy[index].x = x;

    if (x > maxX) maxX = x;
    if (x < minX) minX = x;
  }
Exemple #3
0
  public void setY(int index, double y) {
    if (index < 0 || index >= xy.length) {

      System.exit(0);
    }

    long u = points.getLastUpdateTime();
    if (tableLastUpdated != u) updateStructure(u);

    xy[index].y = y;

    if (y > maxY) maxY = y;
    if (y < minY) minY = y;
  }
Exemple #4
0
  public Embedder2D(DistancedPoints p) {
    this.points = p;
    tableLastUpdated = points.getLastUpdateTime();

    savedPoints = new ArrayList<String>();
    for (int i = 0; i < points.getCount(); i++) savedPoints.add(points.getPointId(i));

    xy = new Vector2D[points.getCount()];

    for (int i = 0; i < points.getCount(); i++) xy[i] = new Vector2D(0, 0);

    maxX = 0;
    maxY = 0;
    minX = 0;
    minY = 0;
  }