com.github.rinde.rinsim.geom.Graph.removeConnection()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中com.github.rinde.rinsim.geom.Graph.removeConnection()方法的一些代码示例,展示了Graph.removeConnection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.removeConnection()方法的具体详情如下:
包路径:com.github.rinde.rinsim.geom.Graph
类名称:Graph
方法名:removeConnection

Graph.removeConnection介绍

[英]Removes connection between from and to.
[中]删除fromto之间的连接。

代码示例

代码示例来源:origin: rinde/RinSim

@Override
public void removeConnection(Point from, Point to) {
 delegate.removeConnection(from, to);
}

代码示例来源:origin: com.github.rinde/rinsim-geom

@Override
public void removeConnection(Point from, Point to) {
 delegate.removeConnection(from, to);
}

代码示例来源:origin: com.github.rinde/rinsim-geom

@Override
public void removeConnection(Point from, Point to) {
 final Connection<?> conn = delegate.getConnection(from, to);
 delegate.removeConnection(from, to);
 eventDispatcher
  .dispatchEvent(new GraphEvent(
   EventTypes.REMOVE_CONNECTION, this, conn));
}

代码示例来源:origin: rinde/RinSim

@Override
public void removeConnection(Point from, Point to) {
 final Connection<?> conn = delegate.getConnection(from, to);
 delegate.removeConnection(from, to);
 eventDispatcher
  .dispatchEvent(new GraphEvent(
   EventTypes.REMOVE_CONNECTION, this, conn));
}

代码示例来源:origin: rinde/RinSim

@Test(expected = UnsupportedOperationException.class)
public void unmodRemoveConnection() {
 Graphs.unmodifiableGraph(graph).removeConnection(null, null);
}

代码示例来源:origin: rinde/RinSim

@Test(expected = IllegalArgumentException.class)
public void removeConnectionFail() {
 graph.removeConnection(new Point(0, 0), new Point(1, 0));
}

代码示例来源:origin: rinde/RinSim

assertEquals(g1, g2);
g1.removeConnection(N, E);
assertFalse(g1.equals(graph));
assertFalse(g1.equals(graph));
graph.removeConnection(N, E);
graph.addConnection(N, E, LengthData.create(10));
assertFalse(g1.equals(graph));
assertEquals(graph, g3);
g3.removeConnection(N, E);
g3.addConnection(N, E, LengthData.create(9));
assertFalse(g3.equals(graph));

代码示例来源:origin: rinde/RinSim

@Test
public void isEmtpy() {
 assertTrue(graph.isEmpty());
 graph.addConnection(new Point(0, 0), new Point(1, 0));
 assertFalse(graph.isEmpty());
 graph.removeConnection(new Point(0, 0), new Point(1, 0));
 assertTrue(graph.isEmpty());
}

相关文章