Created
October 14, 2019 16:48
-
-
Save abelsiqueira/c00e48c26d3c29a31f97992fa7852a3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuiverMutation | |
function exemplo1() | |
lt = Lattice(2, 4) | |
P = [(3,2), (2,2), (1,2), (1,1), (2,1)] | |
plot_lattice(lt, title="Inicial", filename="quiver-0") | |
for (i,p) in enumerate(P) | |
lt = activate(lt, p[1], p[2]) | |
plot_lattice(lt, title="Ativado coluna $(p[2]), linha $(p[1])", filename="quiver-$i") | |
end | |
end | |
exemplo1() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuiverMutation | |
function exemplo2() | |
lt = Lattice(2, 4) | |
objective = KR"1_0 1_2 1_4 2_3 2_5 2_7" | |
path, i, j = search(lt, objective) | |
println("Found in path $path at $i,$j") | |
#plot_path(lt, path, prefix="exemplo2") | |
end | |
exemplo2() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuiverMutation | |
function exemplo3() | |
lt = Lattice(2, 8) | |
#path = [(3,2), (2,2), (1,2), (1,1), (2,1), (5,1), (4,1), (4,2), (3,2)] | |
#lt = activate(lt, path) | |
objective = KR"1_0 1_0 1_2 1_8 1_10 2_3 2_5 2_7 2_3 2_5 2_7 2_5" | |
path, i, j = search(lt, objective, max_depth=10) | |
println("Found in path $path of length $(length(path)) at $i,$j") | |
#plot_path(lt, path, prefix="exemplo3") | |
end | |
exemplo3() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuiverMutation | |
function exemplo4() | |
lt = Lattice(2, 9) | |
objective = KR"1_0 1_2 1_4 1_6 2_5 2_7 2_9 1_10 1_12 2_13 2_15" | |
path, i, j = search(lt, objective, max_depth=30) | |
println("Found in path $path at $i,$j") | |
#plot_path(lt, path, prefix="exemplo4") | |
end | |
exemplo4() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment