private void button_run_Click(object sender, EventArgs e) { var adjMatrix = GraphReaderWriter.getAdjacancyMatrix(dGV_adjacMatrix); if (rbtn_ant.Checked) { string[] algParams = tb_antAlg.Text.Split(';'); MessageBox.Show(GraphReaderWriter.vertSeqToReadableForm( dGV_adjacMatrix, new ACOAlgorithm( adjMatrix, double.Parse(algParams[0]), double.Parse(algParams[1]), double.Parse(algParams[2]), double.Parse(algParams[3])) .findHamiltoneCycle())); } if (rbtn_annealingAlg.Checked) { string[] algParams = tB_annealingAlg.Text.Split(';'); MessageBox.Show(GraphReaderWriter.vertSeqToReadableForm( dGV_adjacMatrix, new AnnealingAlgorithm( adjMatrix, double.Parse(algParams[0]), double.Parse(algParams[1]), GraphReaderWriter.convertPath(algParams[2], dGV_adjacMatrix), int.Parse(algParams[3])) .findHamiltoneCycle())); } if (rbtn_nearestNeighbourAlg.Checked) { MessageBox.Show( GraphReaderWriter.vertSeqToReadableForm( dGV_adjacMatrix, new NearestNeightbourAlgorithm(adjMatrix).findHamiltoneCycle())); } }
private void button_loadExample_Click(object sender, EventArgs e) { GraphReaderWriter.loadExample(dGV_adjacMatrix); }
private void button_addVertex_Click(object sender, EventArgs e) { GraphReaderWriter.addVertex(dGV_adjacMatrix); }