metawards.Node¶
-
class
metawards.Node(label: int = None, begin_to: int = None, end_to: int = None, self_w: int = None, begin_p: int = None, end_p: int = None, self_p: int = None, day_foi: float = 0.0, night_foi: float = 0.0, weekend_foi: float = 0.0, play_suscept: float = 0.0, save_play_suscept: float = 0.0, denominator_n: float = 0.0, denominator_d: float = 0.0, denominator_p: float = 0.0, denominator_pd: float = 0.0, x: float = 0.0, y: float = 0.0)[source]¶ This class represents an electoral ward (node) in the network
-
__init__(label: int = None, begin_to: int = None, end_to: int = None, self_w: int = None, begin_p: int = None, end_p: int = None, self_p: int = None, day_foi: float = 0.0, night_foi: float = 0.0, weekend_foi: float = 0.0, play_suscept: float = 0.0, save_play_suscept: float = 0.0, denominator_n: float = 0.0, denominator_d: float = 0.0, denominator_p: float = 0.0, denominator_pd: float = 0.0, x: float = 0.0, y: float = 0.0) → None¶
Methods
__init__(label, begin_to, end_to, self_w, …)Attributes
begin_pThe index (int) of the first link for this node in the network play Links list (play) begin_toThe index (int) of the first link for this node in the network Links list day_foidenominator_ddenominator_ndenominator_pdenominator_pdend_pThe number (int) of links for this node in the Links play list end_toThe number (int) of links for this node in the Links list labelThe node’s label (int). night_foiplay_susceptThe number of susceptible players in this ward save_play_susceptself_pself_wweekend_foixx coordinate of the ward (location) yy coordinate of the ward (location) -
begin_p= None¶ The index (int) of the first link for this node in the network play Links list (play)
-
begin_to= None¶ The index (int) of the first link for this node in the network Links list
-
end_p= None¶ The number (int) of links for this node in the Links play list
-
end_to= None¶ The number (int) of links for this node in the Links list
-
label= None¶ The node’s label (int). This is the index of the node, which must run from 1 up to len(nodes). A value of -1 implies a null node
-
play_suscept= 0.0¶ The number of susceptible players in this ward
-
x= 0.0¶ x coordinate of the ward (location)
-
y= 0.0¶ y coordinate of the ward (location)
-