| | |
| | | } |
| | | |
| | | public static List<Double> parseCdaNode(String cdaNodeStr) { |
| | | List<Double> waveNodeList = new ArrayList<>(); |
| | | if (Cools.isEmpty(cdaNodeStr)) { |
| | | return waveNodeList; |
| | | return new ArrayList<>(); |
| | | } |
| | | return JSON.parseArray(cdaNodeStr, Double.class); |
| | | } |
| | |
| | | return messageBody; |
| | | } |
| | | try{ |
| | | Thread.sleep(10); |
| | | Thread.sleep(15); |
| | | }catch(Exception ex){ |
| | | ex.printStackTrace(); |
| | | } |
| | |
| | | @Component("mapService") |
| | | public class MapService { |
| | | |
| | | private final static int[][] DIRECTIONS = {{0,1},{0,-1},{-1,0},{1,0}}; |
| | | |
| | | @Value("${floyd.enable}") |
| | | private Boolean floydEnable; |
| | | @Autowired |
| | |
| | | |
| | | public static final int WEIGHT_CALC_FACTOR = 1; |
| | | |
| | | // right left up down |
| | | private final static int[][] DIRECTIONS = {{0,1},{0,-1},{-1,0},{1,0}}; |
| | | |
| | | @Autowired |
| | | private MapDataDispatcher mapDataDispatcher; |
| | | @Autowired |
| | |
| | | // System.out.println("getNeighborNodes spend time: " + getNeighborNodesTime +", count: " + getNeighborNodesCount); |
| | | return null; |
| | | } |
| | | |
| | | // right left up down |
| | | private final static int[][] DIRECTIONS = {{0,1},{0,-1},{-1,0},{1,0}}; |
| | | |
| | | // 获取四周节点 |
| | | private List<AStarNavigateNode> getNeighborNodes(AStarNavigateNode currentNode, int[][] mapMatrix, Set<AStarNavigateNode> existNodes) { |
| | |
| | | this.responseThread = new Thread(() -> { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | Thread.sleep(10); |
| | | Thread.sleep(15); |
| | | |
| | | if (configService.getVal("fakeSign", Boolean.class)) { |
| | | this.responseTheRequest(); |