"""Type stubs for networkxr.classes.graph."""

from typing import Any, Iterator

from networkxr.classes.views import DegreeView, EdgeView, NodeView

class Graph:
    """Undirected graph with self-loops but no parallel edges."""

    node_attr_dict_factory: type[dict[str, Any]]
    adjlist_inner_dict_factory: type[dict[str, Any]]
    edge_attr_dict_factory: type[dict[str, Any]]
    graph_attr_dict_factory: type[dict[str, Any]]

    graph: dict[str, Any]
    _node: dict[Any, dict[str, Any]]
    _adj: dict[Any, dict[Any, dict[str, Any]]]

    def __init__(self, incoming_graph_data: Any = None, **attr: Any) -> None: ...
    @property
    def adj(self) -> dict[Any, dict[Any, dict[str, Any]]]: ...
    @property
    def name(self) -> str: ...
    @name.setter
    def name(self, val: str) -> None: ...
    def add_node(self, node_for_adding: Any, **attr: Any) -> None: ...
    def add_nodes_from(self, nodes: Any, **attr: Any) -> None: ...
    def remove_node(self, n: Any) -> None: ...
    def add_edge(self, u_of_edge: Any, v_of_edge: Any, **attr: Any) -> None: ...
    def add_edges_from(self, ebunch: Any, **attr: Any) -> None: ...
    def add_weighted_edges_from(self, ebunch: Any, weight: str = "weight") -> None: ...
    def remove_edge(self, u: Any, v: Any) -> None: ...
    def has_node(self, n: Any) -> bool: ...
    def has_edge(self, u: Any, v: Any) -> bool: ...
    def neighbors(self, n: Any) -> Iterator[Any]: ...
    def get_edge_data(self, u: Any, v: Any, default: Any = None) -> dict[str, Any] | Any: ...
    @property
    def nodes(self) -> NodeView: ...
    @property
    def edges(self) -> EdgeView: ...
    @property
    def degree(self) -> DegreeView: ...
    def adjacency(self) -> Iterator[tuple[Any, dict[Any, dict[str, Any]]]]: ...
    def number_of_nodes(self) -> int: ...
    def number_of_edges(self) -> int: ...
    def order(self) -> int: ...
    def size(self, weight: str | None = None) -> int | float: ...
    def is_multigraph(self) -> bool: ...
    def is_directed(self) -> bool: ...
    def copy(self) -> Graph: ...
    def clear(self) -> None: ...
    def clear_edges(self) -> None: ...
    def subgraph(self, nodes: Any) -> Graph: ...
    def to_undirected(self) -> Graph: ...
    def __contains__(self, n: Any) -> bool: ...
    def __len__(self) -> int: ...
    def __iter__(self) -> Iterator[Any]: ...
    def __getitem__(self, n: Any) -> dict[Any, dict[str, Any]]: ...
    def __repr__(self) -> str: ...
