MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / Statistics

Class Statistics

lean_py/z3/solver.py:1041–1063  ·  view source on GitHub ↗

Solver statistics.

Source from the content-addressed store, hash-verified

1039
1040
1041class Statistics:
1042 """Solver statistics."""
1043
1044 def __init__(self, data: dict | None = None) -> None:
1045 self._data = data or {}
1046
1047 def __len__(self) -> int:
1048 return len(self._data)
1049
1050 def __getitem__(self, key: str) -> Any:
1051 return self._data.get(key, 0)
1052
1053 def __contains__(self, key: str) -> bool:
1054 return key in self._data
1055
1056 def keys(self) -> list[str]:
1057 return list(self._data.keys())
1058
1059 def get_key_value(self, key: str) -> Any:
1060 return self._data.get(key, 0)
1061
1062 def __repr__(self) -> str:
1063 return repr(self._data)
1064
1065
1066# ---------------------------------------------------------------------------

Callers 3

test_statistics_keysMethod · 0.90

Calls

no outgoing calls

Tested by 3

test_statistics_keysMethod · 0.72