Package rinde.sim.core.graph

Examples of rinde.sim.core.graph.Point


  }

  @SuppressWarnings("null")
  @Test(expected = IllegalArgumentException.class)
  public void getShortestPathToFail3() {
    model.getShortestPathTo((RoadUser) null, new Point(0, 0));
  }
View Full Code Here


  }

  @SuppressWarnings("null")
  @Test(expected = IllegalArgumentException.class)
  public void getShortestPathToFail4() {
    model.getShortestPathTo((Point) null, new Point(0, 0));
  }
View Full Code Here

  }

  @SuppressWarnings("null")
  @Test(expected = IllegalArgumentException.class)
  public void getShortestPathToFail5() {
    model.getShortestPathTo(new Point(1, 2), null);
  }
View Full Code Here

    final Loc l = GraphRoadModel.newLoc(null);
  }

  @Test(expected = IllegalArgumentException.class)
  public void checkLocationFail1() {
    final Loc l = GraphRoadModel.newLoc(new Point(-10, -10));
    model.checkLocation(l);
  }
View Full Code Here

  }

  @Test(expected = IllegalArgumentException.class)
  public void checkLocationFail2() {
    final Loc l = GraphRoadModel.newLoc(new Connection<ConnectionData>(
        new Point(-10, -10), new Point(100, 0), null), 1);
    model.checkLocation(l);
  }
View Full Code Here

    assertEquals(10, GraphRoadModel.getConnectionLength(conn), EPSILON);
  }

  @Test(expected = IllegalArgumentException.class)
  public void getMaxSpeedFail4() {
    model.getMaxSpeed(new TestRoadUser(), new Point(1, 2), new Point(2, 1));
  }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  @Test
  public void getMaxSpeed() {
    final Point A = new Point(0, 0);
    final Point B = new Point(10, 0);

    final Graph<LengthData> g = new MultimapGraph<LengthData>();
    final GraphRoadModel rm = new GraphRoadModel(g, SI.KILOMETER,
        NonSI.KILOMETERS_PER_HOUR);
    g.addConnection(A, B, new LengthData(3));
View Full Code Here

  }

  @SuppressWarnings("null")
  @Test(expected = IllegalArgumentException.class)
  public void computeConnectionLengthFail2() {
    model.computeConnectionLength(new Point(1, 2), null);
  }
View Full Code Here

    model.computeConnectionLength(new Point(1, 2), null);
  }

  @Test(expected = IllegalArgumentException.class)
  public void computeConnectionLengthFail3() {
    model.computeConnectionLength(new Point(1, 2), new Point(2, 1));
  }
View Full Code Here

  @SuppressWarnings("unchecked")
  @Test
  public void computeConnectionLength() {
    assertEquals(0,
        model.computeConnectionLength(new Point(1, 2), new Point(1, 2)),
        EPSILON);
    ((Graph<MultiAttributeData>) graph).addConnection(SE, SW,
        new MultiAttributeData(5, 5d));

    final TestRoadUser agent1 = new TestRoadUser();
View Full Code Here

TOP

Related Classes of rinde.sim.core.graph.Point

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.