@@ -494,36 +494,6 @@ def from_(cls, value: Any):
494494}
495495
496496
497- class Multiple (IntEnum ):
498- """Python counterpart of an ``igraph_multiple_t`` enum."""
499-
500- NO_MULTIPLE = 0
501- MULTIPLE = 1
502-
503- @classmethod
504- def from_ (cls , value : Any ):
505- """Converts an arbitrary Python object into this enum.
506-
507- Raises:
508- ValueError: if the object cannot be converted
509- """
510- if isinstance (value , Multiple ):
511- return value
512- elif isinstance (value , int ):
513- return cls (value )
514- else :
515- try :
516- return _Multiple_string_map [value ]
517- except KeyError :
518- raise ValueError (f"{ value !r} cannot be converted to Multiple" ) from None
519-
520-
521- _Multiple_string_map : dict [str , Multiple ] = {
522- 'multiple' : Multiple .MULTIPLE ,
523- 'no_multiple' : Multiple .NO_MULTIPLE ,
524- }
525-
526-
527497class Order (IntEnum ):
528498 """Python counterpart of an ``igraph_order_t`` enum."""
529499
@@ -1678,6 +1648,36 @@ def from_(cls, value: Any):
16781648}
16791649
16801650
1651+ class Product (IntEnum ):
1652+ """Python counterpart of an ``igraph_product_t`` enum."""
1653+
1654+ CARTESIAN = 0
1655+ TENSOR = 1
1656+
1657+ @classmethod
1658+ def from_ (cls , value : Any ):
1659+ """Converts an arbitrary Python object into this enum.
1660+
1661+ Raises:
1662+ ValueError: if the object cannot be converted
1663+ """
1664+ if isinstance (value , Product ):
1665+ return value
1666+ elif isinstance (value , int ):
1667+ return cls (value )
1668+ else :
1669+ try :
1670+ return _Product_string_map [value ]
1671+ except KeyError :
1672+ raise ValueError (f"{ value !r} cannot be converted to Product" ) from None
1673+
1674+
1675+ _Product_string_map : dict [str , Product ] = {
1676+ 'cartesian' : Product .CARTESIAN ,
1677+ 'tensor' : Product .TENSOR ,
1678+ }
1679+
1680+
16811681class LpaVariant (IntEnum ):
16821682 """Python counterpart of an ``igraph_lpa_variant_t`` enum."""
16831683
@@ -2089,11 +2089,11 @@ def from_(cls, value: Any):
20892089 'LpaVariant' ,
20902090 'MatrixStorage' ,
20912091 'MstAlgorithm' ,
2092- 'Multiple' ,
20932092 'NeighborMode' ,
20942093 'Optimality' ,
20952094 'Order' ,
20962095 'PagerankAlgorithm' ,
2096+ 'Product' ,
20972097 'RandomTreeMethod' ,
20982098 'RandomWalkStuck' ,
20992099 'RealizeDegseq' ,
0 commit comments