Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit a0559f6

Browse files
committed
Refactoring
1 parent da75bce commit a0559f6

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

src/PointPatterns.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export
2323
ishomogeneous,
2424

2525
# algorithms
26-
SamplingAlgorithm,
26+
PointPatternAlgorithm,
2727
LewisShedler,
2828

2929
# thinning methods
30-
AbstractThinning,
30+
ThinningMethod,
3131
RandomThinning,
3232
thin
3333

src/processes.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,24 @@ on geometry or domain `g`.
5050
"""
5151
function default_sampling_algorithm end
5252

53-
# --------------------
54-
# SAMPLING ALGORITHMS
55-
# --------------------
53+
# -------------------------
54+
# POINT PATTERN ALGORITHMS
55+
# -------------------------
5656

5757
"""
58-
SamplingAlgorithm
58+
PointPatternAlgorithm
5959
60-
A sampling algorithm for point processes.
60+
An algorithm for sampling point patterns.
6161
"""
62-
abstract type SamplingAlgorithm end
62+
abstract type PointPatternAlgorithm end
6363

6464
"""
6565
LewisShedler(λmax)
6666
6767
Generate sample using Lewis-Shedler algorithm (1979) with
6868
maximum real value `λmax` of the intensity function.
6969
"""
70-
struct LewisShedler{T<:Real} <: SamplingAlgorithm
70+
struct LewisShedler{T<:Real} <: PointPatternAlgorithm
7171
λmax::T
7272
end
7373

@@ -77,9 +77,9 @@ end
7777
Generate sample assuming the intensity is constant over a `Geometry`
7878
or piecewise constant over a `Domain`.
7979
"""
80-
struct DiscretizedSampling <: SamplingAlgorithm end
80+
struct DiscretizedSampling <: PointPatternAlgorithm end
8181

82-
struct UnionSampling <: SamplingAlgorithm end
82+
struct UnionSampling <: PointPatternAlgorithm end
8383

8484
#-----------------
8585
# IMPLEMENTATIONS

src/thinning.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
# ------------------------------------------------------------------
44

55
"""
6-
AbstractThinning
6+
ThinningMethod
77
88
A method for thinning spatial point processes and patterns.
99
"""
10-
abstract type AbstractThinning end
10+
abstract type ThinningMethod end
1111

1212
"""
13-
thin(p, t)
13+
thin(process, method)
1414
15-
Thin spatial point process `p` with thinning method `t`.
15+
Thin spatial point `process` with thinning `method`.
1616
"""
1717
function thin end
1818

1919
"""
20-
thin(pp, t)
20+
thin(pattern, method)
2121
22-
Thin spatial point pattern `pp` with thinning method `t`.
22+
Thin spatial point `pattern` with thinning `method`.
2323
"""
24-
thin(::PointSet, ::AbstractThinning)
24+
thin(::PointSet, ::ThinningMethod)
2525

2626
#-----------------
2727
# IMPLEMENTATIONS

src/thinning/random.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
Random thining with retention probability `p`.
99
"""
10-
struct RandomThinning{P<:Union{Real,Function}} <: AbstractThinning
10+
struct RandomThinning{P<:Union{Real,Function}} <: ThinningMethod
1111
p::P
1212
end
1313

0 commit comments

Comments
 (0)