|
82 | 82 |
|
83 | 83 | Polynomial truncated to largest `K` orders. `T` is the coefficients type and `TO` is the orders type.
|
84 | 84 |
|
85 |
| -Example |
| 85 | +Fields |
| 86 | +------------------------ |
| 87 | +* `coeffs` is the largest-K coefficients of a polynomial. In `GenericTensorNetworks`, it can be the counting or enumeration of solutions. |
| 88 | +* `maxorder` is the order of a polynomial. |
| 89 | +
|
| 90 | +Examples |
86 | 91 | ------------------------
|
87 | 92 | ```jldoctest; setup=(using GenericTensorNetworks)
|
88 | 93 | julia> TruncatedPoly((1,2,3), 6)
|
@@ -191,7 +196,11 @@ This algebra maps
|
191 | 196 | * `0` to set [-Inf, -Inf, ..., -Inf, -Inf]
|
192 | 197 | * `1` to set [-Inf, -Inf, ..., -Inf, 0]
|
193 | 198 |
|
194 |
| -Example |
| 199 | +Fields |
| 200 | +------------------------ |
| 201 | +* `orders` is a vector of [`Tropical`](@ref) ([`CoutingTropical`](@ref)) numbers as the largest-K solution sizes (solutions). |
| 202 | +
|
| 203 | +Examples |
195 | 204 | ------------------------------
|
196 | 205 | ```jldoctest; setup=(using GenericTensorNetworks)
|
197 | 206 | julia> x = ExtendedTropical{3}(Tropical.([1.0, 2, 3]))
|
@@ -376,7 +385,11 @@ Set algebra for enumerating configurations, where `N` is the length of configura
|
376 | 385 | `C` is the size of storage in unit of `UInt64`,
|
377 | 386 | `S` is the bit width to store a single element in a configuration, i.e. `log2(# of flavors)`, for bitstrings, it is `1``.
|
378 | 387 |
|
379 |
| -Example |
| 388 | +Fields |
| 389 | +------------------------ |
| 390 | +* `data` is a vector of [`StaticElementVector`](@ref) as the solution set. |
| 391 | +
|
| 392 | +Examples |
380 | 393 | ----------------------
|
381 | 394 | ```jldoctest; setup=:(using GenericTensorNetworks)
|
382 | 395 | julia> a = ConfigEnumerator([StaticBitVector([1,1,1,0,0]), StaticBitVector([1,0,0,0,1])])
|
@@ -441,7 +454,11 @@ The algebra for sampling one configuration, where `N` is the length of configura
|
441 | 454 | !!! note
|
442 | 455 | `ConfigSampler` is a **probabilistic** commutative semiring, adding two config samplers do not give you deterministic results.
|
443 | 456 |
|
444 |
| -Example |
| 457 | +Fields |
| 458 | +---------------------- |
| 459 | +* `data` is a [`StaticElementVector`](@ref) as the sampled solution. |
| 460 | +
|
| 461 | +Examples |
445 | 462 | ----------------------
|
446 | 463 | ```jldoctest; setup=:(using GenericTensorNetworks, Random; Random.seed!(2))
|
447 | 464 | julia> ConfigSampler(StaticBitVector([1,1,1,0,0]))
|
@@ -495,7 +512,7 @@ Fields
|
495 | 512 | * `data` is the element stored in a `LEAF` node.
|
496 | 513 | * `left` and `right` are two operands of a `SUM` or `PROD` node.
|
497 | 514 |
|
498 |
| -Example |
| 515 | +Examples |
499 | 516 | ------------------------
|
500 | 517 | ```jldoctest; setup=:(using GenericTensorNetworks)
|
501 | 518 | julia> s = SumProductTree(bv"00111")
|
|
697 | 714 |
|
698 | 715 | Direct sampling configurations from a [`SumProductTree`](@ref) instance.
|
699 | 716 |
|
700 |
| -Example |
| 717 | +Examples |
701 | 718 | -----------------------------
|
702 | 719 | ```jldoctest; setup=:(using GenericTensorNetworks)
|
703 | 720 | julia> using Graphs
|
|
0 commit comments