Skip to content

Commit

Permalink
Clean README, notebook and docs (#141)
Browse files Browse the repository at this point in the history
* Fix a typo and convert LaTex to code inline for readability

* Fix a typo.

* Clean README, notebook and docs
  • Loading branch information
pitmonticone committed Jun 6, 2022
1 parent 7152d54 commit 48cb6ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Please include version numbers of all relevant libraries and Julia itself.
- Correctness is a necessary requirement; efficiency is desirable. Once you have a correct implementation, make a Pull Request (PR) so we can help improve performance.
- PRs should contain one logical enhancement to the codebase.
- Squash commits in a PR.
- If you want to introduce a new feature, open an issue can to discuss a feature before you start coding (this maximizes the likelihood of patch acceptance).
- If you want to introduce a new feature, open an issue to discuss a feature before you start coding (this maximizes the likelihood of patch acceptance).
- Minimize dependencies on external packages, and avoid introducing new dependencies that would increase the compilation time by a lot.
- Put type assertions on all function arguments where conflict may arise (use abstract types, `Union`, or `Any` if necessary).
- If the algorithm was presented in a paper, include a reference to the paper (_e.g._, a proper academic citation along with an eprint link).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pkg> add Graphs

## Basic use

_Graphs.jl_ includes numerous convenience functions for generating functions, such as `path_graph`, which builds a simple undirected [path graph](https://en.wikipedia.org/wiki/Path_graph) of a given length. Once created, these graphs can be easily interrogated and modified.
_Graphs.jl_ includes numerous convenience functions for generating graphs, such as `path_graph`, which builds a simple undirected [path graph](https://en.wikipedia.org/wiki/Path_graph) of a given length. Once created, these graphs can be easily interrogated and modified.

```julia-repl
julia> g = path_graph(6)
Expand Down
13 changes: 3 additions & 10 deletions docs/notebooks/triangles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
" end\n",
" return is_directed(g) ? (c , k*(k-1)) : (div(c,2) , div(k*(k-1),2))\n",
"end\n",
"\n",
"function local_clustering(g::AbstractGraph, vs = vertices(g))\n",
" ntriang = zeros(Int, length(vs))\n",
" nalltriang = zeros(Int, length(vs))\n",
Expand All @@ -68,7 +69,7 @@
" ntriang[i], nalltriang[i] = local_clustering(g, v)\n",
" end\n",
" return ntriang, nalltriang\n",
"end\n"
"end"
]
},
{
Expand Down Expand Up @@ -182,6 +183,7 @@
" \n",
" return is_directed(g) ? (tcount , k*(k-1)) : (div(tcount,2) , div(k*(k-1),2))\n",
"end\n",
"\n",
"function local_clustering!(storage::AbstractVector{Bool}, g::AbstractGraph, vs = vertices(g))\n",
" ntriang = zeros(Int, length(vs))\n",
" nalltriang = zeros(Int, length(vs))\n",
Expand Down Expand Up @@ -338,15 +340,6 @@
"\n",
"It looks like the bool array is slightly faster even though we have to reset it. Let's use that."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 48cb6ec

Please sign in to comment.