Logo Search packages:      
Sourcecode: python-networkx version File versions  Download package

networkx::xbase::XGraph Class Reference

Inheritance diagram for networkx::xbase::XGraph:


List of all members.

Detailed Description

A class implementing general undirected graphs, allowing
(optional) self-loops, multiple edges, arbitrary (hashable)
objects as nodes and arbitrary objects associated with

An XGraph edge is specified by a 3-tuple e=(n1,n2,x),
where n1 and n2 are nodes (hashable objects) and x is an
arbitrary (and not necessarily unique) object associated with that

 >>> G=XGraph()

creates an empty simple and undirected graph (no self-loops or
multiple edges allowed).  It is equivalent to the expression:

>>> G=XGraph(name="No Name",selfloops=False,multiedges=False)

>>> G=XGraph(name="empty",multiedges=True)

creates an empty graph with G.name="empty", that do not allow the
addition of self-loops but do allow for multiple edges.

See also the XDiGraph class below.

Definition at line 217 of file xbase.py.

Public Member Functions

def __contains__
def __getitem__
def __init__
def __iter__
def __len__
def __str__
def add_cycle
def add_edge
def add_edge
def add_edges_from
def add_node
def add_nodes_from
def add_path
def allow_multiedges
def allow_selfloops
def ban_multiedges
def ban_selfloops
def clear
def copy
def degree
def degree_iter
def delete_edge
def delete_edge
def delete_edges_from
def delete_multiedge
def delete_node
def delete_nodes_from
def edge_boundary
def edges
def edges_iter
def get_edge
def has_edge
def has_edge
def has_neighbor
def has_node
def info
def is_directed
def neighbors
def neighbors_iter
def node_boundary
def nodes
def nodes_iter
def nodes_with_selfloops
def number_of_edges
def number_of_nodes
def number_of_selfloops
def order
def prepare_nbunch
def print_dna
def remove_all_multiedges
def remove_all_selfloops
def selfloop_edges
def size
def subgraph
def to_directed
def to_undirected

Public Attributes


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index