Skip to content

Commit

Permalink
remove docstrings of internal functions
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed May 2, 2024
1 parent 7686053 commit e587c53
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
24 changes: 12 additions & 12 deletions src/CellLists.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ function CellList(
return UpdateCellList!(x, box, cl, parallel=parallel)
end

"""
#=
CellList(x::AbstractMatrix, box::Box{UnitCellType,N,T}; kargs...) where {UnitCellType,N,T}
Reinterprets the matrix `x` as vectors of static vectors and calls the
equivalent function with the reinterprted input. The first dimension of the
matrix must be the dimension of the points (`2` or `3`).
"""
=#
function CellList(x::AbstractMatrix, box::Box{UnitCellType,N,T}; kargs...) where {UnitCellType,N,T}
size(x, 1) == N || throw(DimensionMismatch("First dimension of input matrix must be $N"))
x_re = reinterpret(reshape, SVector{N,eltype(x)}, x)
Expand Down Expand Up @@ -567,14 +567,14 @@ function CellList(
return cl_pair
end

"""
#=
CellList(x::AbstractMatrix, y::AbstractMatrix, box::Box{UnitCellType,N,T}; kargs...) where {UnitCellType,N,T}
Reinterprets the matrices `x` and `y` as vectors of static vectors and calls the
equivalent function with the reinterprted input. The first dimension of the
matrices must be the dimension of the points (`2` or `3`).
"""
=#
function CellList(x::AbstractMatrix, y::AbstractMatrix, box::Box{UnitCellType,N,T}; kargs...) where {UnitCellType,N,T}
size(x, 1) == N || throw(DimensionMismatch("First dimension of input matrix must be $N"))
size(y, 1) == N || throw(DimensionMismatch("First dimension of input matrix must be $N"))
Expand Down Expand Up @@ -628,7 +628,7 @@ function UpdateCellList!(
end
end

"""
#=
function UpdateCellList!(
x::AbstractMatrix,
box::Box,
Expand All @@ -640,7 +640,7 @@ Reinterprets the matrix `x` as vectors of static vectors and calls the
equivalent function with the reinterprted input. The first dimension of the
matrix must be the dimension of the points (`2` or `3`).
"""
=#
function UpdateCellList!(
x::AbstractMatrix,
box::Box,
Expand Down Expand Up @@ -767,7 +767,7 @@ function UpdateCellList!(
return cl
end

"""
#=
UpdateCellList!(
x::AbstractMatrix,
box::Box,
Expand All @@ -780,7 +780,7 @@ Reinterprets the matrix `x` as vectors of static vectors and calls the
equivalent function with the reinterprted input. The first dimension of the
matrix must be the dimension of the points (`2` or `3`).
"""
=#
function UpdateCellList!(
x::AbstractMatrix,
box::Box,
Expand Down Expand Up @@ -1075,7 +1075,7 @@ function UpdateCellList!(
end
end

"""
#=
UpdateCellList!(
x::AbstractMatrix,
y::AbstractMatrix,
Expand All @@ -1088,7 +1088,7 @@ Reinterprets the matrices `x` and `y` as vectors of static vectors and calls the
equivalent function with the reinterprted input. The first dimension of the
matrices must be the dimension of the points (`2` or `3`).
"""
=#
function UpdateCellList!(
x::AbstractMatrix,
y::AbstractMatrix,
Expand Down Expand Up @@ -1210,7 +1210,7 @@ function _update_CellListPair!(ref, target, cl_pair::CellListPair{V,N,T,Swap}) w
return cl_pair
end

"""
#=
UpdateCellList!(
x::AbstractMatrix,
y::AbstractMatrix,
Expand All @@ -1224,7 +1224,7 @@ Reinterprets the matrices `x` and `y` as vectors of static vectors and calls the
equivalent function with the reinterprted input. The first dimension of the
matrices must be the dimension of the points (`2` or `3`).
"""
=#
function UpdateCellList!(
x::AbstractMatrix,
y::AbstractMatrix,
Expand Down
4 changes: 2 additions & 2 deletions src/CellOperations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ provided.
@inline translation_image(x::SVector{N,T}, unit_cell_matrix, indices) where {N,T} =
x + unit_cell_matrix * SVector{N,Int}(ntuple(i -> indices[i], N))

"""
#=
translation_image(x::AbstractVector{<:AbstractVector},unit_cell_matrix,indices)
Translates a complete set of coordinates given a set of indexes of unit-cells. Returns a new
Expand All @@ -149,7 +149,7 @@ julia> CellListMap.translation_image(x,box.unit_cell.matrix,(1,1))
[1.4066300885242247, 1.2907398318754952]
```
"""
=#
function translation_image(x::AbstractVector{<:AbstractVector}, unit_cell_matrix, indices)
x_new = similar(x)
for i in eachindex(x)
Expand Down
6 changes: 3 additions & 3 deletions src/CoreComputing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
splitter(first, nbatches, n) = first:nbatches:n

"""
#=
reduce(output, output_threaded)
Most common reduction function, which sums the elements of the output.
Expand Down Expand Up @@ -40,7 +40,7 @@ julia> output
3
```
"""
=#
reduce(output::T, output_threaded::Vector{T}) where {T} = sum(output_threaded)
function reduce(output::T, output_threaded::Vector{T}) where {T<:AbstractArray}
for ibatch in eachindex(output_threaded)
Expand All @@ -57,7 +57,7 @@ function reduce(output, output_threaded)
the signature:
```
CellListMap.reduce(output::$T, output_threaded::Vector{$T})
custom_reduce(output::$T, output_threaded::Vector{$T})
```
The reduction function **must** return the `output` variable, even
Expand Down
5 changes: 4 additions & 1 deletion src/ParticleSystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,10 @@ end
end

"""
map_pairwise!(f::Function, system; show_progress = true, update_lists = true)
map_pairwise!(
f::Function, system::AbstractParticleSystem;
show_progress = true, update_lists = true
)
Function that maps the `f` function into all pairs of particles of
`system` that are found to be within the `cutoff`.
Expand Down

0 comments on commit e587c53

Please sign in to comment.