Base class for undirected topology
| Parameters : | G : NetworkX Graph, optional
**attr : attributes
|
|---|
Methods
| add_cycle(nodes, **attr) | Add a cycle. |
| add_edge(u, v[, attr_dict]) | Add an edge between u and v. |
| add_edges_from(ebunch[, attr_dict]) | Add all the edges in ebunch. |
| add_node(n[, attr_dict]) | Add a single node n and update node attributes. |
| add_nodes_from(nodes, **attr) | Add multiple nodes. |
| add_path(nodes, **attr) | Add a path. |
| add_star(nodes, **attr) | Add a star. |
| add_weighted_edges_from(ebunch[, weight]) | Add all the edges in ebunch as weighted edges with specified weights. |
| adjacency_iter() | Return an iterator of (node, adjacency dict) tuples for all nodes. |
| adjacency_list() | Return an adjacency list representation of the graph. |
| applications() | Return a dictionary of all applications deployed, keyed by node |
| buffers() | Return a dictionary of all buffer sizes, keyed by interface |
| capacities() | Return a dictionary of all link capacities, keyed by link |
| clear() | Remove all nodes and edges from the graph. |
| copy() | Return a copy of the topology. |
| degree([nbunch, weight]) | Return the degree of a node or nodes. |
| degree_iter([nbunch, weight]) | Return an iterator for (node, degree). |
| delays() | Return a dictionary of all link delays, keyed by link |
| edges([nbunch, data]) | Return a list of edges. |
| edges_iter([nbunch, data]) | Return an iterator over the edges. |
| get_edge_data(u, v[, default]) | Return the attribute dictionary associated with edge (u,v). |
| has_edge(u, v) | Return True if the edge (u,v) is in the graph. |
| has_node(n) | Return True if the graph contains the node n. |
| is_directed() | Return True if graph is directed, False otherwise. |
| is_multigraph() | Return True if graph is a multigraph, False otherwise. |
| nbunch_iter([nbunch]) | Return an iterator of nodes contained in nbunch that are also in the graph. |
| neighbors(n) | Return a list of the nodes connected to the node n. |
| neighbors_iter(n) | Return an iterator over all neighbors of node n. |
| nodes([data]) | Return a list of the nodes in the graph. |
| nodes_iter([data]) | Return an iterator over the nodes. |
| nodes_with_selfloops() | Return a list of nodes with self loops. |
| number_of_edges([u, v]) | Return the number of edges between two nodes. |
| number_of_nodes() | Return the number of nodes in the graph. |
| number_of_selfloops() | Return the number of selfloop edges. |
| order() | Return the number of nodes in the graph. |
| remove_edge(u, v) | Remove the edge between u and v. |
| remove_edges_from(ebunch) | Remove all edges specified in ebunch. |
| remove_node(n) | Remove node n. |
| remove_nodes_from(nodes) | Remove multiple nodes. |
| selfloop_edges([data]) | Return a list of selfloop edges. |
| size([weight]) | Return the number of edges. |
| stacks() | Return a dictionary of all node stacks, keyed by node |
| subgraph(nbunch) | Return the subgraph induced on nodes in nbunch. |
| to_directed() | Return a directed representation of the topology. |
| to_undirected() | Return an undirected copy of the topology. |
| weights() | Return a dictionary of all link weights, keyed by link |
Base class for directed topology
Methods
| add_cycle(nodes, **attr) | Add a cycle. |
| add_edge(u, v[, attr_dict]) | Add an edge between u and v. |
| add_edges_from(ebunch[, attr_dict]) | Add all the edges in ebunch. |
| add_node(n[, attr_dict]) | Add a single node n and update node attributes. |
| add_nodes_from(nodes, **attr) | Add multiple nodes. |
| add_path(nodes, **attr) | Add a path. |
| add_star(nodes, **attr) | Add a star. |
| add_weighted_edges_from(ebunch[, weight]) | Add all the edges in ebunch as weighted edges with specified weights. |
| adjacency_iter() | Return an iterator of (node, adjacency dict) tuples for all nodes. |
| adjacency_list() | Return an adjacency list representation of the graph. |
| applications() | Return a dictionary of all applications deployed, keyed by node |
| buffers() | Return a dictionary of all buffer sizes, keyed by interface |
| capacities() | Return a dictionary of all link capacities, keyed by link |
| clear() | Remove all nodes and edges from the graph. |
| copy() | Return a copy of the topology. |
| degree([nbunch, weight]) | Return the degree of a node or nodes. |
| degree_iter([nbunch, weight]) | Return an iterator for (node, degree). |
| delays() | Return a dictionary of all link delays, keyed by link |
| edges([nbunch, data]) | Return a list of edges. |
| edges_iter([nbunch, data]) | Return an iterator over the edges. |
| get_edge_data(u, v[, default]) | Return the attribute dictionary associated with edge (u,v). |
| has_edge(u, v) | Return True if the edge (u,v) is in the graph. |
| has_node(n) | Return True if the graph contains the node n. |
| has_predecessor(u, v) | Return True if node u has predecessor v. |
| has_successor(u, v) | Return True if node u has successor v. |
| in_degree([nbunch, weight]) | Return the in-degree of a node or nodes. |
| in_degree_iter([nbunch, weight]) | Return an iterator for (node, in-degree). |
| in_edges([nbunch, data]) | Return a list of the incoming edges. |
| in_edges_iter([nbunch, data]) | Return an iterator over the incoming edges. |
| is_directed() | Return True if graph is directed, False otherwise. |
| is_multigraph() | Return True if graph is a multigraph, False otherwise. |
| nbunch_iter([nbunch]) | Return an iterator of nodes contained in nbunch that are also in the graph. |
| neighbors(n) | Return a list of successor nodes of n. |
| neighbors_iter(n) | Return an iterator over successor nodes of n. |
| nodes([data]) | Return a list of the nodes in the graph. |
| nodes_iter([data]) | Return an iterator over the nodes. |
| nodes_with_selfloops() | Return a list of nodes with self loops. |
| number_of_edges([u, v]) | Return the number of edges between two nodes. |
| number_of_nodes() | Return the number of nodes in the graph. |
| number_of_selfloops() | Return the number of selfloop edges. |
| order() | Return the number of nodes in the graph. |
| out_degree([nbunch, weight]) | Return the out-degree of a node or nodes. |
| out_degree_iter([nbunch, weight]) | Return an iterator for (node, out-degree). |
| out_edges([nbunch, data]) | Return a list of edges. |
| out_edges_iter([nbunch, data]) | Return an iterator over the edges. |
| predecessors(n) | Return a list of predecessor nodes of n. |
| predecessors_iter(n) | Return an iterator over predecessor nodes of n. |
| remove_edge(u, v) | Remove the edge between u and v. |
| remove_edges_from(ebunch) | Remove all edges specified in ebunch. |
| remove_node(n) | Remove node n. |
| remove_nodes_from(nbunch) | Remove multiple nodes. |
| reverse([copy]) | Return the reverse of the graph. |
| selfloop_edges([data]) | Return a list of selfloop edges. |
| size([weight]) | Return the number of edges. |
| stacks() | Return a dictionary of all node stacks, keyed by node |
| subgraph(nbunch) | Return the subgraph induced on nodes in nbunch. |
| successors(n) | Return a list of successor nodes of n. |
| successors_iter(n) | Return an iterator over successor nodes of n. |
| to_directed() | Return a directed representation of the topology. |
| to_undirected() | Return an undirected copy of the topology. |
| weights() | Return a dictionary of all link weights, keyed by link |
Represent a datacenter topology
Methods
| add_cycle(nodes, **attr) | Add a cycle. |
| add_edge(u, v[, attr_dict]) | Add an edge between u and v. |
| add_edges_from(ebunch[, attr_dict]) | Add all the edges in ebunch. |
| add_node(n[, attr_dict]) | Add a single node n and update node attributes. |
| add_nodes_from(nodes, **attr) | Add multiple nodes. |
| add_path(nodes, **attr) | Add a path. |
| add_star(nodes, **attr) | Add a star. |
| add_weighted_edges_from(ebunch[, weight]) | Add all the edges in ebunch as weighted edges with specified weights. |
| adjacency_iter() | Return an iterator of (node, adjacency dict) tuples for all nodes. |
| adjacency_list() | Return an adjacency list representation of the graph. |
| applications() | Return a dictionary of all applications deployed, keyed by node |
| buffers() | Return a dictionary of all buffer sizes, keyed by interface |
| capacities() | Return a dictionary of all link capacities, keyed by link |
| clear() | Remove all nodes and edges from the graph. |
| copy() | Return a copy of the topology. |
| degree([nbunch, weight]) | Return the degree of a node or nodes. |
| degree_iter([nbunch, weight]) | Return an iterator for (node, degree). |
| delays() | Return a dictionary of all link delays, keyed by link |
| edges([nbunch, data]) | Return a list of edges. |
| edges_iter([nbunch, data]) | Return an iterator over the edges. |
| get_edge_data(u, v[, default]) | Return the attribute dictionary associated with edge (u,v). |
| has_edge(u, v) | Return True if the edge (u,v) is in the graph. |
| has_node(n) | Return True if the graph contains the node n. |
| is_directed() | Return True if graph is directed, False otherwise. |
| is_multigraph() | Return True if graph is a multigraph, False otherwise. |
| nbunch_iter([nbunch]) | Return an iterator of nodes contained in nbunch that are also in the graph. |
| neighbors(n) | Return a list of the nodes connected to the node n. |
| neighbors_iter(n) | Return an iterator over all neighbors of node n. |
| nodes([data]) | Return a list of the nodes in the graph. |
| nodes_iter([data]) | Return an iterator over the nodes. |
| nodes_with_selfloops() | Return a list of nodes with self loops. |
| number_of_edges([u, v]) | Return the number of edges between two nodes. |
| number_of_nodes() | Return the number of nodes in the graph. |
| number_of_selfloops() | Return the number of selfloop edges. |
| number_of_servers() | Return the number of servers in the topology |
| number_of_switches() | Return the number of switches in the topology |
| order() | Return the number of nodes in the graph. |
| remove_edge(u, v) | Remove the edge between u and v. |
| remove_edges_from(ebunch) | Remove all edges specified in ebunch. |
| remove_node(n) | Remove node n. |
| remove_nodes_from(nodes) | Remove multiple nodes. |
| selfloop_edges([data]) | Return a list of selfloop edges. |
| servers() | Return the list of server nodes in the topology |
| size([weight]) | Return the number of edges. |
| stacks() | Return a dictionary of all node stacks, keyed by node |
| subgraph(nbunch) | Return the subgraph induced on nodes in nbunch. |
| switches() | Return the list of switch nodes in the topology |
| to_directed() | Return a directed representation of the topology. |
| to_undirected() | Return an undirected copy of the topology. |
| weights() | Return a dictionary of all link weights, keyed by link |
Class representing a single traffic matrix.
It simply contains a set of traffic volumes being exchanged between origin-destination pairs
| Parameters : | volume_unit : str
flows : dict, optional
|
|---|
Methods
| add_flow(origin, destination, volume) | Add a flow to the traffic matrix |
| flows() | Return the flows of the traffic matrix |
| od_pairs() | Return all OD pairs of the traffic matrix |
| pop_flow(origin, destination) | Pop a flow from the traffic matrix and return the volume of the flow removed. |
Class representing a sequence of traffic matrices.
| Parameters : | interval : float or int, optional
t_unit : str, optional
|
|---|
Methods
| append(tm) | Append a traffic matrix at the end of the sequence |
| get(i) | Return a specific traffic matrix in a specific position of the sequence |
| insert(i, tm) | Insert a traffic matrix in the sequence at a specified position |
| pop(i) | Removes the traffic matrix in a specific position of the sequence |
Class representing an event schedule. This class is simply a wrapper for a list of events.
Methods
| add(time, event[, absolute_time]) | Adds an event to the schedule. |
| add_schedule(event_schedule) | Merge with another event schedule. |
| events_between(t_start, t_end) | Return an event schedule comprising all events scheduled between a start time (included) and an end time (excluded). |
| number_of_events() | Return the number of events in the schedule |
| pop(i) | Remove from the schedule the event in a specific position |