Skip to content

Commit 9cff297

Browse files
committed
fix document
1 parent 21d966c commit 9cff297

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

ext/TensorInferenceGTNExt.jl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module TensorInferenceGTNExt
22
using TensorInference, TensorInference.OMEinsum
33
using TensorInference: TYPEDSIGNATURES, Factor
4-
import TensorInference: update_temperature
54
using 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)
2625
end
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)

src/TensorInference.jl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export MMAPModel
3636

3737
# for GenericTensorNetworks
3838
export update_temperature
39-
function update_temperature end
4039

4140
include("Core.jl")
4241
include("RescaledArray.jl")
@@ -55,4 +54,17 @@ include("sampling.jl")
5554
# end
5655
# end
5756

57+
"""
58+
$TYPEDSIGNATURES
59+
60+
Update the temperature of a tensor network model.
61+
The program will regenerate tensors from the problem, without repeated optimizing the contraction order.
62+
63+
### Arguments
64+
- `tnet` is the [`TensorNetworkModel`](@ref) instance.
65+
- `problem` is the target constraint satisfiability problem.
66+
- `β` is the inverse temperature.
67+
"""
68+
function update_temperature end
69+
5870
end # module

0 commit comments

Comments
 (0)