compiled-knowledge 4.0.0a23__cp312-cp312-macosx_11_0_arm64.whl → 4.0.0a25__cp312-cp312-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of compiled-knowledge might be problematic. Click here for more details.

Files changed (34) hide show
  1. ck/circuit/_circuit_cy.c +1 -1
  2. ck/circuit/_circuit_cy.cpython-312-darwin.so +0 -0
  3. ck/circuit/tmp_const.py +5 -4
  4. ck/circuit_compiler/circuit_compiler.py +3 -2
  5. ck/circuit_compiler/cython_vm_compiler/_compiler.c +152 -152
  6. ck/circuit_compiler/cython_vm_compiler/_compiler.cpython-312-darwin.so +0 -0
  7. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c +1 -1
  8. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cpython-312-darwin.so +0 -0
  9. ck/circuit_compiler/support/llvm_ir_function.py +4 -4
  10. ck/example/diamond_square.py +3 -1
  11. ck/example/triangle_square.py +3 -1
  12. ck/example/truss.py +3 -1
  13. ck/in_out/parse_net.py +21 -19
  14. ck/in_out/parser_utils.py +7 -3
  15. ck/pgm.py +146 -139
  16. ck/pgm_circuit/mpe_program.py +3 -4
  17. ck/pgm_circuit/pgm_circuit.py +27 -18
  18. ck/pgm_circuit/program_with_slotmap.py +4 -1
  19. ck/pgm_compiler/pgm_compiler.py +1 -1
  20. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c +1 -1
  21. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cpython-312-darwin.so +0 -0
  22. ck/pgm_compiler/support/join_tree.py +3 -3
  23. ck/probability/empirical_probability_space.py +4 -3
  24. ck/probability/pgm_probability_space.py +7 -3
  25. ck/probability/probability_space.py +20 -15
  26. ck/program/raw_program.py +23 -16
  27. ck/sampling/sampler_support.py +7 -5
  28. ck/utils/iter_extras.py +3 -2
  29. ck/utils/local_config.py +16 -8
  30. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/METADATA +1 -1
  31. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/RECORD +34 -34
  32. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/WHEEL +0 -0
  33. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/licenses/LICENSE.txt +0 -0
  34. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/top_level.txt +0 -0
@@ -16,33 +16,42 @@ class PGMCircuit:
16
16
  holds the values of the parameters. Specifically, given parameter id `param_id`, then
17
17
  `parameter_values[slot_map[param_id] - number_of_indicators]` is the value of the
18
18
  identified parameter as it was in the PGM.
19
-
20
- Fields:
21
- rvs: holds the random variables from the PGM as it was compiled, in order.
22
-
23
- conditions: any conditions on `rvs` that were compiled into the circuit.
24
-
25
- number_of_indicators: is the number of indicators in `rvs` which is
26
- `sum(len(rv) for rv in rvs`. Specifically, `circuit.vars[i]` is the circuit variable
27
- corresponding to the ith indicator, where `circuit` is `circuit_top.circuit` and
28
- indicators are ordered as per `rvs`.
29
-
30
- number_of_parameters: is the number of parameters from the PGM that are
31
- represented as circuit variables. This may be zero if parameters from the PGM
32
- were compiled as constants.
33
-
34
- slot_map[x]: gives the index of the circuit variable corresponding to x,
35
- where x is either a random variable indicator (Indicator) or a parameter id (ParamId).
36
-
37
19
  """
38
20
 
39
21
  rvs: Sequence[RandomVariable]
22
+ """holds the random variables from the PGM as it was compiled, in order."""
23
+
40
24
  conditions: Sequence[Indicator]
25
+ """any conditions on `rvs` that were compiled into the circuit."""
26
+
41
27
  circuit_top: CircuitNode
28
+ """the top circuit node defining the network function."""
29
+
42
30
  number_of_indicators: int
31
+ """
32
+ the number of indicators in `rvs` which is
33
+ `sum(len(rv) for rv in rvs`. Specifically, `circuit.vars[i]` is the circuit variable
34
+ corresponding to the ith indicator, where `circuit` is `circuit_top.circuit` and
35
+ indicators are ordered as per `rvs`.
36
+ """
37
+
43
38
  number_of_parameters: int
39
+ """
40
+ the number of parameters from the PGM that are
41
+ represented as circuit variables. This may be zero if parameters from the PGM
42
+ were compiled as constants.
43
+ """
44
+
44
45
  slot_map: SlotMap
46
+ """
47
+ gives the index of the circuit variable corresponding to x,
48
+ where x is either a random variable indicator (Indicator) or a parameter id (ParamId).
49
+ """
50
+
45
51
  parameter_values: NDArray
52
+ """
53
+ parameter values, co-indexed with the circuit variables, counting beyond `number_of_indicators`.
54
+ """
46
55
 
47
56
  def dump(self, *, prefix: str = '', indent: str = ' ') -> None:
48
57
  """
@@ -114,7 +114,10 @@ class ProgramWithSlotmap:
114
114
 
115
115
  def compute_conditioned(self, *condition: Condition) -> NDArrayNumeric:
116
116
  """
117
- Equivalent to:
117
+ Compute the program value, after setting the given condition.
118
+
119
+ Equivalent to::
120
+
118
121
  self.set_condition(*condition)
119
122
  return self.compute()
120
123
  """
@@ -7,7 +7,7 @@ from ck.pgm_circuit import PGMCircuit
7
7
  class PGMCompiler(Protocol):
8
8
  def __call__(self, pgm: PGM, *, const_parameters: bool = True) -> PGMCircuit:
9
9
  """
10
- A PGM compiler is a function with this signature.
10
+ A PGM compiler compiles a PGM to an arithmetic circuit.
11
11
 
12
12
  Args:
13
13
  pgm: The PGM to compile.
@@ -15,7 +15,7 @@
15
15
  "-O3"
16
16
  ],
17
17
  "include_dirs": [
18
- "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-x_3zb_va/lib/python3.12/site-packages/numpy/_core/include"
18
+ "/private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-q2xes9a1/lib/python3.12/site-packages/numpy/_core/include"
19
19
  ],
20
20
  "name": "ck.pgm_compiler.support.circuit_table._circuit_table_cy",
21
21
  "sources": [
@@ -192,7 +192,7 @@ def _make_spanning_tree_small_root(cost: NDArrayFloat64, clusters: List[Set[int]
192
192
  Returns:
193
193
  (spanning_tree, root_index)
194
194
 
195
- spanning_tree: is a spanning tree represented as a list of nodes, the list is coindexed with
195
+ spanning_tree: is a spanning tree represented as a list of nodes, the list is co-indexed with
196
196
  the given cost matrix, each node is a list of children, each child being
197
197
  represented as an index into the list of nodes.
198
198
 
@@ -219,7 +219,7 @@ def _make_spanning_tree_arbitrary_root(cost: NDArrayFloat64) -> Tuple[List[List[
219
219
  Returns:
220
220
  (spanning_tree, root_index)
221
221
 
222
- spanning_tree: is a spanning tree represented as a list of nodes, the list is coindexed with
222
+ spanning_tree: is a spanning tree represented as a list of nodes, the list is co-indexed with
223
223
  the given cost matrix, each node is a list of children, each child being
224
224
  represented as an index into the list of nodes.
225
225
 
@@ -243,7 +243,7 @@ def _make_spanning_tree_at_root(
243
243
  root_custer_index: a nominated root cluster to be the root of the tree.
244
244
 
245
245
  Returns:
246
- a spanning tree represented as a list of nodes, the list is coindexed with
246
+ a spanning tree represented as a list of nodes, the list is co-indexed with
247
247
  the given cost matrix, each node is a list of children, each child being
248
248
  represented as an index into the list of nodes. The root node is the
249
249
  index `root_custer_index` as passed to this function.
@@ -1,4 +1,4 @@
1
- from typing import Sequence, Iterable, Tuple, Dict, List
1
+ from typing import Sequence, Iterable, Tuple, Dict
2
2
 
3
3
  from ck.pgm import RandomVariable, Indicator, Instance
4
4
  from ck.probability.probability_space import ProbabilitySpace, Condition, check_condition
@@ -10,6 +10,8 @@ class EmpiricalProbabilitySpace(ProbabilitySpace):
10
10
  Enable probabilistic queries over a sample from a sample space.
11
11
  Note that this is not necessarily an efficient approach to calculating probabilities and statistics.
12
12
 
13
+ This probability space treats each of the samples as equally weighted.
14
+
13
15
  Assumes:
14
16
  len(sample) == len(rvs), for each sample in samples.
15
17
  0 <= sample[i] < len(rvs[i]), for each sample in samples, for i in range(len(rvs)).
@@ -19,7 +21,7 @@ class EmpiricalProbabilitySpace(ProbabilitySpace):
19
21
  samples: instances (state indexes) that are samples from the given rvs.
20
22
  """
21
23
  self._rvs: Sequence[RandomVariable] = tuple(rvs)
22
- self._samples: List[Instance] = list(samples)
24
+ self._samples: Sequence[Instance] = tuple(samples)
23
25
  self._rv_idx_to_sample_idx: Dict[int, int] = {
24
26
  rv.idx: i
25
27
  for i, rv in enumerate(self._rvs)
@@ -47,4 +49,3 @@ class EmpiricalProbabilitySpace(ProbabilitySpace):
47
49
  @property
48
50
  def z(self) -> float:
49
51
  return len(self._samples)
50
-
@@ -1,6 +1,6 @@
1
- from typing import Sequence, Iterable, Tuple, Dict, List
1
+ from typing import Sequence, Tuple
2
2
 
3
- from ck.pgm import RandomVariable, Indicator, Instance, PGM
3
+ from ck.pgm import RandomVariable, Indicator, PGM
4
4
  from ck.probability.probability_space import ProbabilitySpace, Condition, check_condition
5
5
 
6
6
 
@@ -12,6 +12,11 @@ class PGMProbabilitySpace(ProbabilitySpace):
12
12
 
13
13
  Args:
14
14
  pgm: The PGM to query.
15
+
16
+ Warning:
17
+ The resulting probability space assumes that the value of the partition
18
+ function, `z`, remains constant for the lifetime of the PGM. If the value
19
+ changes, then probabilities and statistics will be incorrect.
15
20
  """
16
21
  self._pgm = pgm
17
22
  self._z = None
@@ -29,4 +34,3 @@ class PGMProbabilitySpace(ProbabilitySpace):
29
34
  if self._z is None:
30
35
  self._z = self._pgm.value_product_indicators()
31
36
  return self._z
32
-
@@ -1,10 +1,7 @@
1
- """
2
- An abstract class for object providing probabilities.
3
- """
4
1
  import math
5
2
  from abc import ABC, abstractmethod
6
3
  from itertools import chain
7
- from typing import Sequence, Tuple, Iterable, Callable
4
+ from typing import Sequence, Tuple, Iterable, Callable, TypeAlias
8
5
 
9
6
  import numpy as np
10
7
 
@@ -13,8 +10,19 @@ from ck.utils.iter_extras import combos as _combos
13
10
  from ck.utils.map_set import MapSet
14
11
  from ck.utils.np_extras import dtype_for_number_of_states, NDArrayFloat64, DTypeStates, NDArrayNumeric
15
12
 
16
- # Type defining a condition.
17
- Condition = None | Indicator | Iterable[Indicator]
13
+ Condition: TypeAlias = None | Indicator | Iterable[Indicator]
14
+ """
15
+ Type defining a condition. A condition is logically a set of
16
+ indicators, each indicator representing a random variable being in some state.
17
+
18
+ If multiple indicators of the same random variable appear in
19
+ a condition, then they are interpreted as
20
+ a disjunction, otherwise indicators are interpreted as
21
+ a conjunction. E.g., the condition (X=0, Y=1, Y=3) means
22
+ X=0 and (Y=1 or Y=3).
23
+ """
24
+
25
+ _NAN: float = np.nan # Not-a-number (i.e., the result of an invalid calculation).
18
26
 
19
27
 
20
28
  class ProbabilitySpace(ABC):
@@ -41,13 +49,9 @@ class ProbabilitySpace(ABC):
41
49
  """
42
50
  Return the weight of instances matching the given condition.
43
51
 
44
- If multiple indicators of the same random variable appear in
45
- the parameter 'indicators' then they are interpreted as
46
- a disjunction, otherwise indicators are interpreted as
47
- a conjunction. E.g.: X=0, Y=1, Y=3 means X=0 and (Y=1 or Y=3)
48
-
49
52
  Args:
50
- condition: zero or more indicators that specify a condition.
53
+ condition: a condition restricting the instances that are
54
+ considered in the result.
51
55
  """
52
56
 
53
57
  @property
@@ -56,6 +60,7 @@ class ProbabilitySpace(ABC):
56
60
  """
57
61
  Return the summed weight of all instances.
58
62
  This is equivalent to self.wmc(), with no arguments.
63
+ This is also known as the "partition function".
59
64
  """
60
65
 
61
66
  def probability(self, *indicators: Indicator, condition: Condition = ()) -> float:
@@ -80,11 +85,11 @@ class ProbabilitySpace(ABC):
80
85
  if len(condition) == 0:
81
86
  z = self.z
82
87
  if z <= 0:
83
- return np.nan
88
+ return _NAN
84
89
  else:
85
90
  z = self.wmc(*condition)
86
91
  if z <= 0:
87
- return np.nan
92
+ return _NAN
88
93
 
89
94
  # Combine the indicators with the condition
90
95
  # If a variable is mentioned in both the indicators and condition, then
@@ -617,6 +622,6 @@ def _normalise_marginal(distribution: NDArrayFloat64) -> None:
617
622
  """
618
623
  total = np.sum(distribution)
619
624
  if total <= 0:
620
- distribution[:] = np.nan
625
+ distribution[:] = _NAN
621
626
  elif total != 1:
622
627
  distribution /= total
ck/program/raw_program.py CHANGED
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import Callable, Sequence
2
+ from typing import Callable, Sequence, TypeAlias
3
3
 
4
4
  import numpy as np
5
5
  import ctypes as ct
@@ -7,12 +7,14 @@ import ctypes as ct
7
7
 
8
8
  from ck.utils.np_extras import NDArrayNumeric, DTypeNumeric
9
9
 
10
- # RawProgramFunction is a function of three ctypes arrays, returning nothing.
11
- # Args:
12
- # [0]: input values,
13
- # [1]: temporary working memory,
14
- # [2]: output values.
15
- RawProgramFunction = Callable[[ct.POINTER, ct.POINTER, ct.POINTER], None]
10
+ RawProgramFunction: TypeAlias = Callable[[ct.POINTER, ct.POINTER, ct.POINTER], None]
11
+ """
12
+ RawProgramFunction is a function of three ctypes arrays, returning nothing.
13
+ Args:
14
+ [0]: input values,
15
+ [1]: temporary working memory,
16
+ [2]: output values.
17
+ """
16
18
 
17
19
 
18
20
  @dataclass
@@ -26,23 +28,28 @@ class RawProgram:
26
28
  an efficient method for executing a program as buffers are reallocated for
27
29
  each call. Alternatively, a `RawProgram` can be wrapped in a `ProgramBuffer`
28
30
  for computationally efficient memory buffer reuse.
29
-
30
- Fields:
31
- function: is a function of three ctypes arrays, returning nothing.
32
- dtype: the numpy data type of the array values.
33
- number_of_vars: the number of input values (first function argument).
34
- number_of_tmps: the number of working memory values (second function argument).
35
- number_of_results: the number of result values (third function argument).
36
- var_indices: maps the index of inputs (from 0 to self.number_of_vars - 1) to the index
37
- of the corresponding circuit var.
38
31
  """
39
32
 
40
33
  function: RawProgramFunction
34
+ """a function of three ctypes arrays, returning nothing."""
35
+
41
36
  dtype: DTypeNumeric
37
+ """the numpy data type of the array values."""
38
+
42
39
  number_of_vars: int
40
+ """the number of input values (first function argument)."""
41
+
43
42
  number_of_tmps: int
43
+ """the number of working memory values (second function argument)."""
44
+
44
45
  number_of_results: int
46
+ """the number of result values (third function argument)."""
47
+
45
48
  var_indices: Sequence[int]
49
+ """
50
+ a map from the index of inputs (from 0 to self.number_of_vars - 1) to the index
51
+ of the corresponding circuit var.
52
+ """
46
53
 
47
54
  def __call__(self, var_values: NDArrayNumeric | Sequence[int | float] | int | float) -> NDArrayNumeric:
48
55
  """
@@ -1,6 +1,6 @@
1
1
  from dataclasses import dataclass
2
2
  from itertools import count
3
- from typing import Callable, Sequence, Optional, Set, Tuple, Dict, Collection
3
+ from typing import Callable, Sequence, Optional, Set, Tuple, Dict, Collection, TypeAlias
4
4
 
5
5
  from ck.pgm import Instance, RandomVariable, Indicator
6
6
  from ck.pgm_circuit.program_with_slotmap import ProgramWithSlotmap
@@ -10,10 +10,12 @@ from ck.utils.map_set import MapSet
10
10
  from ck.utils.np_extras import NDArrayStates, NDArrayNumeric
11
11
  from ck.utils.random_extras import Random
12
12
 
13
- # Type of a yield function. Support for a sampler.
14
- # A yield function may be used to implement a sampler's iterator, thus
15
- # it provides an Instance or single state index.
16
- YieldF = Callable[[NDArrayStates], int] | Callable[[NDArrayStates], Instance]
13
+ YieldF: TypeAlias = Callable[[NDArrayStates], int] | Callable[[NDArrayStates], Instance]
14
+ """
15
+ Type of a yield function. Support for a sampler.
16
+ A yield function may be used to implement a sampler's iterator, thus
17
+ it provides an Instance or single state index.
18
+ """
17
19
 
18
20
 
19
21
  @dataclass
ck/utils/iter_extras.py CHANGED
@@ -33,11 +33,12 @@ def combos(list_of_lists: Sequence[Sequence[_T]], flip=False) -> Iterable[Tuple[
33
33
  Iterate over all combinations of taking one element from each of the lists.
34
34
 
35
35
  The order of results has the first element changing most rapidly.
36
- For example, given [[1,2,3],[4,5],[6,7]], combos yields the following:
36
+ For example, given [[1,2,3],[4,5],[6,7]], combos yields the following::
37
+
37
38
  (1,4,6), (2,4,6), (3,4,6), (1,5,6), (2,5,6), (3,5,6),
38
39
  (1,4,7), (2,4,7), (3,4,7), (1,5,7), (2,5,7), (3,5,7).
39
40
 
40
- If flip, then the last changes most rapidly.
41
+ If `flip` is true, then the last changes most rapidly.
41
42
  """
42
43
  num = len(list_of_lists)
43
44
  if num == 0:
ck/utils/local_config.py CHANGED
@@ -12,10 +12,13 @@ other getter methods wrap `get`.
12
12
 
13
13
  The `get` method will search for a value for a requested variable
14
14
  using the following steps.
15
+
15
16
  1) Check the `programmatic config` which is a dictionary that
16
- can be directly updated.
17
+ can be directly updated.
18
+
17
19
  2) Check the PYTHONPATH for a module called `config` (i.e., a
18
- `config.py` file) for global variables defined in that module.
20
+ `config.py` file) for global variables defined in that module.
21
+
19
22
  3) Check the system environment variables (`os.environ`).
20
23
 
21
24
  Variable names must be a valid Python identifier. Only valid
@@ -171,8 +174,9 @@ def get_params(
171
174
  are returned as a single string with `delim` as the delimiter. If
172
175
  `delim` is not None then the default value for `sep` is '='.
173
176
 
174
- For example, assume config.py contains: ABC = 123 and DEF = 456,
175
- then:
177
+ For example, assume `config.py` contains: `ABC = 123` and `DEF = 456`,
178
+ then::
179
+
176
180
  get_params('ABC') -> ('ABC', 123)
177
181
  get_params('ABC', 'DEF') -> ('ABC', 123), ('DEF', 456)
178
182
  get_params('ABC', sep='=') = 'ABC=123'
@@ -180,10 +184,14 @@ def get_params(
180
184
  get_params('ABC;DEF', delim=';') = 'ABC=123;DEF=456'
181
185
  get_params('ABC;DEF', sep='==', delim=';') = 'ABC==123;DEF==456'
182
186
 
183
- :param keys: the names of variables to access.
184
- :param sep: the separator character between {variable} and {value}.
185
- :param delim: the delimiter character between key-value pairs.
186
- :param config: a Config instance to update. Default is the global config.
187
+ Args:
188
+ keys: the names of variables to access.
189
+ sep: the separator character between {variable} and {value}.
190
+ delim: the delimiter character between key-value pairs.
191
+ config: a Config instance to update. Default is the global config.
192
+
193
+ Returns:
194
+ the requested parameter values.
187
195
  """
188
196
  if delim is not None:
189
197
  keys = flatten(key.split(delim) for key in keys)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compiled-knowledge
3
- Version: 4.0.0a23
3
+ Version: 4.0.0a25
4
4
  Summary: A Python package for compiling and querying discrete probabilistic graphical models.
5
5
  Author-email: Barry Drake <barry@compiledknowledge.org>
6
6
  License-Expression: MIT
@@ -1,8 +1,3 @@
1
- compiled_knowledge-4.0.0a23.dist-info/RECORD,,
2
- compiled_knowledge-4.0.0a23.dist-info/WHEEL,sha256=V1loQ6TpxABu1APUg0MoTRBOzSKT5xVc3skizX-ovCU,136
3
- compiled_knowledge-4.0.0a23.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
4
- compiled_knowledge-4.0.0a23.dist-info/METADATA,sha256=gDe8xbB6tGtwczawUBO3R8EHKau7yc8dzdDEpZXfPTk,1788
5
- compiled_knowledge-4.0.0a23.dist-info/licenses/LICENSE.txt,sha256=-LmkmqXKYojmS3zDxXAeTbsA82fnHA0KaRvpfIoEdjA,1068
6
1
  ck_demos/all_demos.py,sha256=tqnMFbW6t1F4ksErf6QYTz9XtvbfayWl35lD3Bjm47E,2468
7
2
  ck_demos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
3
  ck_demos/circuit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -57,22 +52,27 @@ ck_demos/pgm_inference/demo_inferencing_mpe_cancer.py,sha256=hS9U2kyqjFgJ8jnVBtT
57
52
  ck_demos/pgm_inference/demo_inferencing_wmc_and_mpe_sprinkler.py,sha256=-q4Z1Fzf7-BuwVFTFXdGRY-zUNrY-SAU7ooaov2o_lM,5128
58
53
  ck_demos/getting_started/simple_demo.py,sha256=hiYscNnfkEwHCQ3ymXAswAYO5jAKR7cseb36pjzuus8,650
59
54
  ck_demos/getting_started/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
- ck/pgm.py,sha256=T7ZXWEgn93uh8mf-FxOgkPY8RgabBCUg2lpKoQmhGMU,117226
55
+ compiled_knowledge-4.0.0a25.dist-info/RECORD,,
56
+ compiled_knowledge-4.0.0a25.dist-info/WHEEL,sha256=V1loQ6TpxABu1APUg0MoTRBOzSKT5xVc3skizX-ovCU,136
57
+ compiled_knowledge-4.0.0a25.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
58
+ compiled_knowledge-4.0.0a25.dist-info/METADATA,sha256=3UADMUodWIyLwYZohmV72rNQzjNVc3nOIoD8iqOkZDU,1788
59
+ compiled_knowledge-4.0.0a25.dist-info/licenses/LICENSE.txt,sha256=-LmkmqXKYojmS3zDxXAeTbsA82fnHA0KaRvpfIoEdjA,1068
60
+ ck/pgm.py,sha256=xKDGCG4Qo4slnKB-EsdBk1ob2k8NXYt45Lpjmo9TsO4,117505
61
61
  ck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  ck/pgm_circuit/target_marginals_program.py,sha256=qWz9FkAFzt8YHLZJzPkpRnvDH76BXm-dcEWhoqCkrOw,3665
63
63
  ck/pgm_circuit/slot_map.py,sha256=pqN0t5ElmUjR7SzvzldQwnO-jjRIz1rNZHH1PzE-V88,822
64
- ck/pgm_circuit/mpe_program.py,sha256=haYfD7pw9nP7biqNfmWRS3LkbvZcJfDNe5rZpkWMQoA,10008
65
- ck/pgm_circuit/program_with_slotmap.py,sha256=HQNxLTYdxb1noAjyzvX3LknI9vT2RPk5UmYF__fn9Jg,8723
64
+ ck/pgm_circuit/mpe_program.py,sha256=uDOykbBIbvvDQtxXOgBj6gzoehq1AfaQzZIWW3rMZnY,9990
65
+ ck/pgm_circuit/program_with_slotmap.py,sha256=5ktYdAAEn_dku91D5lSb_MV2I6oPcGbPT8W1ZK-a8FY,8796
66
66
  ck/pgm_circuit/__init__.py,sha256=FctIFEYdL1pwxFMMEEu5Rwgq3kjPar-vJTqAmgIqb-I,36
67
67
  ck/pgm_circuit/marginals_program.py,sha256=E-L-4Rc2YLs3ndXIfXpTxUYGEFJG1_BkaZVDBs9gcgQ,14434
68
68
  ck/pgm_circuit/wmc_program.py,sha256=Btq7jUot-PodWXrgDFaE6zhUtr6GPUNF217CVLTaB70,12376
69
- ck/pgm_circuit/pgm_circuit.py,sha256=VBgHk7uDNYiElesEQxdmlU2iRn0bfHYWik2Cb6t838g,3208
69
+ ck/pgm_circuit/pgm_circuit.py,sha256=XBXANPREwp5Cl8P0x5XuG9besOJV5DjVxtNkqyt2DK8,3287
70
70
  ck/pgm_circuit/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  ck/pgm_circuit/support/compile_circuit.py,sha256=56KsI01Ww3gSHnqoTt81kzdHgbFTmHwVeB3jEajipHs,3179
72
- ck/probability/probability_space.py,sha256=gjH8la8ZGegWTYetpY16XdbwqEniqy-CiqoDFWRLzkM,25260
73
- ck/probability/pgm_probability_space.py,sha256=o-IVo-PfM-Qu1BZ8xatpFhmaa7SZztnck569FHSdTNo,1002
72
+ ck/probability/probability_space.py,sha256=TTNSe6z40hs94kLBR_YHNjjRvBGVI86tza-CU2FKd9M,25482
73
+ ck/probability/pgm_probability_space.py,sha256=9al9sZk2LGvnTITvxS8x_ntabHKhaliUW-6JUeAEEl4,1231
74
74
  ck/probability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
- ck/probability/empirical_probability_space.py,sha256=839eEJi9AW4U9KGzAo-_K-4Ae2M5tdijzMvbYPCO9c0,1900
75
+ ck/probability/empirical_probability_space.py,sha256=ojEMLKVy9Qf-Vi803B9KWARCySIWwf4rt23--mpAxD0,1978
76
76
  ck/example/survey.py,sha256=ubjM8EP7aQMQbx7XFMaXvSYBOPuUDHeyG6wZIlRDqD8,1565
77
77
  ck/example/pathfinder.py,sha256=rQckvasnbzBYYESxngE_xbhyXxoJlELeiYc6Ghh7iFk,2257125
78
78
  ck/example/run.py,sha256=nYfC_prwCRBN0uawLvrRVsl5IFag9VrQ5x_hhWmr-18,964
@@ -81,7 +81,7 @@ ck/example/asia.py,sha256=vS81n-qyhHscW8yG__9TQvDHLI-s6y6gaDetfOKMvFw,1267
81
81
  ck/example/clique.py,sha256=c3bATknqkD3QJztHQffgyL6_WzupWUpLSnI-EIEndqg,1055
82
82
  ck/example/mildew.py,sha256=Hfn_nQUhZVK6wFzNgxjD8HgzxgGxU1TWTZcWUrN3tDU,1792796
83
83
  ck/example/chain.py,sha256=aPlqMtqWO2BOz1WLXFtVwT3uPKN2E2Z7a7TSPvtloQU,1313
84
- ck/example/truss.py,sha256=7SM16u6rJVrWIPKRWVTJve13XNnb_CKta4_iIv_sXzY,1925
84
+ ck/example/truss.py,sha256=KgYka1OwoZ_9wRvtCPzI2SkiB22crch_wpZzAYQiRNc,1928
85
85
  ck/example/insurance.py,sha256=XRycrk8YBLxv5cQXWd4uIWW5fHhD1_Le9XKdNz_yJA4,31204
86
86
  ck/example/sachs.py,sha256=X-2stEbTlnV9hGuo2u6z19jqxJ2mFcIvDQfQnWGuKvc,5678
87
87
  ck/example/empty.py,sha256=RU3kjIrWSCBoqK_XZqk82GhI-0blu1dzM32UtGe5Y0Q,172
@@ -99,21 +99,21 @@ ck/example/munin.py,sha256=IZvZrVXDi2Zeu0M-nWIpIbzQu-U0cv0Be6dz960L5lo,1657227
99
99
  ck/example/child.py,sha256=qb3cOJms_Bzdfgk0aDrHwfFjjBojCfAYQnorv3p3rQM,7612
100
100
  ck/example/hailfinder.py,sha256=7M-J0XqFeNxK-TsdbOYu-GX581oM7wY1INEvTTSwqfs,38866
101
101
  ck/example/student.py,sha256=WayCWuMCrE0YSXez-a8TuptS53R6PBG2argyCsas7mc,1290
102
- ck/example/triangle_square.py,sha256=4JpB-p9hBfCz3Jn1sOKb5qlp5W04Kqm0rdHk2KuZ4lQ,2094
102
+ ck/example/triangle_square.py,sha256=mzl04AqaTkLNo0NU0dZYAh-sBMZbNqpOcdi_Dd1ZgMM,2097
103
103
  ck/example/sprinkler.py,sha256=t8RIiPorf3QXYyTXbxFkSrK1SsG5ALWmTfTsFUq2C_c,938
104
- ck/example/diamond_square.py,sha256=HqGqmInYTpAsCBuz3s8FuhT2Jnc11L3wGCTgJDmFLjw,2722
104
+ ck/example/diamond_square.py,sha256=ic8adEomQHMFlGQ3gMYGEja0LxEla8KEQKhET0XpULs,2725
105
105
  ck/example/rain.py,sha256=kLTU_9f_-_yy0ymPnS9-cbFVT6fYyCanDgszk3vQOgc,1187
106
106
  ck/example/cancer.py,sha256=-FnLbfb9yxriLl97N5BDZ0VrDZ5UnOWlT-Ep_tzO6QI,1698
107
- ck/circuit/_circuit_cy.c,sha256=kermLDIHi6yS0k1TOUJyem1DpI8xsldsRnzsMsYU-Tw,1704292
107
+ ck/circuit/_circuit_cy.c,sha256=fvJ3vmBfUEy0qlO5tvNe4BxHNQ39BZa04Na_RThFMoY,1704292
108
108
  ck/circuit/_circuit_cy.pyx,sha256=mER1HK5yyf4UAj9ibn7fUQNyXwoxwxp7PClULPhY9B4,26995
109
109
  ck/circuit/__init__.py,sha256=B1jwDE_Xb6hOQE8DecjaTVotOnDxJaT7jsvPfGDXqCU,401
110
110
  ck/circuit/_circuit_cy.pxd,sha256=ZcW8xjw4oGQqD5gwz73GXc1H8NxpdAswFWzc2CUWWcA,1025
111
111
  ck/circuit/_circuit_py.py,sha256=hADjCFDC1LJKUdyiKZzNLFt7ZkUNJ0IYwEYRj594K4g,27495
112
- ck/circuit/tmp_const.py,sha256=wgi4P3xrTRLPXNMmWYpYaJWlm-lekQOdxg4rkXZC3Wk,2298
113
- ck/circuit/_circuit_cy.cpython-312-darwin.so,sha256=7-UJeNOgci0GpUay5i5nO4cs9xO7rgbTv1EyTxOSdeA,335296
112
+ ck/circuit/tmp_const.py,sha256=q01bkIvTEg1l-qFcfl2B8NrSzKlqcWU7McNm4HKv7bU,2300
113
+ ck/circuit/_circuit_cy.cpython-312-darwin.so,sha256=g3lVq7Z0zUurgUdyrvRGGCkQfNSXZwlh8uvSz1DpOGk,335296
114
114
  ck/sampling/wmc_metropolis_sampler.py,sha256=jfXb-MG0jAoMyepgq9zel2amqK-gmYrCtKuxJStl8VY,6305
115
115
  ck/sampling/wmc_direct_sampler.py,sha256=Pkv-u4GjN3npBrcQ92raoTrEIel1vpiDoE8LrlcfYJE,7094
116
- ck/sampling/sampler_support.py,sha256=SQytIhr3qlIcNjYu9cF7sAxhjiXFLlCwPlsMIOJVH1c,9510
116
+ ck/sampling/sampler_support.py,sha256=AD47QPXlXSTiy7Jm-adD6US3cYeSwBimOY2jB5b2qn4,9534
117
117
  ck/sampling/wmc_rejection_sampler.py,sha256=Kk7hDvfnI37CQhFlAW2-UoxtoSbQBoMesghMlwrX6_Y,4782
118
118
  ck/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  ck/sampling/marginals_direct_sampler.py,sha256=S4kfmvgPfh_dyn-D2WumrH6SMvLc6sFF7fRswGOS1gA,4353
@@ -125,17 +125,17 @@ ck/utils/random_extras.py,sha256=l9CfQM6k-b6KGESJXw9zF--Hqp4yadw2IU9uSoklai0,179
125
125
  ck/utils/map_set.py,sha256=T5E3j4Lz08vg8eviRBc-4F10xz1-CKIg6KiHVoGhdts,3681
126
126
  ck/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
127
  ck/utils/tmp_dir.py,sha256=Emln4TIyO-cFrhgcpoH10awakJoRgoDCVgwFKmt1-So,2574
128
- ck/utils/iter_extras.py,sha256=9BQpCKltbM_hcMIPFfJhqvWSvY2Mz3vzXdoSbfezR5k,4316
128
+ ck/utils/iter_extras.py,sha256=61I4xnFfZD9biC8VAqYRCdh4B2q5BRI6xDQ9jjpQv4E,4328
129
129
  ck/utils/np_extras.py,sha256=3wqIJ8Lc4CCpcKmzDiIOtzslW_IFw9HYUC2QaYYN-mM,1701
130
- ck/utils/local_config.py,sha256=RsP1QwIINw3F7KFVeJEML0Zul3Pm4YEkadVENfqHE6I,9265
130
+ ck/utils/local_config.py,sha256=9b7KAA1-HIjOORa6Z-L90dCKWg0-ZGBmsjYtr1cBwQU,9322
131
131
  ck/utils/map_list.py,sha256=0UkTDg-ZlWkuxiM-1OhaUYh5MRgMz0rAppDtE2RryEY,3719
132
132
  ck/pgm_compiler/__init__.py,sha256=Ga0dTOetOovHwNN4WS-o4fyyh7255xL0bUTdK29p2LY,110
133
133
  ck/pgm_compiler/recursive_conditioning.py,sha256=vdDSrMO1yPQHNlLQha5ybg3a7l1SiygsmniI_pQhU-Q,7705
134
134
  ck/pgm_compiler/named_pgm_compilers.py,sha256=TIgr2aqNYTzwlNqQJ3wgWDiW0gLplU24tpKgmWR7XuE,3316
135
- ck/pgm_compiler/pgm_compiler.py,sha256=VRGxWcnXgyXd1Twusw8tm1Yqv1VFPmb2LBsOu4UZv8k,597
135
+ ck/pgm_compiler/pgm_compiler.py,sha256=gI2fhV6GcCP9oPYz2o7qMRtG4AaS8b7lQLRJKmdclFw,603
136
136
  ck/pgm_compiler/factor_elimination.py,sha256=A6pwSJZ3tBNXqrYcp8WXNn86nbwTkOiAzlx6STcqqqI,13412
137
137
  ck/pgm_compiler/variable_elimination.py,sha256=R3dV9Mbw8u2rf7wJ2upGiy1QKjc65gFAOEYCDaD3sZ8,3456
138
- ck/pgm_compiler/support/join_tree.py,sha256=_rNmjp2OjP6aa-IBr4sMwOSnY0tZC1zleHdql4bhn1Q,12562
138
+ ck/pgm_compiler/support/join_tree.py,sha256=vla1lKQ3WM2LxTiuCR0LNm82qVfqPcz8q3j6UvBLyQc,12565
139
139
  ck/pgm_compiler/support/factor_tables.py,sha256=0EKJC0YU8h9J8oFpd6JSjDDooNCaNmIwiQQs7ovrGWY,15150
140
140
  ck/pgm_compiler/support/clusters.py,sha256=r1Z8b4IvXMfY5xeyg5AHoU3TxUI0yNDvh3Xkvj8FDF8,20932
141
141
  ck/pgm_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -143,16 +143,16 @@ ck/pgm_compiler/support/named_compiler_maker.py,sha256=Qz8a9gwY46Q3dtRCZEZ2czq5z
143
143
  ck/pgm_compiler/support/circuit_table/__init__.py,sha256=1kWjAZR5Rj6PYNdbCEbuyE2VtIDQU4Qf-3HPFzBlezs,562
144
144
  ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx,sha256=Fsjw8P9clKQioqlLyr1JirUK5oYkeotpDMy5sMo7Khk,11683
145
145
  ck/pgm_compiler/support/circuit_table/_circuit_table_py.py,sha256=OZJC-JGX3ovCSv7nJtNYq7735KZ2eb4TQOlZdZbhPmk,10983
146
- ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=I99NbkY8OWiHNG978hQgxQW75qVEXHNyUlglOcccFJA,714044
147
- ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cpython-312-darwin.so,sha256=I_voa6GdQ_Quk96PoYhOJt1sbjuvXeKCcFmHeHxEAh4,165096
146
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=YQZjLxxViwc3UR7g_b8toemdlrquFx1UZuf1ITSKhk0,714044
147
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cpython-312-darwin.so,sha256=BSjoYXVlCvrOoFihv6nVJ8jQ1ssCtSnRa9M9kD3G1Oc,165096
148
148
  ck/pgm_compiler/ace/ace.py,sha256=An83dHxE_gQFcEs6H5qgm0PlNFnJSGGuvLJNC2H3hGU,10098
149
149
  ck/pgm_compiler/ace/__init__.py,sha256=5HWep-yL1Mr6z5VWEaIYpLumCdeso85J-l_-hQaVusM,96
150
- ck/program/raw_program.py,sha256=aUYLEcK8mstDspz6M9wOE1W7TrnDNBmJjPtfIVA3CLw,4158
150
+ ck/program/raw_program.py,sha256=U7kLBCSLtP1CfG09RrzmGo7E3sZdNr7wr2V1qkTfVGc,4106
151
151
  ck/program/program_buffer.py,sha256=IHwAHTKIaUlhcbNFTuSxPWKyExIsOxxX6ffUn4KfheU,5485
152
152
  ck/program/__init__.py,sha256=Rifdxk-l6cCjXLpwc6Q0pVXNDsllAwaFlRqRx3cURho,107
153
153
  ck/program/program.py,sha256=ohsnE0CEy8O4q8uGB_YEjoJKAPhY1Mz_a08Z7fy7TLw,4047
154
154
  ck/circuit_compiler/llvm_compiler.py,sha256=SFhfrthrDuAYUjH_DYRD7FBU8eg2db5T4QGBGfoewnw,13635
155
- ck/circuit_compiler/circuit_compiler.py,sha256=bb-SG8xrcp4y2nCNB0GIWcgOufEsR2Nb52qtrLMHTVs,992
155
+ ck/circuit_compiler/circuit_compiler.py,sha256=Sl7FS42GXrDL6eG_WNKILcSQl7Wlccgs5Dd1l0EZMsU,1121
156
156
  ck/circuit_compiler/__init__.py,sha256=eRN6chBEt64PK5e6EFGyBNZBn6BXhXb6R3m12zPA1Qg,130
157
157
  ck/circuit_compiler/named_circuit_compilers.py,sha256=paKyG876tdG_bdSHJU6KW5HxQrutmV_T80GPpz8A65s,2227
158
158
  ck/circuit_compiler/interpret_compiler.py,sha256=tZirNkAOe7evvray4-wOqO-KdaI39qRFEI0xD6IRBY0,8531
@@ -160,20 +160,20 @@ ck/circuit_compiler/llvm_vm_compiler.py,sha256=rM_6F5st3k9X5K1_MwzKJwDhQo1794voo
160
160
  ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py,sha256=GdtBkipud8vylXYArOJvZ-10U9L_PL0oJrkyrnFGH2Q,4345
161
161
  ck/circuit_compiler/cython_vm_compiler/__init__.py,sha256=ks0sISOJ-XHIHgHnESyFsheNWvcSJQkbsrj1wVlnzTE,48
162
162
  ck/circuit_compiler/cython_vm_compiler/_compiler.pyx,sha256=RssdkoAcB3Ahes8xisqFy0PQyOPmC3GLEC2xR-miQaE,12898
163
- ck/circuit_compiler/cython_vm_compiler/_compiler.cpython-312-darwin.so,sha256=vZH0jjcVIutMnWnJn3895m4ord0Gragcz_TxJvxN2VQ,163488
164
- ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=npJssDTeghG-2xRm_yIOA_-O4fWNMmJQsYyFbLuYYKs,857789
165
- ck/circuit_compiler/support/llvm_ir_function.py,sha256=1uC4gAu2g1nl9lycMN2sM7FMI_h4iJG_ufZ3Gc3rMA8,8361
163
+ ck/circuit_compiler/cython_vm_compiler/_compiler.cpython-312-darwin.so,sha256=8WLjKps3LQn1i7rONAlZNmG0aUkimVgNm1iUnX5VbCs,163488
164
+ ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=NRPVxlw7Ay-ZQiCg7Pzue-T9Oj837Klt4CjXW7U74nA,857789
165
+ ck/circuit_compiler/support/llvm_ir_function.py,sha256=sMLKfwz90YcsrVyxsuY0Ymo1ibFOcul4Qiwdake-VkI,8321
166
166
  ck/circuit_compiler/support/input_vars.py,sha256=EZrvyhD9XVtf5GuDBluFNWhAOVixP7-_ETxAHLTpBcs,4664
167
167
  ck/circuit_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
168
168
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx,sha256=a0fKmkwRNscJmy6qoO2AOqJYmHYptrQmkRSrDg3G-wg,3233
169
169
  ck/circuit_compiler/support/circuit_analyser/__init__.py,sha256=WhNwfg7GHVeI4k_m7owPGWxX0MyZg_wtcp2MA07qbWg,523
170
- ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cpython-312-darwin.so,sha256=8LZvLB-ijTyXMb1TS6OYFR1fzCfAFlAbZyF2bDBsJSI,104936
171
- ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=zI2h572_2OGeEE-6Wtuj8RCUw_a6lUEjUPegh_YUb20,438223
170
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cpython-312-darwin.so,sha256=ogFiwfH_pKuVwLas5jfEIMlG_YZ7HU0VtOL1Ox-RtC4,104936
171
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=lwzEGaGx7L5VgoT5H6-1QCWkuI85lkCM7ujYqhwARNc,438223
172
172
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py,sha256=CMdXV6Rot5CCoK1UsurQdGK0UOx_09B6V7mCc_6-gfI,2993
173
173
  ck/in_out/render_net.py,sha256=VePvN6aYWuzEkW-Hv-qGT9QneOvsnrBMmS_KYueuj2I,4970
174
174
  ck/in_out/render_bugs.py,sha256=c39KbaD4gEiauFsZq2KUhDEEa-3cuY5kuvz97pEWVpw,3272
175
- ck/in_out/parse_net.py,sha256=AtgSkLFI6HDcVnmxZ5CP0C5Q4GZL9lcySDIK9uSvY_c,13822
176
- ck/in_out/parser_utils.py,sha256=HV9cYw_-zxHN7fUBs4wG2A4Zl5P4YEAuSLGQRFNWV9c,5255
175
+ ck/in_out/parse_net.py,sha256=ITTI_nG8W8ZR2Y578BkcWYEx4tAQPHd_TaFe6AP8SAQ,13825
176
+ ck/in_out/parser_utils.py,sha256=tWMiytVeKO8_48hzvt9Lq0TnN0yOB2rtRTjXZQAEmi8,5378
177
177
  ck/in_out/__init__.py,sha256=3sLg8hHG_AWEJ7Kn06ZziFbVBUybKVTUPZCyqhr2qAw,109
178
178
  ck/in_out/parse_ace_lmap.py,sha256=UqZpkW1yNXNpdLEcMeXlve6tataaFuKP7caoKysQ8pE,7675
179
179
  ck/in_out/render_pomegranate.py,sha256=tU7iDHkLWTJyFrxPa2LbZnD06qia8mG2FGi0aZAKuk0,5580