Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private short pos[][] = new short[20][];
- private short dst[][] = new short[20][];
- pos[PIE] = new short[] { VDA, LOM, E_R, LIG };
- dst[PIE] = new short[] { 119, 149, 332, 172 };
- pos[VDA] = new short[] { PIE };
- dst[VDA] = new short[] { 119 };
- pos[LOM] = new short[] { TRE, VEN, E_R, PIE };
- dst[LOM] = new short[] { 225, 270, 216, 149 };
- pos[TRE] = new short[] { VEN, LOM };
- dst[TRE] = new short[] { 215, 225 };
- pos[VEN] = new short[] { FRI, E_R, LOM, TRE };
- dst[VEN] = new short[] { 158, 153, 273, 215 };
- pos[FRI] = new short[] { VEN };
- dst[FRI] = new short[] { 158 };
- pos[LIG] = new short[] { PIE, E_R, TOS };
- dst[LIG] = new short[] { 145, 293, 230 };
- pos[E_R] = new short[] { MAR, TOS, LIG, PIE, LOM, VEN };
- dst[E_R] = new short[] { 227, 106, 293, 332, 216, 153 };
- pos[TOS] = new short[] { E_R, MAR, UMB, LAZ, LIG };
- dst[TOS] = new short[] { 106, 336, 156, 279, 230 };
- pos[UMB] = new short[] { MAR, LAZ, TOS };
- dst[UMB] = new short[] { 136, 173, 156 };
- pos[MAR] = new short[] { ABR, LAZ, UMB, TOS, E_R };
- dst[MAR] = new short[] { 194, 306, 136, 336, 227 };
- pos[LAZ] = new short[] { ABR, MOL, CAM, TOS, UMB, MAR };
- dst[LAZ] = new short[] { 121, 233, 229, 279, 173, 306 };
- pos[ABR] = new short[] { MOL, LAZ, MAR };
- dst[ABR] = new short[] { 192, 121, 194 };
- pos[MOL] = new short[] { PUG, CAM, LAZ, ABR };
- dst[MOL] = new short[] { 221, 160, 233, 192 };
- pos[CAM] = new short[] { PUG, BAS, LAZ, MOL };
- dst[CAM] = new short[] { 263, 157, 229, 160};
- pos[PUG] = new short[] { BAS, CAM, MOL };
- dst[PUG] = new short[] { 133, 263, 221 };
- pos[CAL] = new short[] { BAS, SIC };
- dst[CAL] = new short[] { 322, 709 };
- pos[SIC] = new short[] { CAL };
- dst[SIC] = new short[] { 709 };
- pos[SAR] = new short[] { LIG, TOS, LAZ, CAM, CAL, SIC };
- dst[SAR] = new short[] { 863, 662, 556, 791, 1179, 467 };
- for (short i[] : pos ) {
- for (short[] j : pos) {
- addLane("Edge_" + i, pos[i][j], pos[i][j], dst[][j]);
- }
- }
- il ciclo dovrebbe avere lo stesso risultato:
- // paths from Piemonte (Node_1)
- addLane("Edge_0", PIEMONTE, VALLE_DAOSTA, 119);
- addLane("Edge_1", PIEMONTE, LOMBARDIA, 149);
- addLane("Edge_2", PIEMONTE, EMILIA_ROMAGNA, 332);
- addLane("Edge_3", PIEMONTE, LIGURIA, 171);
- // paths from Valle D'Aosta (Node_2)
- addLane("Edge_4", VALLE_DAOSTA, PIEMONTE, 119);
- // paths from Lombardia (Node_3)
- addLane("Edge_5", LOMBARDIA, TRENTINO, 225);
- addLane("Edge_6", LOMBARDIA, VENETO, 270);
- addLane("Edge_7", LOMBARDIA, EMILIA_ROMAGNA, 216);
- addLane("Edge_8", LOMBARDIA, PIEMONTE, 149);
- // paths from Trentino (Node_4)
- addLane("Edge_9", TRENTINO, VENETO, 215);
- addLane("Edge_10", TRENTINO, LOMBARDIA, 225);
- // paths from Veneto (Node_5)
- addLane("Edge_11", VENETO, FRIULI, 158);
- addLane("Edge_12", VENETO, EMILIA_ROMAGNA, 153);
- addLane("Edge_13", VENETO, LOMBARDIA, 273);
- addLane("Edge_14", VENETO, TRENTINO, 215);
- // paths from Friuli (Node_6)
- addLane("Edge_15", FRIULI, VENETO, 158);
- // paths from Liguria (Node_7)
- addLane("Edge_16", LIGURIA, PIEMONTE, 145);
- addLane("Edge_17", LIGURIA, EMILIA_ROMAGNA, 293);
- addLane("Edge_18", LIGURIA, TOSCANA, 230);
- // paths from Emilia-Romagna (Node_8)
- addLane("Edge_19", EMILIA_ROMAGNA, MARCHE, 227);
- addLane("Edge_20", EMILIA_ROMAGNA, TOSCANA, 106);
- addLane("Edge_21", EMILIA_ROMAGNA, LIGURIA, 293);
- addLane("Edge_22", EMILIA_ROMAGNA, PIEMONTE, 332);
- addLane("Edge_23", EMILIA_ROMAGNA, LOMBARDIA, 216);
- addLane("Edge_24", EMILIA_ROMAGNA, VENETO, 153)
Add Comment
Please, Sign In to add comment