Skip to content

Commit c8614c9

Browse files
committed
chore: regenerated code
1 parent 0df7d46 commit c8614c9

File tree

4 files changed

+551
-518
lines changed

4 files changed

+551
-518
lines changed

src/igraph_ctypes/_internal/enums.py

Lines changed: 155 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,40 @@ def from_(cls, value: Any):
16401640
}
16411641

16421642

1643+
class ChungLu(IntEnum):
1644+
"""Python counterpart of an ``igraph_chung_lu_t`` enum."""
1645+
1646+
ORIGINAL = 0
1647+
GRG = 1
1648+
NR = 2
1649+
1650+
_string_map: ClassVar[dict[str, ChungLu]]
1651+
1652+
@classmethod
1653+
def from_(cls, value: Any):
1654+
"""Converts an arbitrary Python object into this enum.
1655+
1656+
Raises:
1657+
ValueError: if the object cannot be converted
1658+
"""
1659+
if isinstance(value, ChungLu):
1660+
return value
1661+
elif isinstance(value, int):
1662+
return cls(value)
1663+
else:
1664+
try:
1665+
return cls._string_map[value]
1666+
except KeyError:
1667+
raise ValueError(f"{value!r} cannot be converted to ChungLu") from None
1668+
1669+
1670+
ChungLu._string_map = {
1671+
'grg': ChungLu.GRG,
1672+
'nr': ChungLu.NR,
1673+
'original': ChungLu.ORIGINAL,
1674+
}
1675+
1676+
16431677
class MatrixStorage(IntEnum):
16441678
"""Python counterpart of an ``igraph_matrix_storage_t`` enum."""
16451679

@@ -1672,6 +1706,40 @@ def from_(cls, value: Any):
16721706
}
16731707

16741708

1709+
class LpaVariant(IntEnum):
1710+
"""Python counterpart of an ``igraph_lpa_variant_t`` enum."""
1711+
1712+
DOMINANCE = 0
1713+
RETENTION = 1
1714+
FAST = 2
1715+
1716+
_string_map: ClassVar[dict[str, LpaVariant]]
1717+
1718+
@classmethod
1719+
def from_(cls, value: Any):
1720+
"""Converts an arbitrary Python object into this enum.
1721+
1722+
Raises:
1723+
ValueError: if the object cannot be converted
1724+
"""
1725+
if isinstance(value, LpaVariant):
1726+
return value
1727+
elif isinstance(value, int):
1728+
return cls(value)
1729+
else:
1730+
try:
1731+
return cls._string_map[value]
1732+
except KeyError:
1733+
raise ValueError(f"{value!r} cannot be converted to LpaVariant") from None
1734+
1735+
1736+
LpaVariant._string_map = {
1737+
'dominance': LpaVariant.DOMINANCE,
1738+
'fast': LpaVariant.FAST,
1739+
'retention': LpaVariant.RETENTION,
1740+
}
1741+
1742+
16751743
class ErrorCode(IntEnum):
16761744
"""Python counterpart of an ``igraph_error_type_t`` enum."""
16771745

@@ -1681,57 +1749,18 @@ class ErrorCode(IntEnum):
16811749
PARSEERROR = 3
16821750
EINVAL = 4
16831751
EXISTS = 5
1684-
EINVEVECTOR = 6
16851752
EINVVID = 7
1686-
NONSQUARE = 8
1753+
EINVEID = 8
16871754
EINVMODE = 9
16881755
EFILE = 10
16891756
UNIMPLEMENTED = 12
16901757
INTERRUPTED = 13
16911758
DIVERGED = 14
1692-
ARPACK_PROD = 15
1693-
ARPACK_NPOS = 16
1694-
ARPACK_NEVNPOS = 17
1695-
ARPACK_NCVSMALL = 18
1696-
ARPACK_NONPOSI = 19
1697-
ARPACK_WHICHINV = 20
1698-
ARPACK_BMATINV = 21
1699-
ARPACK_WORKLSMALL = 22
1700-
ARPACK_TRIDERR = 23
1701-
ARPACK_ZEROSTART = 24
1702-
ARPACK_MODEINV = 25
1703-
ARPACK_MODEBMAT = 26
1704-
ARPACK_ISHIFT = 27
1705-
ARPACK_NEVBE = 28
1706-
ARPACK_NOFACT = 29
1707-
ARPACK_FAILED = 30
1708-
ARPACK_HOWMNY = 31
1709-
ARPACK_HOWMNYS = 32
1710-
ARPACK_EVDIFF = 33
1711-
ARPACK_SHUR = 34
1712-
ARPACK_LAPACK = 35
1713-
ARPACK_UNKNOWN = 36
1759+
EARPACK = 15
17141760
ENEGLOOP = 37
17151761
EINTERNAL = 38
1716-
ARPACK_MAXIT = 39
1717-
ARPACK_NOSHIFT = 40
1718-
ARPACK_REORDER = 41
1719-
EDIVZERO = 42
1720-
GLP_EBOUND = 43
1721-
GLP_EROOT = 44
1722-
GLP_ENOPFS = 45
1723-
GLP_ENODFS = 46
1724-
GLP_EFAIL = 47
1725-
GLP_EMIPGAP = 48
1726-
GLP_ETMLIM = 49
1727-
GLP_ESTOP = 50
1728-
EATTRIBUTES = 51
17291762
EATTRCOMBINE = 52
1730-
ELAPACK = 53
1731-
EDRL = 54
17321763
EOVERFLOW = 55
1733-
EGLP = 56
1734-
CPUTIME = 57
17351764
EUNDERFLOW = 58
17361765
ERWSTUCK = 59
17371766
STOP = 60
@@ -1759,45 +1788,15 @@ def from_(cls, value: Any):
17591788

17601789

17611790
ErrorCode._string_map = {
1762-
'arpack_bmatinv': ErrorCode.ARPACK_BMATINV,
1763-
'arpack_evdiff': ErrorCode.ARPACK_EVDIFF,
1764-
'arpack_failed': ErrorCode.ARPACK_FAILED,
1765-
'arpack_howmny': ErrorCode.ARPACK_HOWMNY,
1766-
'arpack_howmnys': ErrorCode.ARPACK_HOWMNYS,
1767-
'arpack_ishift': ErrorCode.ARPACK_ISHIFT,
1768-
'arpack_lapack': ErrorCode.ARPACK_LAPACK,
1769-
'arpack_maxit': ErrorCode.ARPACK_MAXIT,
1770-
'arpack_modebmat': ErrorCode.ARPACK_MODEBMAT,
1771-
'arpack_modeinv': ErrorCode.ARPACK_MODEINV,
1772-
'arpack_ncvsmall': ErrorCode.ARPACK_NCVSMALL,
1773-
'arpack_nevbe': ErrorCode.ARPACK_NEVBE,
1774-
'arpack_nevnpos': ErrorCode.ARPACK_NEVNPOS,
1775-
'arpack_nofact': ErrorCode.ARPACK_NOFACT,
1776-
'arpack_nonposi': ErrorCode.ARPACK_NONPOSI,
1777-
'arpack_noshift': ErrorCode.ARPACK_NOSHIFT,
1778-
'arpack_npos': ErrorCode.ARPACK_NPOS,
1779-
'arpack_prod': ErrorCode.ARPACK_PROD,
1780-
'arpack_reorder': ErrorCode.ARPACK_REORDER,
1781-
'arpack_shur': ErrorCode.ARPACK_SHUR,
1782-
'arpack_triderr': ErrorCode.ARPACK_TRIDERR,
1783-
'arpack_unknown': ErrorCode.ARPACK_UNKNOWN,
1784-
'arpack_whichinv': ErrorCode.ARPACK_WHICHINV,
1785-
'arpack_worklsmall': ErrorCode.ARPACK_WORKLSMALL,
1786-
'arpack_zerostart': ErrorCode.ARPACK_ZEROSTART,
1787-
'cputime': ErrorCode.CPUTIME,
17881791
'diverged': ErrorCode.DIVERGED,
1792+
'earpack': ErrorCode.EARPACK,
17891793
'eattrcombine': ErrorCode.EATTRCOMBINE,
1790-
'eattributes': ErrorCode.EATTRIBUTES,
1791-
'edivzero': ErrorCode.EDIVZERO,
1792-
'edrl': ErrorCode.EDRL,
17931794
'efile': ErrorCode.EFILE,
1794-
'eglp': ErrorCode.EGLP,
17951795
'einternal': ErrorCode.EINTERNAL,
17961796
'einval': ErrorCode.EINVAL,
1797-
'einvevector': ErrorCode.EINVEVECTOR,
1797+
'einveid': ErrorCode.EINVEID,
17981798
'einvmode': ErrorCode.EINVMODE,
17991799
'einvvid': ErrorCode.EINVVID,
1800-
'elapack': ErrorCode.ELAPACK,
18011800
'enegloop': ErrorCode.ENEGLOOP,
18021801
'enomem': ErrorCode.ENOMEM,
18031802
'enosol': ErrorCode.ENOSOL,
@@ -1807,16 +1806,7 @@ def from_(cls, value: Any):
18071806
'eunderflow': ErrorCode.EUNDERFLOW,
18081807
'exists': ErrorCode.EXISTS,
18091808
'failure': ErrorCode.FAILURE,
1810-
'glp_ebound': ErrorCode.GLP_EBOUND,
1811-
'glp_efail': ErrorCode.GLP_EFAIL,
1812-
'glp_emipgap': ErrorCode.GLP_EMIPGAP,
1813-
'glp_enodfs': ErrorCode.GLP_ENODFS,
1814-
'glp_enopfs': ErrorCode.GLP_ENOPFS,
1815-
'glp_eroot': ErrorCode.GLP_EROOT,
1816-
'glp_estop': ErrorCode.GLP_ESTOP,
1817-
'glp_etmlim': ErrorCode.GLP_ETMLIM,
18181809
'interrupted': ErrorCode.INTERRUPTED,
1819-
'nonsquare': ErrorCode.NONSQUARE,
18201810
'parseerror': ErrorCode.PARSEERROR,
18211811
'stop': ErrorCode.STOP,
18221812
'success': ErrorCode.SUCCESS,
@@ -1958,6 +1948,86 @@ def from_(cls, value: Any):
19581948
}
19591949

19601950

1951+
class ArpackError(IntEnum):
1952+
"""Python counterpart of an ``igraph_arpack_error_t`` enum."""
1953+
1954+
NO_ERROR = 0
1955+
PROD = 15
1956+
NPOS = 16
1957+
NEVNPOS = 17
1958+
NCVSMALL = 18
1959+
NONPOSI = 19
1960+
WHICHINV = 20
1961+
BMATINV = 21
1962+
WORKLSMALL = 22
1963+
TRIDERR = 23
1964+
ZEROSTART = 24
1965+
MODEINV = 25
1966+
MODEBMAT = 26
1967+
ISHIFT = 27
1968+
NEVBE = 28
1969+
NOFACT = 29
1970+
FAILED = 30
1971+
HOWMNY = 31
1972+
HOWMNYS = 32
1973+
EVDIFF = 33
1974+
SHUR = 34
1975+
LAPACK = 35
1976+
UNKNOWN = 36
1977+
MAXIT = 39
1978+
NOSHIFT = 40
1979+
REORDER = 41
1980+
1981+
_string_map: ClassVar[dict[str, ArpackError]]
1982+
1983+
@classmethod
1984+
def from_(cls, value: Any):
1985+
"""Converts an arbitrary Python object into this enum.
1986+
1987+
Raises:
1988+
ValueError: if the object cannot be converted
1989+
"""
1990+
if isinstance(value, ArpackError):
1991+
return value
1992+
elif isinstance(value, int):
1993+
return cls(value)
1994+
else:
1995+
try:
1996+
return cls._string_map[value]
1997+
except KeyError:
1998+
raise ValueError(f"{value!r} cannot be converted to ArpackError") from None
1999+
2000+
2001+
ArpackError._string_map = {
2002+
'bmatinv': ArpackError.BMATINV,
2003+
'evdiff': ArpackError.EVDIFF,
2004+
'failed': ArpackError.FAILED,
2005+
'howmny': ArpackError.HOWMNY,
2006+
'howmnys': ArpackError.HOWMNYS,
2007+
'ishift': ArpackError.ISHIFT,
2008+
'lapack': ArpackError.LAPACK,
2009+
'maxit': ArpackError.MAXIT,
2010+
'modebmat': ArpackError.MODEBMAT,
2011+
'modeinv': ArpackError.MODEINV,
2012+
'ncvsmall': ArpackError.NCVSMALL,
2013+
'nevbe': ArpackError.NEVBE,
2014+
'nevnpos': ArpackError.NEVNPOS,
2015+
'no_error': ArpackError.NO_ERROR,
2016+
'nofact': ArpackError.NOFACT,
2017+
'nonposi': ArpackError.NONPOSI,
2018+
'noshift': ArpackError.NOSHIFT,
2019+
'npos': ArpackError.NPOS,
2020+
'prod': ArpackError.PROD,
2021+
'reorder': ArpackError.REORDER,
2022+
'shur': ArpackError.SHUR,
2023+
'triderr': ArpackError.TRIDERR,
2024+
'unknown': ArpackError.UNKNOWN,
2025+
'whichinv': ArpackError.WHICHINV,
2026+
'worklsmall': ArpackError.WORKLSMALL,
2027+
'zerostart': ArpackError.ZEROSTART,
2028+
}
2029+
2030+
19612031
class BLISSSplittingHeuristics(IntEnum):
19622032
"""Python counterpart of an ``igraph_bliss_sh_t`` enum."""
19632033

@@ -2073,11 +2143,13 @@ def from_(cls, value: Any):
20732143
__all__ = (
20742144
'AddWeights',
20752145
'AdjacencyMode',
2146+
'ArpackError',
20762147
'AttributeCombinationType',
20772148
'AttributeElementType',
20782149
'AttributeType',
20792150
'BLISSSplittingHeuristics',
20802151
'BarabasiAlgorithm',
2152+
'ChungLu',
20812153
'CommunityComparison',
20822154
'Connectedness',
20832155
'DRLLayoutPreset',
@@ -2100,6 +2172,7 @@ def from_(cls, value: Any):
21002172
'LazyAdjacencyListSimplify',
21012173
'LeadingEigenvectorCommunityHistory',
21022174
'Loops',
2175+
'LpaVariant',
21032176
'MatrixStorage',
21042177
'Multiple',
21052178
'NeighborMode',

0 commit comments

Comments
 (0)