Class AntTsp


  • public class AntTsp
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      AntTsp()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      static double pow​(double a, double b)  
      void readGraph​(java.lang.String path)  
      int[] solve()  
      static java.lang.String tourToString​(int[] tour)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • n

        public int n
      • m

        public int m
      • bestTour

        public int[] bestTour
      • bestTourLength

        public double bestTourLength
    • Constructor Detail

      • AntTsp

        public AntTsp()
    • Method Detail

      • readGraph

        public void readGraph​(java.lang.String path)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • pow

        public static double pow​(double a,
                                 double b)
      • tourToString

        public static java.lang.String tourToString​(int[] tour)
      • solve

        public int[] solve()
      • main

        public static void main​(java.lang.String[] args)