11module TensorInferenceGTNExt
22using TensorInference, TensorInference. OMEinsum
33using TensorInference: TYPEDSIGNATURES, Factor
4- import TensorInference: update_temperature
54using GenericTensorNetworks: generate_tensors, GraphProblem, flavors, labels
65
76"""
@@ -25,18 +24,7 @@ function TensorInference.TensorNetworkModel(problem::GraphProblem, β::Real; evi
2524 return TensorNetworkModel (lbs, fill (nflavors, length (lbs)), factors; openvars= iy, evidence, optimizer, simplifier, mars)
2625end
2726
28- """
29- $TYPEDSIGNATURES
30-
31- Update the temperature of a tensor network model.
32- The program will regenerate tensors from the problem, without repeated optimizing the contraction order.
33-
34- ### Arguments
35- - `tnet` is the [`TensorNetworkModel`](@ref) instance.
36- - `problem` is the target constraint satisfiability problem.
37- - `β` is the inverse temperature.
38- """
39- function update_temperature (tnet:: TensorNetworkModel , problem:: GraphProblem , β:: Real )
27+ function TensorInference. update_temperature (tnet:: TensorNetworkModel , problem:: GraphProblem , β:: Real )
4028 tensors = generate_tensors (exp (β), problem)
4129 alltensors = [tnet. tensors[1 : end - length (tensors)]. .. , tensors... ]
4230 return TensorNetworkModel (tnet. vars, tnet. code, alltensors, tnet. evidence, tnet. mars)
0 commit comments