Skip to content

Commit

Permalink
More docstring fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofachada committed Jun 4, 2024
1 parent d7c9416 commit 10fac82
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
10 changes: 5 additions & 5 deletions docs/CluGenExtras.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Copyright (c) 2020-2023 Nuno Fachada and contributors
# Copyright (c) 2020-2024 Nuno Fachada and contributors
# Distributed under the MIT License (See accompanying file LICENSE or copy
# at http://opensource.org/licenses/MIT)

Expand Down Expand Up @@ -571,12 +571,12 @@ end

"""
clupoints_n_hollow(
projs::AbstractArray{<:Real, 2},
projs::AbstractArray{<:Real,2},
lat_disp::Real,
line_len::Real,
clu_dir::AbstractArray{<:Real, 1},
clu_ctr::AbstractArray{<:Real, 1};
rng::AbstractRNG = Random.GLOBAL_RNG
clu_dir::AbstractArray{<:Real,1},
clu_ctr::AbstractArray{<:Real,1};
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real}
Alternative function for the `point_dist_fn` parameter of the `clugen()` function
Expand Down
4 changes: 2 additions & 2 deletions src/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ end
"""
rand_unit_vector(
num_dims::Integer;
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real,1}
Get a random unit vector with `num_dims` dimensions.
Expand Down Expand Up @@ -145,7 +145,7 @@ end
rand_vector_at_angle(
u::AbstractArray{<:Real,1},
angle::Real;
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real,1}
Get a random unit vector which is at `angle` radians of vector `u`.
Expand Down
2 changes: 1 addition & 1 deletion src/helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ end
lat_disp::Real,
clu_dir::AbstractArray{<:Real,1},
dist_fn::Function;
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real}
Generate points from their ``n``-dimensional projections on a cluster-supporting
Expand Down
16 changes: 8 additions & 8 deletions src/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
llength_disp::Real,
lateral_disp::Real;
# Keyword arguments
allow_empty::Bool = false,
cluster_offset::Union{AbstractArray{<:Real,1},Nothing} = nothing,
proj_dist_fn::Union{String,<:Function} = "norm",
point_dist_fn::Union{String,<:Function} = "n-1",
clusizes_fn::Union{<:Function,AbstractArray{<:Real,1}} = GluGen.clusizes,
clucenters_fn::Union{<:Function,AbstractArray{<:Real}} = GluGen.clucenters,
llengths_fn::Union{<:Function,AbstractArray{<:Real,1}} = GluGen.llengths,
angle_deltas_fn::Union{<:Function,AbstractArray{<:Real,1}} = GluGen.angle_deltas,
allow_empty::Bool=false,
cluster_offset::Union{AbstractArray{<:Real,1},Nothing}=nothing,
proj_dist_fn::Union{String,<:Function}="norm",
point_dist_fn::Union{String,<:Function}="n-1",
clusizes_fn::Union{<:Function,AbstractArray{<:Real,1}}=CluGen.clusizes,
clucenters_fn::Union{<:Function,AbstractArray{<:Real}}=CluGen.clucenters,
llengths_fn::Union{<:Function,AbstractArray{<:Real,1}}=CluGen.llengths,
angle_deltas_fn::Union{<:Function,AbstractArray{<:Real,1}}=CluGen.angle_deltas,
rng::Union{Integer,AbstractRNG}=Random.GLOBAL_RNG
) -> NamedTuple{(
:points, # Array{<:Real,2}
Expand Down
14 changes: 7 additions & 7 deletions src/module.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) 2020-2023 Nuno Fachada, Diogo de Andrade, and contributors
# Copyright (c) 2020-2024 Nuno Fachada, Diogo de Andrade, and contributors
# Distributed under the MIT License (See accompanying file LICENSE or copy
# at http://opensource.org/licenses/MIT)

"""
angle_deltas(
num_clusters::Integer,
angle_disp::Real;
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real,1}
Determine the angles between the average cluster direction and the
Expand Down Expand Up @@ -67,7 +67,7 @@ end
num_clusters::Integer,
clu_sep::AbstractArray{<:Real,1},
clu_offset::AbstractArray{<:Real,1};
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real}
Determine cluster centers using the uniform distribution, taking into account the
Expand Down Expand Up @@ -134,7 +134,7 @@ end
line_len::Real,
clu_dir::AbstractArray{<:Real,1},
clu_ctr::AbstractArray{<:Real,1};
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real}
Generate points from their ``n``-dimensional projections on a cluster-supporting
Expand Down Expand Up @@ -199,7 +199,7 @@ end
line_len::Real,
clu_dir::AbstractArray{<:Real,1},
clu_ctr::AbstractArray{<:Real,1};
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real}
Generate points from their ``n``-dimensional projections on a cluster-supporting
Expand Down Expand Up @@ -269,7 +269,7 @@ end
num_clusters::Integer,
num_points::Integer,
allow_empty::Bool;
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Integer,1}
Determine cluster sizes, i.e., the number of points in each cluster, using the
Expand Down Expand Up @@ -351,7 +351,7 @@ end
num_clusters::Integer,
llength::Real,
llength_disp::Real;
rng::AbstractRNG = Random.GLOBAL_RNG
rng::AbstractRNG=Random.GLOBAL_RNG
) -> AbstractArray{<:Real,1}
Determine length of cluster-supporting lines using the folded normal distribution
Expand Down

0 comments on commit 10fac82

Please sign in to comment.