Skip to content

Commit fe73c8e

Browse files
committed
update
1 parent 14a6c03 commit fe73c8e

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

docs/src/ref.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ set_packing
1616
```
1717

1818
#### Graph Problem Interfaces
19+
20+
To subtype [`GraphProblem`](@ref), a new type must contain a `code` field to represent the (optimized) tensor network.
21+
Interfaces [`GraphTensorNetworks.generate_tensors`](@ref), [`symbols`](@ref), [`flavors`](@ref) and [`get_weights`](@ref) are required.
22+
[`nflavor`](@ref) is optional.
23+
1924
```@docs
2025
GraphTensorNetworks.generate_tensors
2126
symbols
@@ -24,10 +29,6 @@ get_weights
2429
nflavor
2530
```
2631

27-
To subtype [`GraphProblem`](@ref), the new type must contain a `code` field to represent the (optimized) tensor network.
28-
Interfaces [`GraphTensorNetworks.generate_tensors`](@ref), [`symbols`](@ref), [`flavors`](@ref) and [`get_weights`] are required.
29-
[`nflavor`] is optimal.
30-
3132
#### Graph Problem Utilities
3233
```@docs
3334
is_independent_set

examples/IndependentSet.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ maximum_independent_set_size = solve(problem, SizeMax())[]
5959
# ##### counting all independent sets
6060
count_all_independent_sets = solve(problem, CountingAll())[]
6161

62+
# Function [`solve`](@ref) takes two positional arguments, the problem instance and the wanted property.
63+
6264
# ##### counting independent sets with sizes ``\alpha(G)`` and ``\alpha(G)-1``
6365
count_max2_independent_sets = solve(problem, CountingMax(2))[]
6466

src/networks/IndependentSet.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ end
8181
mis_compactify!(tropicaltensor)
8282
8383
Compactify tropical tensor for maximum independent set problem. It will eliminate
84-
some entries by setting them to zero, by the criteria that even these entries are removed, the MIS size is not changed.
84+
some entries by setting them to zero, by the criteria that removing these entry
85+
does not change the MIS size of its parent graph (reference to be added).
8586
"""
8687
function mis_compactify!(a::AbstractArray{T}) where T <: TropicalTypes
8788
for (ind_a, val_a) in enumerate(a)

src/networks/MaxCut.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434
"""
3535
cut_assign(g::SimpleGraph, config)
3636
37-
Returns a valid vertex configurations (a vector of size `nv(g)`) from `config` (an iterator) defined on edges:
37+
Returns a valid vertex cut configurations (a vector of size `nv(g)`) from `config` (an iterator) defined on edges:
3838
3939
* assign two vertices with the same values if they are connected by an edge with configuration `0`.
4040
* assign two vertices with the different values if they are connected by an edge with configuration `1`.

src/networks/PaintShop.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ end
7171
"""
7272
num_paint_shop_color_switch(labels::AbstractVector, coloring::AbstractVector)
7373
74-
Check the validity of the `coloring` and returns the number of color switches.
74+
Checks the validity of the painting and returns the number of color switches.
7575
"""
7676
function num_paint_shop_color_switch(labels::AbstractVector, coloring::AbstractVector)
7777
# check validity of solution
@@ -90,7 +90,7 @@ end
9090
"""
9191
paint_shop_coloring_from_config(config; initial=false)
9292
93-
Return a valid painting from the paint shop configuration (given by the configuration solvers).
93+
Returns a valid painting from the paint shop configuration (given by the configuration solvers).
9494
The `config` is a sequence of 0 and 1, where 0 means the color changed, 1 mean color unchanged.
9595
"""
9696
function paint_shop_coloring_from_config(config; initial::Bool=false)

src/visualize.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ Other keyword arguments
8585
* scale::Float64 = 1.0
8686
* pad::Float64 = 1.5
8787
* vertex
88-
* vertex_text_color::String = "black"
89-
* vertex_stroke_color = "black"
90-
* vertex_fill_color = "white"
88+
* vertex\\_text\\_color::String = "black"
89+
* vertex\\_stroke\\_color = "black"
90+
* vertex\\_fill\\_color = "white"
9191
* edge
9292
* edge_color::String = "black"
9393
* image size in `cm`

0 commit comments

Comments
 (0)