diff --git a/Appli-iso3dfd/compute_path.py b/Appli-iso3dfd/compute_path.py index 4ad791b76ce9e79ab2fde9f70e192ee51dc32de3..d5fbe35046b790d615ad5193d09f648a04ccafdb 100644 --- a/Appli-iso3dfd/compute_path.py +++ b/Appli-iso3dfd/compute_path.py @@ -4,23 +4,23 @@ import numpy as np #tau : pheromone matrix, size : 1 + n1_size + n2_size + n3_size + n1_max//16 + n2_max x 1 + n1_size + n2_size + n3_size + n1//16 + n2 + n3 def proba(i, alpha, tau, n1_size, n2_size, n3_size, n_cbx, n_cby, n_cbz): - """Based on i, deduce which parameter you want to choose from. - Returns possibles choices and associated weights. - - Args: - i (int): Index in matrix - alpha (float): Parameter to compute weights - tau (np.array): Pheromon matrix - n1_size (int): First dimension of the problem - n2_size (int): Second dimension of the problem - n3_size (int): Third dimension of the problem - n_cbx (int): First dimension of the cache - n_cby (int): Second dimension of the cache - n_cbz (int): Third dimension of the cache - - Returns: - (tuple: np.array, np.array): possibles choices (sequence) and their weights (weights) - """ + """Based on i, deduce which parameter you want to choose from. + Returns possibles choices and associated weights. + + Args: + i (int): Index in matrix + alpha (float): Parameter to compute weights + tau (np.array): Pheromon matrix + n1_size (int): First dimension of the problem + n2_size (int): Second dimension of the problem + n3_size (int): Third dimension of the problem + n_cbx (int): First dimension of the cache + n_cby (int): Second dimension of the cache + n_cbz (int): Third dimension of the cache + + Returns: + (tuple: np.array, np.array): possibles choices (sequence) and their weights (weights) + """ n1_max = (2**(n1_size-1)) * 16 n2_max = (2**(n2_size-1)) * 256