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__

clear

copy

fromkeys

Create a new dictionary with keys from iterable and values set to value.

get

Return the value for key if key is in the dictionary, else default.

items

keys

pop

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

Remove and return a (key, value) pair as a 2-tuple.

setdefault

Insert key with a value of default if key is not in the dictionary.

update

If 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]

values

Attributes

percentage_of_initiators

INF_WEIGHT

WEIGHT_LIST

CITY_LIST