Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The Percolation.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2016: goropikari.
> Copyright (c) 2016: goropikari and contributors
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 11 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name = "Percolation"
uuid = "31b34cd4-33dc-40c1-8f72-ebe007ebca36"
authors = ["Goropikari <goropikari56@gmail.com>"]
version = "0.1.0"

[deps]
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
18 changes: 18 additions & 0 deletions example/percolation_example.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Percolation

N = 50; p = 0.6
sq = Square(N, p, "nn")
sq.lattice_config.lattice_sites

label_components!(sq)
sq.lattice_properties.labeled_lattice_sites

sq
heatmap!(sq)

linsize = 50
ps = 0.1
pinc = 0.025
pf = 1
nsample = 50
plot_percolation_prob("square", linsize, ps, pinc, pf, nsample)
2 changes: 1 addition & 1 deletion src/Percolation.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Percolation

using Gtk, Gtk.ShortNames, StatsBase, Plots
using Gtk, Gtk.ShortNames, StatsBase, Plots, Random
gr()
import Plots: heatmap, heatmap!
import Images: label_components, label_components!
Expand Down
2 changes: 1 addition & 1 deletion src/latticetype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ for lattice_type in lattice_types
false, # isaverage_clustersize
false, # isstrength
0, # nclusters
Matrix{Int}(linear_size, linear_size) # labeled_lattice_sites
Array{Int64,2}(undef,linear_size, linear_size) # labeled_lattice_sites
)
)
end
Expand Down