biogeme.partition module

Defines a class that represents a partition of a list of integers

author:

Michel Bierlaire

date:

Thu Oct 26 17:30:36 2023

class biogeme.partition.Partition(segments, full_set=None)[source]

Bases: object

Class defining a partition of a set

Parameters:
  • segments (Sequence[set[int]])

  • full_set (set[int] | None)

number_of_segments()[source]
Return type:

int

validate_partition()[source]

Check that there is no intersection between segments

Return type:

None

validate_segments()[source]

Check the types

Return type:

None