from nographs.types import (
    # basic data types of NoGraphs
    Weight,
    T_vertex,
    T_vertex_id,
    T_weight,
    T_labels,
    VertexToID,
    vertex_as_id,
    UnweightedLabeledOutEdge,
    WeightedUnlabeledOutEdge,
    WeightedLabeledOutEdge,
    WeightedOutEdge,
    LabeledOutEdge,
    OutEdge,
    UnweightedUnlabeledFullEdge,
    UnweightedLabeledFullEdge,
    WeightedFullEdge,
    WeightedOrLabeledFullEdge,
)

from nographs.gear_collections import (
    # --- Gear collection types ---
    VertexSet,
    VertexMapping,
    # --- Gear collections for dense integer keys ---
    # Protocols for the used kind of sequences and the wrappers
    GettableSettableForGearProto,
    SequenceForGearProto,
    VertexSequenceWrapperForSetProto,
    VertexSequenceWrapperForMappingProto,
    # ABCs and helper functions to allow for type-save down casts
    _GettableSettableForGearAssertNoCall,
    _VertexSequenceWrapperAssertNoCall,
    VertexSetByWrapper,
    VertexMappingByWrapper,
    VertexMappingByWrapperWithNone,
    get_wrapper_from_vertex_set,
    access_to_vertex_set,
    get_wrapper_from_vertex_mapping,
    access_to_vertex_mapping_expect_none,
    access_to_vertex_mapping,
    # Implementations or VertexSet/VertexMapping based on wrappers
    VertexSetWrappingSequence,
    VertexSetWrappingSequenceNoBitPacking,
    VertexSetWrappingSequenceBitPacking,
    VertexMappingWrappingSequence,
    VertexMappingWrappingSequenceWithNone,
    VertexMappingWrappingSequenceWithoutNone,
)

from nographs.gears import (
    # ABCs for the needed collection kinds for NoGraphs
    VertexIdSet,
    VertexIdToVertexMapping,
    VertexIdToDistanceMapping,
    VertexIdToPathEdgeDataMapping,
    MutableSequenceOfVertices,
    # Gear protocols
    GearWithoutDistances,
    Gear,
    # Concrete gears
    GearForHashableVertexIDs,
    GearDefault,
    GearForHashableVertexIDsAndIntsMaybeFloats,
    GearForHashableVertexIDsAndFloats,
    GearForHashableVertexIDsAndDecimals,
    GearForIntVertexIDs,
    GearForIntVertexIDsAndIntsMaybeFloats,
    GearForIntVertexIDsAndDecimals,
    GearForIntVertexIDsAndCFloats,
    GearForIntVertexIDsAndCInts,
    GearForIntVerticesAndIDs,
    GearForIntVerticesAndIDsAndIntsMaybeFloats,
    GearForIntVerticesAndIDsAndDecimals,
    GearForIntVerticesAndIDsAndCFloats,
    GearForIntVerticesAndIDsAndCInts,
)

from nographs.paths import (
    Paths,
    _PathsDummy,
    PathsOfUnlabeledEdges,
    PathsOfLabeledEdges,
)

from nographs.strategies import (
    # basic types
    NextVertices,
    NextEdges,
    # traversal (abstract base class and concrete implementations)
    Traversal,
    _TraversalWithoutWeightsBasic,
    _TraversalWithoutWeightsDFS,
    TraversalBreadthFirstFlex,
    TraversalBreadthFirst,
    TraversalDepthFirstFlex,
    TraversalDepthFirst,
    TraversalNeighborsThenDepthFlex,
    TraversalNeighborsThenDepth,
    _TraversalWithWeights,
    TraversalTopologicalSortFlex,
    TraversalTopologicalSort,
    TraversalShortestPathsFlex,
    TraversalShortestPaths,
    TraversalAStarFlex,
    TraversalAStar,
    TraversalMinimumSpanningTreeFlex,
    TraversalMinimumSpanningTree,
)

from nographs.matrix_gadgets import Vector, Limits, Position, Array

from nographs.edge_gadgets import adapt_edge_index, adapt_edge_iterable

__all__ = (
    # -- types --
    "Weight",
    "T_vertex",
    "T_vertex_id",
    "T_weight",
    "T_labels",
    "VertexToID",
    "vertex_as_id",
    "UnweightedLabeledOutEdge",
    "WeightedUnlabeledOutEdge",
    "WeightedLabeledOutEdge",
    "WeightedOutEdge",
    "LabeledOutEdge",
    "OutEdge",
    "UnweightedUnlabeledFullEdge",
    "UnweightedLabeledFullEdge",
    "WeightedFullEdge",
    "WeightedOrLabeledFullEdge",
    # -- gear collections --
    "VertexSet",
    "VertexMapping",
    "_GettableSettableForGearAssertNoCall",
    "_VertexSequenceWrapperAssertNoCall",
    "VertexSetByWrapper",
    "VertexMappingByWrapper",
    "VertexMappingByWrapperWithNone",
    "GettableSettableForGearProto",
    "SequenceForGearProto",
    "VertexSequenceWrapperForSetProto",
    "VertexSequenceWrapperForMappingProto",
    "get_wrapper_from_vertex_set",
    "access_to_vertex_set",
    "get_wrapper_from_vertex_mapping",
    "access_to_vertex_mapping_expect_none",
    "access_to_vertex_mapping",
    "VertexSetWrappingSequence",
    "VertexSetWrappingSequenceNoBitPacking",
    "VertexSetWrappingSequenceBitPacking",
    "VertexMappingWrappingSequence",
    "VertexMappingWrappingSequenceWithNone",
    "VertexMappingWrappingSequenceWithoutNone",
    # -- gears --
    "VertexIdSet",
    "VertexIdToVertexMapping",
    "VertexIdToDistanceMapping",
    "VertexIdToPathEdgeDataMapping",
    "MutableSequenceOfVertices",
    "GearWithoutDistances",
    "Gear",
    "GearForHashableVertexIDs",
    "GearDefault",
    "GearForHashableVertexIDsAndIntsMaybeFloats",
    "GearForHashableVertexIDsAndFloats",
    "GearForHashableVertexIDsAndDecimals",
    "GearForIntVertexIDs",
    "GearForIntVertexIDsAndIntsMaybeFloats",
    "GearForIntVertexIDsAndDecimals",
    "GearForIntVertexIDsAndCFloats",
    "GearForIntVertexIDsAndCFloats",
    "GearForIntVerticesAndIDs",
    "GearForIntVerticesAndIDsAndIntsMaybeFloats",
    "GearForIntVerticesAndIDsAndDecimals",
    "GearForIntVerticesAndIDsAndCFloats",
    "GearForIntVerticesAndIDsAndCInts",
    "GearForIntVertexIDsAndCInts",
    # -- paths --
    "Paths",
    "_PathsDummy",
    "PathsOfUnlabeledEdges",
    "PathsOfLabeledEdges",
    # -- strategies --
    "NextVertices",
    "NextEdges",
    "Traversal",
    "_TraversalWithoutWeightsBasic",
    "_TraversalWithoutWeightsDFS",
    "TraversalBreadthFirstFlex",
    "TraversalBreadthFirst",
    "TraversalDepthFirstFlex",
    "TraversalDepthFirst",
    "TraversalNeighborsThenDepthFlex",
    "TraversalNeighborsThenDepth",
    "_TraversalWithWeights",
    "TraversalTopologicalSortFlex",
    "TraversalTopologicalSort",
    "TraversalShortestPathsFlex",
    "TraversalShortestPaths",
    "TraversalAStarFlex",
    "TraversalAStar",
    "TraversalMinimumSpanningTreeFlex",
    "TraversalMinimumSpanningTree",
    # -- matrix gadgets --
    "Vector",
    "Limits",
    "Position",
    "Array",
    # -- edge gadgets --
    "adapt_edge_index",
    "adapt_edge_iterable",
)
