pydistsim.demo_algorithms.santoro2007.mega_merger.algorithm.MegaMergerParameters
- class MegaMergerParameters[source]
Bases:
TypedDict,Generic[T]Class to specify the parameters for the Mega Merger algorithm.
The list of weights and cities must have at least the same size of edges and nodes in the network, respectively. Additionally, both list must be disjoint, i.e., no city can be a weight and vice-versa. Obviously, the INF_WEIGHT must be bigger than any weight or city and must be comparable in type to both (> and < must work).
- Attributes:
percentage_of_initiators (float): Percentage of initiators in the network. INF_WEIGHT (T): Value representing infinity. WEIGHT_LIST (list[T]): List of weights for the links. CITY_LIST (list[T]): List of cities in the network.
Methods
__init__clearcopyfromkeysCreate a new dictionary with keys from iterable and values set to value.
getReturn the value for key if key is in the dictionary, else default.
itemskeyspopIf the key is not found, return the default if given; otherwise, raise a KeyError.
popitemRemove and return a (key, value) pair as a 2-tuple.
setdefaultInsert key with a value of default if key is not in the dictionary.
updateIf E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
valuesAttributes
percentage_of_initiatorsINF_WEIGHTWEIGHT_LISTCITY_LIST