You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/mar.jl
+27-17Lines changed: 27 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -124,19 +124,23 @@ end
124
124
"""
125
125
$(TYPEDSIGNATURES)
126
126
127
-
Query the marginals of the variables in a [`TensorNetworkModel`](@ref).
128
-
The returned value is a dictionary of variables and their marginals, where a marginal is a joint probability distribution over the associated variables.
129
-
By default, the marginals of all individual variables are returned.
130
-
The marginal variables to query can be specified when constructing [`TensorNetworkModel`](@ref) as its field `mars`.
131
-
It will affect the contraction order of the tensor network.
127
+
Queries the marginals of the variables in a [`TensorNetworkModel`](@ref). The
128
+
function returns a dictionary, where the keys are the variables and the values
129
+
are their respective marginals. A marginal is a probability distribution over
130
+
a subset of variables, obtained by integrating or summing over the remaining
131
+
variables in the model. By default, the function returns the marginals of all
132
+
individual variables. To specify which marginal variables to query, set the
133
+
`mars` field when constructing a [`TensorNetworkModel`](@ref). Note that
134
+
the choice of marginal variables will affect the contraction order of the
135
+
tensor network.
132
136
133
137
### Arguments
134
-
- `tn`: the [`TensorNetworkModel`](@ref) to query.
135
-
- `usecuda`: whether to use CUDA for tensor contraction.
136
-
- `rescale`: whether to rescale the tensors during contraction.
138
+
- `tn`: The [`TensorNetworkModel`](@ref) to query.
139
+
- `usecuda`: Specifies whether to use CUDA for tensor contraction.
140
+
- `rescale`: Specifies whether to rescale the tensors during contraction.
137
141
138
142
### Example
139
-
The following example is from [`examples/asia/main.jl`](@ref).
143
+
The following example is taken from [`examples/asia/main.jl`](@ref).
0 commit comments