compiled-knowledge 4.0.0a22__cp312-cp312-win_amd64.whl → 4.0.0a24__cp312-cp312-win_amd64.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 (33) hide show
  1. ck/circuit/_circuit_cy.c +50 -60
  2. ck/circuit/_circuit_cy.cp312-win_amd64.pyd +0 -0
  3. ck/circuit/_circuit_cy.pyx +1 -1
  4. ck/circuit/_circuit_py.py +1 -1
  5. ck/circuit_compiler/circuit_compiler.py +3 -2
  6. ck/circuit_compiler/cython_vm_compiler/_compiler.c +179 -170
  7. ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win_amd64.pyd +0 -0
  8. ck/circuit_compiler/cython_vm_compiler/_compiler.pyx +3 -3
  9. ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py +14 -7
  10. ck/circuit_compiler/interpret_compiler.py +35 -4
  11. ck/circuit_compiler/llvm_vm_compiler.py +9 -3
  12. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c +1 -1
  13. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win_amd64.pyd +0 -0
  14. ck/circuit_compiler/support/llvm_ir_function.py +18 -1
  15. ck/pgm.py +100 -102
  16. ck/pgm_compiler/pgm_compiler.py +1 -1
  17. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c +1 -1
  18. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win_amd64.pyd +0 -0
  19. ck/pgm_compiler/support/join_tree.py +3 -3
  20. ck/probability/empirical_probability_space.py +4 -3
  21. ck/probability/pgm_probability_space.py +7 -3
  22. ck/probability/probability_space.py +21 -15
  23. ck/program/raw_program.py +40 -7
  24. ck/sampling/sampler_support.py +8 -5
  25. ck_demos/ace/simple_ace_demo.py +18 -0
  26. ck_demos/getting_started/__init__.py +0 -0
  27. ck_demos/getting_started/simple_demo.py +18 -0
  28. ck_demos/programs/demo_raw_program_dump.py +17 -0
  29. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a24.dist-info}/METADATA +1 -1
  30. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a24.dist-info}/RECORD +33 -29
  31. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a24.dist-info}/WHEEL +0 -0
  32. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a24.dist-info}/licenses/LICENSE.txt +0 -0
  33. {compiled_knowledge-4.0.0a22.dist-info → compiled_knowledge-4.0.0a24.dist-info}/top_level.txt +0 -0
@@ -13,7 +13,7 @@
13
13
  "/O2"
14
14
  ],
15
15
  "include_dirs": [
16
- "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-0p_rjbh1\\Lib\\site-packages\\numpy\\_core\\include"
16
+ "C:\\Users\\runneradmin\\AppData\\Local\\Temp\\build-env-b7kylfcw\\Lib\\site-packages\\numpy\\_core\\include"
17
17
  ],
18
18
  "name": "ck.pgm_compiler.support.circuit_table._circuit_table_cy",
19
19
  "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,20 @@ 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
+ Condition.__doc__ = \
15
+ """
16
+ Type defining a condition. A condition is logically a set of
17
+ indicators, each indicator representing a random variable being in some state.
18
+
19
+ If multiple indicators of the same random variable appear in
20
+ a condition, then they are interpreted as
21
+ a disjunction, otherwise indicators are interpreted as
22
+ a conjunction. E.g., the condition (X=0, Y=1, Y=3) means
23
+ X=0 and (Y=1 or Y=3).
24
+ """
25
+
26
+ _NAN: float = np.nan # Not-a-number (i.e., the result of an invalid calculation).
18
27
 
19
28
 
20
29
  class ProbabilitySpace(ABC):
@@ -41,13 +50,9 @@ class ProbabilitySpace(ABC):
41
50
  """
42
51
  Return the weight of instances matching the given condition.
43
52
 
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
53
  Args:
50
- condition: zero or more indicators that specify a condition.
54
+ condition: a condition restricting the instances that are
55
+ considered in the result.
51
56
  """
52
57
 
53
58
  @property
@@ -56,6 +61,7 @@ class ProbabilitySpace(ABC):
56
61
  """
57
62
  Return the summed weight of all instances.
58
63
  This is equivalent to self.wmc(), with no arguments.
64
+ This is also known as the "partition function".
59
65
  """
60
66
 
61
67
  def probability(self, *indicators: Indicator, condition: Condition = ()) -> float:
@@ -80,11 +86,11 @@ class ProbabilitySpace(ABC):
80
86
  if len(condition) == 0:
81
87
  z = self.z
82
88
  if z <= 0:
83
- return np.nan
89
+ return _NAN
84
90
  else:
85
91
  z = self.wmc(*condition)
86
92
  if z <= 0:
87
- return np.nan
93
+ return _NAN
88
94
 
89
95
  # Combine the indicators with the condition
90
96
  # If a variable is mentioned in both the indicators and condition, then
@@ -617,6 +623,6 @@ def _normalise_marginal(distribution: NDArrayFloat64) -> None:
617
623
  """
618
624
  total = np.sum(distribution)
619
625
  if total <= 0:
620
- distribution[:] = np.nan
626
+ distribution[:] = _NAN
621
627
  elif total != 1:
622
628
  distribution /= total
ck/program/raw_program.py CHANGED
@@ -21,7 +21,11 @@ class RawProgram:
21
21
  A raw program is returned by a circuit compiler to provide execution of
22
22
  the function defined by a compiled circuit.
23
23
 
24
- A `RawProgram` is a `Callable` with the signature:
24
+ A `RawProgram` is a `Callable`; given an array of input variable values,
25
+ return a numpy array of result values. Calling a RawProgram is not necessarily
26
+ an efficient method for executing a program as buffers are reallocated for
27
+ each call. Alternatively, a `RawProgram` can be wrapped in a `ProgramBuffer`
28
+ for computationally efficient memory buffer reuse.
25
29
 
26
30
  Fields:
27
31
  function: is a function of three ctypes arrays, returning nothing.
@@ -40,19 +44,33 @@ class RawProgram:
40
44
  number_of_results: int
41
45
  var_indices: Sequence[int]
42
46
 
43
- def __call__(self, in_vars: NDArrayNumeric | Sequence[int | float]) -> NDArrayNumeric:
47
+ def __call__(self, var_values: NDArrayNumeric | Sequence[int | float] | int | float) -> NDArrayNumeric:
44
48
  """
45
- Call the raw program as a function from an array to an array.
49
+ Call the raw program as a function. This method will allocate numpy arrays of type `self.dtype`
50
+ for input, temporary, and output values. If `var_values` is a numpy array of the needed
51
+ dtype then it will be used directly.
52
+
53
+ Args:
54
+ var_values: the input variable values. This can be a numpy array, a Python sequence of
55
+ floats or int, or a single float or int. The number of input values must equal
56
+ `self.number_of_vars`.
57
+
58
+ Returns:
59
+ a numpy array of result values with shape `(self.number_of_results,)`.
46
60
  """
47
61
  array_vars: NDArrayNumeric
48
62
  if isinstance(vars, np.ndarray):
49
- array_vars = in_vars
63
+ if var_values.dtype != self.dtype:
64
+ array_vars = var_values.astype(self.dtype)
65
+ else:
66
+ array_vars = self.dtype
67
+ elif isinstance(vars, (int, float)):
68
+ array_vars = np.array([var_values], dtype=self.dtype)
50
69
  else:
51
- array_vars = np.array(in_vars, dtype=self.dtype)
70
+ array_vars = np.array(var_values, dtype=self.dtype)
71
+
52
72
  if array_vars.shape != (self.number_of_vars,):
53
73
  raise ValueError(f'input array incorrect shape: got {array_vars.shape} expected ({self.number_of_vars},)')
54
- if array_vars.dtype != self.dtype:
55
- raise ValueError(f'input array incorrect dtype: got {array_vars.dtype} expected {self.dtype}')
56
74
 
57
75
  array_tmps: NDArrayNumeric = np.zeros(self.number_of_tmps, dtype=self.dtype)
58
76
  array_outs: NDArrayNumeric = np.zeros(self.number_of_results, dtype=self.dtype)
@@ -64,3 +82,18 @@ class RawProgram:
64
82
 
65
83
  self.function(c_array_vars, c_array_tmps, c_array_outs)
66
84
  return array_outs
85
+
86
+ def dump(self, *, prefix: str = '', indent: str = ' ') -> None:
87
+ """
88
+ Print a dump of the PGM.
89
+ This is intended for demonstration and debugging purposes.
90
+
91
+ Args:
92
+ prefix: optional prefix for indenting all lines.
93
+ indent: additional prefix to use for extra indentation.
94
+ """
95
+ print(f'{prefix}{self.__class__.__name__}')
96
+ print(f'{prefix}signature = [{self.number_of_vars}] -> [{self.number_of_results}]')
97
+ print(f'{prefix}temps = {self.number_of_tmps}')
98
+ print(f'{prefix}dtype = {self.dtype}')
99
+ print(f'{prefix}var_indices = {self.var_indices}')
@@ -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,13 @@ 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
+ YieldF.__doc__ = \
15
+ """
16
+ Type of a yield function. Support for a sampler.
17
+ A yield function may be used to implement a sampler's iterator, thus
18
+ it provides an Instance or single state index.
19
+ """
17
20
 
18
21
 
19
22
  @dataclass
@@ -0,0 +1,18 @@
1
+ from ck import example
2
+ from ck.pgm import RVMap
3
+ from ck.pgm_circuit.wmc_program import WMCProgram
4
+ from ck.pgm_compiler import NamedPGMCompiler
5
+
6
+ # create the example "Cancer" Bayesian network
7
+ pgm = example.Cancer()
8
+
9
+ # compile the PGM and construct an object for probabilistic queries
10
+ wmc = WMCProgram(NamedPGMCompiler.ACE(pgm))
11
+
12
+ # provide easy access to the random variables - not needed but simplifies this demo
13
+ rvs = RVMap(pgm)
14
+
15
+ # get the probability of having cancer given that pollution is high
16
+ pr = wmc.probability(rvs.cancer('True'), condition=rvs.pollution('high'))
17
+
18
+ print('probability of having cancer given that pollution is high =', pr)
File without changes
@@ -0,0 +1,18 @@
1
+ from ck import example
2
+ from ck.pgm import RVMap
3
+ from ck.pgm_circuit.wmc_program import WMCProgram
4
+ from ck.pgm_compiler import DEFAULT_PGM_COMPILER
5
+
6
+ # create the example "Cancer" Bayesian network
7
+ pgm = example.Cancer()
8
+
9
+ # compile the PGM and construct an object for probabilistic queries
10
+ wmc = WMCProgram(DEFAULT_PGM_COMPILER(pgm))
11
+
12
+ # provide easy access to the random variables - not needed but simplifies this demo
13
+ rvs = RVMap(pgm)
14
+
15
+ # get the probability of having cancer given that pollution is high
16
+ pr = wmc.probability(rvs.cancer('True'), condition=rvs.pollution('high'))
17
+
18
+ print('probability of having cancer given that pollution is high =', pr)
@@ -0,0 +1,17 @@
1
+ from ck.circuit import Circuit
2
+ from ck.circuit_compiler import NamedCircuitCompiler
3
+
4
+
5
+ def main() -> None:
6
+ cct = Circuit()
7
+ a, b, c, d = cct.new_vars(4)
8
+ top = a * b + c * d + 56.23
9
+
10
+ for compiler in NamedCircuitCompiler:
11
+ raw_program = compiler(top)
12
+ raw_program.dump()
13
+ print()
14
+
15
+
16
+ if __name__ == '__main__':
17
+ main()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compiled-knowledge
3
- Version: 4.0.0a22
3
+ Version: 4.0.0a24
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,29 +1,29 @@
1
1
  ck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ck/pgm.py,sha256=Uwo2A4qEtgwmKkma1HOsozn837435zEN9JUByYlfe-w,120701
2
+ ck/pgm.py,sha256=PjRTOot-4_FAxEnJsJ0aZVflwq-INQCn8H8kmS5WTDU,120828
3
3
  ck/circuit/__init__.py,sha256=klUR7OVESf53-8Ho4f32clHFsR2SOz4XgwZzfDlms88,418
4
- ck/circuit/_circuit_cy.c,sha256=zBsA_-1MY4IpO1kF4xOPtIjp8AkCCmbYSw7hm9NQxC4,1742373
5
- ck/circuit/_circuit_cy.cp312-win_amd64.pyd,sha256=Te7ZttUIpLYmP7ihkRWnwQxnXOgT41RxmoOctV9x-8Q,242688
4
+ ck/circuit/_circuit_cy.c,sha256=TmbBc9Mxkor12-JjNH5snykGG7I-oIpd8ddd6e7EzSM,1741715
5
+ ck/circuit/_circuit_cy.cp312-win_amd64.pyd,sha256=wBCFtYAS9YyCmr4x5n2jqTY1VH5LMjFpRskfair7UU8,242688
6
6
  ck/circuit/_circuit_cy.pxd,sha256=F1WU4KuX_knXQX-hwNKoHsoUK3fJLbLOxEnomWMJFpI,1057
7
- ck/circuit/_circuit_cy.pyx,sha256=RGfHGBj3XibLw4S5CC6FVnXOHjpzU0_aoVowqIY2qzA,27773
8
- ck/circuit/_circuit_py.py,sha256=vN8lg01RyjA_YUphjx1dr0Uj4ql4seczRcoCaH7ylAw,28341
7
+ ck/circuit/_circuit_cy.pyx,sha256=TIjqsdyN_IzOm9XQw26kEURpL6GSL1kJO3K-UUlkbQc,27763
8
+ ck/circuit/_circuit_py.py,sha256=gQZoEphxut2UyBL0ZqmNc8KlNBSMST_VOCqOpDMIRSM,28331
9
9
  ck/circuit/tmp_const.py,sha256=dG9FuGfoAG5qjYG1rNwekqKiea_KmVfxHMTOgCPbBiQ,2372
10
10
  ck/circuit_compiler/__init__.py,sha256=T0Igyp5jPgnIXv4oRcIYhmsOdcNOb3L4Za6dK6eYk7g,132
11
- ck/circuit_compiler/circuit_compiler.py,sha256=8BLB8DUnPbpl5PXZsIopydPbItytdn2rzRfM2U1EC84,1018
12
- ck/circuit_compiler/interpret_compiler.py,sha256=7PjtEFNR0JMw56XaYP9IZ5ZNZTTLYCUUDiMDj7cN5f8,7373
11
+ ck/circuit_compiler/circuit_compiler.py,sha256=xujLh120_G7AGJpv-IZTI4S1TpNf4gzHilaqvlKvfXA,1148
12
+ ck/circuit_compiler/interpret_compiler.py,sha256=KMzLzIV-BU5l8GQ2833kjios4sbGSVUm4ero7MEYvVk,8786
13
13
  ck/circuit_compiler/llvm_compiler.py,sha256=6RHUCVWCOgt3ZNyjRTl2Z2npYJMWyAFJVAIc5SAx2mY,14023
14
- ck/circuit_compiler/llvm_vm_compiler.py,sha256=I46_XV5FrClDKO06zIjn8T3ME5XQ9RYJ_1aAE8e_YzM,21873
14
+ ck/circuit_compiler/llvm_vm_compiler.py,sha256=XJhiAZmGMRRz49XUfng9lgETxVw6NgD6XCI0H3fX-1E,22200
15
15
  ck/circuit_compiler/named_circuit_compilers.py,sha256=snlD3JnhAZC-atKpf5GD0v4CGdvj2_ZhCZ3O-tsxzxc,2284
16
16
  ck/circuit_compiler/cython_vm_compiler/__init__.py,sha256=pEAwTleuZgdYhTAQMea2f9YsFK54eoNbZSbrWkW8aeE,49
17
- ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=ly19gSYNgnEmyrrAjQooVL1BMULN5_IoyHNYZlEEJWQ,870540
18
- ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win_amd64.pyd,sha256=q95-GArE8rbjvDGoXSHHPga0vYtXopGoPgqRwW01k48,103424
19
- ck/circuit_compiler/cython_vm_compiler/_compiler.pyx,sha256=QS6FG5z-ay9fnUTCMwtJm89I3QpfY6RqS874zHvZrBA,13225
20
- ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py,sha256=WywW6uhoyP-U5hWdF1amsE8fhbP9LbDtWTu2wVFkR2k,4066
17
+ ck/circuit_compiler/cython_vm_compiler/_compiler.c,sha256=cvKLhF9XYKtj0bN1lY82dXhXNNPpBGGTVqkfQu32wYg,871325
18
+ ck/circuit_compiler/cython_vm_compiler/_compiler.cp312-win_amd64.pyd,sha256=ODZp6PGDw4tE5pr8rfJCMdtNaDz3-Finmw_sC4ghThw,103936
19
+ ck/circuit_compiler/cython_vm_compiler/_compiler.pyx,sha256=550r0AkOh8ZuuTRy3e6Aq-YqBQ82EKcap8e6f3zlEuM,13278
20
+ ck/circuit_compiler/cython_vm_compiler/cython_vm_compiler.py,sha256=3Q-HCyA7VWFoXS9gn-k4LXedzqHPvdFNvWHfDcKYv6s,4473
21
21
  ck/circuit_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  ck/circuit_compiler/support/input_vars.py,sha256=x6krN6sW9A-vZTteY4M4on_0vS4ChaaCcmnXcnQ4y0s,4812
23
- ck/circuit_compiler/support/llvm_ir_function.py,sha256=7SoYEQiBS2GHFknw0raH0ouJyBQmYp-ZydJVEXVo0Uw,7779
23
+ ck/circuit_compiler/support/llvm_ir_function.py,sha256=f4gD591d8cytln4vY9Lxw_cJrSyQJ3iHES49eN44eec,8612
24
24
  ck/circuit_compiler/support/circuit_analyser/__init__.py,sha256=RbyIObAAb-w0Ky4fB198xAfxTh2doquN9ez68SZSZgo,536
25
- ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=uVBuaWzBVkkYIIkVGikKWR839DGW9ytriP6a2yEPEFQ,448751
26
- ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win_amd64.pyd,sha256=kdIx89qPFfdUa15ADpVAFoc-3OHjdbXU7S9U1Dna6Ds,54272
25
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c,sha256=pdGWGzEsPqJnlEmI1J58ccSXslpZHsdOXA39lvIZCv4,448751
26
+ ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.cp312-win_amd64.pyd,sha256=CxuhRaCWVCsCP0tjh4Ga_0x_bPB6olb-0OLlvH1ctJ4,54272
27
27
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.pyx,sha256=ctDOHOjnUhdsR_XHBrgchFVTImLhsEUjU3cqkP-GdF8,3331
28
28
  ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_py.py,sha256=eWjc2B946LeSzcGa9PyI4XQvlx_B1KPEiQuM6OOFjjQ,3086
29
29
  ck/example/__init__.py,sha256=BXVxvTcl3tqgai-xJiGQIaG_ChlpPRdfWg985MQ7dwM,1744
@@ -80,7 +80,7 @@ ck/pgm_circuit/support/compile_circuit.py,sha256=krsTlZxLk_RHZL0qoRVAjyW78Zk2HZi
80
80
  ck/pgm_compiler/__init__.py,sha256=XCK1AWBBB9UYi6kbFnxMFzBL9a25EWfHnz_yn3ZKYuM,112
81
81
  ck/pgm_compiler/factor_elimination.py,sha256=6iMh_NdOQh4D5cuo8q1y7yUuj3glnM9I0OJ9vlJAGqU,13807
82
82
  ck/pgm_compiler/named_pgm_compilers.py,sha256=sI-dwF7mht6aEuVfsN3sIO_4oH7RrjIt5x9ZlBwVQys,3376
83
- ck/pgm_compiler/pgm_compiler.py,sha256=F44PtlwqMG0FS6KzOYKZuyZT6olWAVtBH-QXZPzz4O8,616
83
+ ck/pgm_compiler/pgm_compiler.py,sha256=rhbICo7eAY9_dlGfg937zZal7hoc4slTvhxsob-6h_E,622
84
84
  ck/pgm_compiler/recursive_conditioning.py,sha256=U0NdIns8yLQtYR_MOf1w__CChpOMDlgRCL2nFRhtnzU,7936
85
85
  ck/pgm_compiler/variable_elimination.py,sha256=irAZ5b0vRGL_WGq7UrfQpMXhYBZO5YI2U_jf1-YV92Q,3547
86
86
  ck/pgm_compiler/ace/__init__.py,sha256=Rud883H68yz2Dw-NkiiTPC6rmii6hHKMHbtiU6_liug,97
@@ -88,26 +88,26 @@ ck/pgm_compiler/ace/ace.py,sha256=iyDacqArXW1cVP6tBabxRmmLWIHabuPkCoq2tWBm2ww,10
88
88
  ck/pgm_compiler/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
89
  ck/pgm_compiler/support/clusters.py,sha256=BzMmPWXBEXPvp9dZAuzA19Gbt4j9d-tdQuFbfwXD6MU,21504
90
90
  ck/pgm_compiler/support/factor_tables.py,sha256=tV9qE2zC8iwEQxTuXE6qiE6lmMpz4-Vc80_w5woo1tk,15556
91
- ck/pgm_compiler/support/join_tree.py,sha256=OGAuZVHzT0i4e6TJ03dOM7e3gbpuW9AyjZKvSBvKvJA,12894
91
+ ck/pgm_compiler/support/join_tree.py,sha256=Chkyyo--ChgWEsDqTh8RCxPN7Z1NyvL--GjTC4ONvkY,12897
92
92
  ck/pgm_compiler/support/named_compiler_maker.py,sha256=g2MLnlkWXkISHL6dh23EY53SptTo7-itfuZogSpMdB8,1420
93
93
  ck/pgm_compiler/support/circuit_table/__init__.py,sha256=yJ05NvuNE9j0E_QnjDzHYfLqcHn5TdOleEpG3wSRgXQ,579
94
- ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=4wnwUtsxyHGV0YSTzWOZn6bux4RhaK_zPdZxBY8C9io,730350
95
- ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win_amd64.pyd,sha256=tWzEiXDAOYHg5Cr6ViUHj6rEni89PNa148w1pJpTJSk,97280
94
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c,sha256=MklGnlFKB1kN5kZFFJAy4owEjxAk0TI2BLYJwKYP90I,730350
95
+ ck/pgm_compiler/support/circuit_table/_circuit_table_cy.cp312-win_amd64.pyd,sha256=fGHb7UbvWxVEWJS1ZnPCyAV6G54RQm8YAY2EyfIOEdM,97280
96
96
  ck/pgm_compiler/support/circuit_table/_circuit_table_cy.pyx,sha256=rVO1yxjZmZ6yv5s0zKq4Ji9WYrDuYTZsRG_zeF1_1xE,12015
97
97
  ck/pgm_compiler/support/circuit_table/_circuit_table_py.py,sha256=h6xPYGBSy6XHQBFLPD2D1-V7Kiw9utY68nWrcGRMEg4,11287
98
98
  ck/probability/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
99
- ck/probability/empirical_probability_space.py,sha256=HoLxmigzlWFWQlcZQwDOYk-mjgf6RW1IPE-l0t8vMPw,1950
100
- ck/probability/pgm_probability_space.py,sha256=vK-drx145PWW2aYB8HttQcvhvqPfxVl72bPcFO8jw8M,1034
101
- ck/probability/probability_space.py,sha256=itv3dNEpSTLhKg6JCNhe7Iy6n9MKWqeKO4RxKR9kKF0,25882
99
+ ck/probability/empirical_probability_space.py,sha256=aLUdmN98KpmgZjuO4QXqcMkK9GmF-Btvoj1SwK_gSQI,2029
100
+ ck/probability/pgm_probability_space.py,sha256=Slmp0mwDMoVh_86Y8L1QjAQsneazcK2VGQcRW8O2C3M,1267
101
+ ck/probability/probability_space.py,sha256=36_lCk3gVBU0i5SyCt2BBYoDhWnFxroaScObzmN9EYw,26172
102
102
  ck/program/__init__.py,sha256=Ss9-0eqsGxCGloD6liH-0iqBG5Q3vPRF4XCw2hkDJ0M,110
103
103
  ck/program/program.py,sha256=gDJ5Q2kXZuaoHboa9yNTg0tQH9S-Gmw0BRx6PPV28pU,4184
104
104
  ck/program/program_buffer.py,sha256=1fiUcT7sqyr4vu8jXzK3ZsrgURFhWMdm6hr2BeS9ONA,5665
105
- ck/program/raw_program.py,sha256=94D74Vz5Hu8p3JYNKT9kflXHuj0jscNBoX4O5Ug7G8A,2623
105
+ ck/program/raw_program.py,sha256=J8jbyhc1X9PxX5DFMFeIIRHbh65JTkAxFRbjVjzxz7s,4257
106
106
  ck/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
107
  ck/sampling/forward_sampler.py,sha256=pTtpaH_ONH67G4P-aJ1p8YZSaXr4TTD6pj3ZEI2y7KM,8348
108
108
  ck/sampling/marginals_direct_sampler.py,sha256=p1jDr1stG2Hjay3D8hILezW-5YZTX1p3odUcJDAI-OQ,4466
109
109
  ck/sampling/sampler.py,sha256=qhfguy8rnVQBVVXhJylvh-8Kq7rfHW62a3DEtv9v7Xc,2306
110
- ck/sampling/sampler_support.py,sha256=beFJ993yXyvy5y2T7tJmK638ESp3qvErFWoM3BEwD5E,9742
110
+ ck/sampling/sampler_support.py,sha256=z--w6ZaJwy0lBWTzYC0SR80-i8vjZ5XFlZqo2F4QPqQ,9808
111
111
  ck/sampling/uniform_sampler.py,sha256=NCN1T77v4g4hsdNgIsZDxHBndfj4AghLSk8WKQt_2a0,2586
112
112
  ck/sampling/wmc_direct_sampler.py,sha256=7qiz-bRlQ59ZBJmg0bEG0y63pXTVXNVx4d410BGhnJg,7265
113
113
  ck/sampling/wmc_gibbs_sampler.py,sha256=GMKVW2AVtsWtP6vxE3Y2dy-dKr7GoO_vLEA9eC304fo,6567
@@ -126,12 +126,15 @@ ck_demos/all_demos.py,sha256=E1SZDvG0l_j1PfHZLemHocezw10uY5uGl3yE3BX87DE,2556
126
126
  ck_demos/ace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
127
  ck_demos/ace/copy_ace_to_ck.py,sha256=TJHPGcUbd1a6OjH3Fw7c3fno8ULPbf5p3V_lBmiNR-k,303
128
128
  ck_demos/ace/demo_ace.py,sha256=Ve_0Ho-jeOrfpFAV-XBSW_jxcWqFYeCQyo_VQd3Aik4,1458
129
+ ck_demos/ace/simple_ace_demo.py,sha256=cC1ZHiq5VbF1LmIjyYaHlUnku_3wP5FJ3sa537x-0xU,664
129
130
  ck_demos/circuit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
130
131
  ck_demos/circuit/demo_circuit_dump.py,sha256=CQC5cxXaaRuVZ3d8h-SqXs8EJo0Tm5H5l7T9ad6pyEk,458
131
132
  ck_demos/circuit/demo_derivatives.py,sha256=3JoWVAEKLEoLjq6QzWkq4Z-qVq1l0tHvGDn5erVuozc,1186
132
133
  ck_demos/circuit_compiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
134
  ck_demos/circuit_compiler/compare_circuit_compilers.py,sha256=IEzwvKt6c8wrmAyd6F0sUaNaWYEx1BBFQhRyDt7cibI,756
134
135
  ck_demos/circuit_compiler/show_llvm_program.py,sha256=HKUuyLfBjH6ZgD8l4gQWVSBPUh55ZCXjPa7ZEdm5OyU,712
136
+ ck_demos/getting_started/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
+ ck_demos/getting_started/simple_demo.py,sha256=AR40OtUVd-CJOxFlsu8_RtGLL2LLnZg506SzrIx7OQA,668
135
138
  ck_demos/pgm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
139
  ck_demos/pgm/demo_pgm_dump.py,sha256=egcjSjMDJdyzxWGvHrgdF_g3CFYozLKv4XSXzvSfWbg,248
137
140
  ck_demos/pgm/demo_pgm_dump_stress.py,sha256=L9S3yp0EQM56kWztV4A6XzEqITOGbThImZIU0JofCDg,285
@@ -159,6 +162,7 @@ ck_demos/programs/demo_program_buffer.py,sha256=2XuBE15PmJOtdsyzqlq_LgHrYPj59_Ej
159
162
  ck_demos/programs/demo_program_multi.py,sha256=8mTZycb5onaDKThLOvoR9oeCdWD8k8K0hVIKxCxMkq0,624
160
163
  ck_demos/programs/demo_program_none.py,sha256=PDo3Ua0j-g8GXrAfLt3oWa2H-_cTMvo_7GwNimCRaNc,480
161
164
  ck_demos/programs/demo_program_single.py,sha256=CVbipru3BxUGol565MY3Q_G0z4GLNnSrgFMw58ilU0Q,598
165
+ ck_demos/programs/demo_raw_program_dump.py,sha256=A8eNKxK618FxAVnMMMOdvSz_nwZEaDUvuQKoey6w9dA,370
162
166
  ck_demos/programs/demo_raw_program_interpreted.py,sha256=iPbGXsj8ZQl4RMIZZBF7oDHEEnAl31kIilQFPcqSA98,528
163
167
  ck_demos/programs/demo_raw_program_llvm.py,sha256=a3V85jgyqrCBJpBmfVWpY9Nx5l0WhfvzgIXEdCcxRXA,523
164
168
  ck_demos/sampling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -171,8 +175,8 @@ ck_demos/utils/compare.py,sha256=Bwjpflevl4nusfA0zp96rInaVKFGuhC5Xv7HzA1Fobk,508
171
175
  ck_demos/utils/convert_network.py,sha256=TSKj8q7L7J5rhrvwjaDkdYZ0Sg8vV5FRL_vCanX1CQw,1363
172
176
  ck_demos/utils/sample_model.py,sha256=in-Nlv-iuNIu6y9fDuMyo7nzgimBuTAnCWcpnVqvqDQ,8839
173
177
  ck_demos/utils/stop_watch.py,sha256=VzXHRWx0V8vPSD-bLgLlEYkCkR2FA0-KmM_pfKx-Pxo,13205
174
- compiled_knowledge-4.0.0a22.dist-info/licenses/LICENSE.txt,sha256=uMYx7tmroEKNASizbCOwPveMQsD5UErLDC1_SANmNn8,1089
175
- compiled_knowledge-4.0.0a22.dist-info/METADATA,sha256=eJdp11Ps62kBb4jFBn6-ROz4TIXeWGBJFDoq49vzO7g,1838
176
- compiled_knowledge-4.0.0a22.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
177
- compiled_knowledge-4.0.0a22.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
178
- compiled_knowledge-4.0.0a22.dist-info/RECORD,,
178
+ compiled_knowledge-4.0.0a24.dist-info/licenses/LICENSE.txt,sha256=uMYx7tmroEKNASizbCOwPveMQsD5UErLDC1_SANmNn8,1089
179
+ compiled_knowledge-4.0.0a24.dist-info/METADATA,sha256=AVKPNHhibL3GdHqdsIO0Stn2FfxPTSiYsQ03YjNAoTk,1838
180
+ compiled_knowledge-4.0.0a24.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
181
+ compiled_knowledge-4.0.0a24.dist-info/top_level.txt,sha256=Cf8DAfd2vcnLiA7HlxoduOzV0Q-8surE3kzX8P9qdks,12
182
+ compiled_knowledge-4.0.0a24.dist-info/RECORD,,