rand_node_attr_int
Adds a random integer as a node attribute.
sasviya.network.utils.random_attr_generator.rand_node_attr_int(g, min_val=0, max_val=100, name='rand_int', nodes_subset=None, seed=None)
Parameters
- g : SAS graph object
-
Specifies the input graph to add the attribute to.
- min_val : int, optional
-
Specifies the minimum value of the integer range to include. The default is 0.
- max_val : int, optional
-
Specifies the maximum value of the integer range to include. The default is 100.
- name : str, optional
-
Specifies the name of the attribute to add. The default is “rand_int”.
- nodes_subset : Container or None, optional
-
Specifies the subset of nodes to restrict the attribute to. The default is None.
- seed : int or None, optional
-
Specifies the random seed for reproducibility. The default is None.
Last updated: July 28, 2026