Demo entry 6658834



Submitted by anonymous on Nov 08, 2017 at 13:10
Language: Python 3. Code size: 286 Bytes.

class Graph(object):
    def __init__(self, cost_matrix: list, rank: int):
        self.matrix = cost_matrix
        self.rank = rank
        #初始化信息素 值设置为C=1/rank^2
        self.pheromone = [[1 / (rank * rank) for j in range(rank)]\
                          for i in range(rank)]

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).