compiled-knowledge 4.0.0a23__cp312-cp312-musllinux_1_2_x86_64.whl → 4.0.0a25__cp312-cp312-musllinux_1_2_x86_64.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 (31) hide show
  1. ck/circuit/_circuit_cy.c +1 -1
  2. ck/circuit/tmp_const.py +5 -4
  3. ck/circuit_compiler/circuit_compiler.py +3 -2
  4. ck/circuit_compiler/cython_vm_compiler/_compiler.c +152 -152
  5. ck/circuit_compiler/cython_vm_compiler/_compiler.cpython-312-x86_64-linux-musl.so +0 -0
  6. ck/circuit_compiler/support/circuit_analyser/_circuit_analyser_cy.c +1 -1
  7. ck/circuit_compiler/support/llvm_ir_function.py +4 -4
  8. ck/example/diamond_square.py +3 -1
  9. ck/example/triangle_square.py +3 -1
  10. ck/example/truss.py +3 -1
  11. ck/in_out/parse_net.py +21 -19
  12. ck/in_out/parser_utils.py +7 -3
  13. ck/pgm.py +146 -139
  14. ck/pgm_circuit/mpe_program.py +3 -4
  15. ck/pgm_circuit/pgm_circuit.py +27 -18
  16. ck/pgm_circuit/program_with_slotmap.py +4 -1
  17. ck/pgm_compiler/pgm_compiler.py +1 -1
  18. ck/pgm_compiler/support/circuit_table/_circuit_table_cy.c +1 -1
  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 +20 -15
  23. ck/program/raw_program.py +23 -16
  24. ck/sampling/sampler_support.py +7 -5
  25. ck/utils/iter_extras.py +3 -2
  26. ck/utils/local_config.py +16 -8
  27. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/METADATA +1 -1
  28. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/RECORD +31 -31
  29. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/WHEEL +0 -0
  30. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/licenses/LICENSE.txt +0 -0
  31. {compiled_knowledge-4.0.0a23.dist-info → compiled_knowledge-4.0.0a25.dist-info}/top_level.txt +0 -0
ck/circuit/_circuit_cy.c CHANGED
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  ],
12
12
  "include_dirs": [
13
- "/tmp/build-env-cfss913n/lib/python3.12/site-packages/numpy/_core/include"
13
+ "/tmp/build-env-ayvl3h7l/lib/python3.12/site-packages/numpy/_core/include"
14
14
  ],
15
15
  "name": "ck.circuit._circuit_cy",
16
16
  "sources": [
ck/circuit/tmp_const.py CHANGED
@@ -10,15 +10,16 @@ class TmpConst:
10
10
  A TmpConst enables the consistent, temporary setting and clearing
11
11
  of circuit variables to constant values.
12
12
 
13
- Example usage:
13
+ Example usage::
14
+
14
15
  with TmpConst(my_circuit) as tmp:
15
16
  tmp.set_const(0, 123.456)
16
17
  tmp.set_const(my_list_of_vars, 110.99)
17
18
  program = Program(my_top)
18
- # now use 'program'
19
+ # now use `program`
19
20
 
20
- Within the 'with' section, circuit variables are set to const values, which
21
- the compiler can optimise. When the 'with' section exits, the variables
21
+ Within the `with` section, circuit variables are set to const values, which
22
+ the compiler can optimise. When the `with` section exits, the variables
22
23
  are restored to their original state.
23
24
  """
24
25
  __slots__ = ('_circuit', '_undo')
@@ -13,12 +13,13 @@ class CircuitCompiler(Protocol):
13
13
  circuit: Optional[Circuit] = None,
14
14
  ) -> RawProgram:
15
15
  """
16
- A circuit compiler is a function with this signature.
16
+ A PGM compiler compiles selected results nodes of an arithmetic circuit to a program.
17
17
 
18
18
  Args:
19
19
  *result: one or more circuit of nodes defining the result of the program function.
20
20
  All result node must be from the same circuit.
21
- input_vars: how to determine the input variables. Default is to use all circuit variables, in index order.
21
+ input_vars: how to determine the input variables. Either a sequence of VarNodes, or a single
22
+ VarNode, or a `InferVars` member. The default is to use all circuit variables, in index order.
22
23
  circuit: optionally explicitly specify the Circuit (mandatory if no result nodes are provided).
23
24
 
24
25
  Returns: