map2loop.project.SorterUseNetworkX#

class map2loop.project.SorterUseNetworkX#

Bases: Sorter

Sorter class which returns a sorted list of units based on the unit relationships using a topological graph sorting algorithm

Initialiser for networkx graph sorter

__init__()#

Initialiser for networkx graph sorter

Methods

__init__()

Initialiser for networkx graph sorter

sort(units, unit_relationships, ...)

Execute sorter method takes unit data, relationships and a hint and returns the sorted unit names based on this algorithm.

type()

Getter for subclass type label

sort(units: DataFrame, unit_relationships: DataFrame, stratigraphic_order_hint: list, contacts: DataFrame, map_data: MapData) list#

Execute sorter method takes unit data, relationships and a hint and returns the sorted unit names based on this algorithm.

Parameters:
  • units (pandas.DataFrame) – the data frame to sort

  • units_relationships (pandas.DataFrame) – the relationships between units

  • stratigraphic_order_hint (list) – a list of unit names to use as a hint to sorting the units

  • contacts (pandas.DataFrame) – unit contacts with length of the contacts in metres

  • map_data (map2loop.MapData) – a catchall so that access to all map data is available

Returns:

list – the sorted unit names

type()#

Getter for subclass type label

Returns:

str – Name of subclass