From ec16212d3fb7a53466478de94dd4b8943f8506e1 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 19 Oct 2023 16:22:23 +0000 Subject: [PATCH] build based on 4465931 --- dev/.documenter-siteinfo.json | 2 +- dev/gallery/{a9c8b596.svg => 04ad54d8.svg} | 491 +-- dev/gallery/16e17de2.svg | 372 ++ dev/gallery/25ebbeaa.svg | 2752 ++++++++++++++ dev/gallery/2fa744af.svg | 392 -- dev/gallery/30817159.svg | 2515 ------------- dev/gallery/3f5dcb74.svg | 1266 +++++++ dev/gallery/{b51cb24b.svg => 43eb10e5.svg} | 18 +- dev/gallery/48a3d1ce.svg | 1914 ++++++++++ dev/gallery/4f6cf6be.svg | 1122 ------ dev/gallery/5981e703.svg | 1622 +++++++++ dev/gallery/639c9e62.svg | 535 --- dev/gallery/79242ac4.svg | 3794 -------------------- dev/gallery/{e7386f90.svg => 7d8fb063.svg} | 18 +- dev/gallery/9abcfa1c.svg | 1922 ---------- dev/gallery/abb2ec8c.svg | 570 +++ dev/gallery/bfda6b8f.svg | 1626 --------- dev/gallery/cbaddf1c.svg | 3794 ++++++++++++++++++++ dev/gallery/{51099c02.svg => d83e9c6e.svg} | 18 +- dev/gallery/dfd0cb80.svg | 2762 -------------- dev/gallery/e188a751.svg | 2519 +++++++++++++ dev/gallery/index.html | 6 +- dev/index.html | 26 +- dev/vignettes/overview/index.html | 2 +- 24 files changed, 15101 insertions(+), 14957 deletions(-) rename dev/gallery/{a9c8b596.svg => 04ad54d8.svg} (72%) create mode 100644 dev/gallery/16e17de2.svg create mode 100644 dev/gallery/25ebbeaa.svg delete mode 100644 dev/gallery/2fa744af.svg delete mode 100644 dev/gallery/30817159.svg create mode 100644 dev/gallery/3f5dcb74.svg rename dev/gallery/{b51cb24b.svg => 43eb10e5.svg} (97%) create mode 100644 dev/gallery/48a3d1ce.svg delete mode 100644 dev/gallery/4f6cf6be.svg create mode 100644 dev/gallery/5981e703.svg delete mode 100644 dev/gallery/639c9e62.svg delete mode 100644 dev/gallery/79242ac4.svg rename dev/gallery/{e7386f90.svg => 7d8fb063.svg} (96%) delete mode 100644 dev/gallery/9abcfa1c.svg create mode 100644 dev/gallery/abb2ec8c.svg delete mode 100644 dev/gallery/bfda6b8f.svg create mode 100644 dev/gallery/cbaddf1c.svg rename dev/gallery/{51099c02.svg => d83e9c6e.svg} (98%) delete mode 100644 dev/gallery/dfd0cb80.svg create mode 100644 dev/gallery/e188a751.svg diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 9f4a89a..7b9e0dc 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-19T16:05:40","documenter_version":"1.1.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-19T16:22:11","documenter_version":"1.1.1"}} \ No newline at end of file diff --git a/dev/gallery/a9c8b596.svg b/dev/gallery/04ad54d8.svg similarity index 72% rename from dev/gallery/a9c8b596.svg rename to dev/gallery/04ad54d8.svg index 8330ade..19ba84e 100644 --- a/dev/gallery/a9c8b596.svg +++ b/dev/gallery/04ad54d8.svg @@ -1,328 +1,331 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + - + diff --git a/dev/gallery/16e17de2.svg b/dev/gallery/16e17de2.svg new file mode 100644 index 0000000..e9ff469 --- /dev/null +++ b/dev/gallery/16e17de2.svg @@ -0,0 +1,372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/25ebbeaa.svg b/dev/gallery/25ebbeaa.svg new file mode 100644 index 0000000..48f9452 --- /dev/null +++ b/dev/gallery/25ebbeaa.svg @@ -0,0 +1,2752 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/2fa744af.svg b/dev/gallery/2fa744af.svg deleted file mode 100644 index 0ae6e0d..0000000 --- a/dev/gallery/2fa744af.svg +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/30817159.svg b/dev/gallery/30817159.svg deleted file mode 100644 index 37eaf80..0000000 --- a/dev/gallery/30817159.svg +++ /dev/null @@ -1,2515 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/3f5dcb74.svg b/dev/gallery/3f5dcb74.svg new file mode 100644 index 0000000..bf897c2 --- /dev/null +++ b/dev/gallery/3f5dcb74.svg @@ -0,0 +1,1266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/b51cb24b.svg b/dev/gallery/43eb10e5.svg similarity index 97% rename from dev/gallery/b51cb24b.svg rename to dev/gallery/43eb10e5.svg index da6accb..8da7727 100644 --- a/dev/gallery/b51cb24b.svg +++ b/dev/gallery/43eb10e5.svg @@ -1,23 +1,23 @@ - + - + - + - + - + - + - + - + - + diff --git a/dev/gallery/48a3d1ce.svg b/dev/gallery/48a3d1ce.svg new file mode 100644 index 0000000..1700f80 --- /dev/null +++ b/dev/gallery/48a3d1ce.svg @@ -0,0 +1,1914 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/4f6cf6be.svg b/dev/gallery/4f6cf6be.svg deleted file mode 100644 index a4d9da8..0000000 --- a/dev/gallery/4f6cf6be.svg +++ /dev/null @@ -1,1122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/5981e703.svg b/dev/gallery/5981e703.svg new file mode 100644 index 0000000..d9112f8 --- /dev/null +++ b/dev/gallery/5981e703.svg @@ -0,0 +1,1622 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/639c9e62.svg b/dev/gallery/639c9e62.svg deleted file mode 100644 index 7488a05..0000000 --- a/dev/gallery/639c9e62.svg +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/79242ac4.svg b/dev/gallery/79242ac4.svg deleted file mode 100644 index 4aba2f4..0000000 --- a/dev/gallery/79242ac4.svg +++ /dev/null @@ -1,3794 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/e7386f90.svg b/dev/gallery/7d8fb063.svg similarity index 96% rename from dev/gallery/e7386f90.svg rename to dev/gallery/7d8fb063.svg index 1ea86b0..ce2eafa 100644 --- a/dev/gallery/e7386f90.svg +++ b/dev/gallery/7d8fb063.svg @@ -1,23 +1,23 @@ - + - + - + - + - + - + - + - + - + diff --git a/dev/gallery/9abcfa1c.svg b/dev/gallery/9abcfa1c.svg deleted file mode 100644 index dadc970..0000000 --- a/dev/gallery/9abcfa1c.svg +++ /dev/null @@ -1,1922 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/abb2ec8c.svg b/dev/gallery/abb2ec8c.svg new file mode 100644 index 0000000..ad5e666 --- /dev/null +++ b/dev/gallery/abb2ec8c.svg @@ -0,0 +1,570 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/bfda6b8f.svg b/dev/gallery/bfda6b8f.svg deleted file mode 100644 index 9c0a44c..0000000 --- a/dev/gallery/bfda6b8f.svg +++ /dev/null @@ -1,1626 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/cbaddf1c.svg b/dev/gallery/cbaddf1c.svg new file mode 100644 index 0000000..bced0bb --- /dev/null +++ b/dev/gallery/cbaddf1c.svg @@ -0,0 +1,3794 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/51099c02.svg b/dev/gallery/d83e9c6e.svg similarity index 98% rename from dev/gallery/51099c02.svg rename to dev/gallery/d83e9c6e.svg index e92f600..6cfd503 100644 --- a/dev/gallery/51099c02.svg +++ b/dev/gallery/d83e9c6e.svg @@ -1,23 +1,23 @@ - + - + - + - + - + - + - + - + - + diff --git a/dev/gallery/dfd0cb80.svg b/dev/gallery/dfd0cb80.svg deleted file mode 100644 index 88d5e5d..0000000 --- a/dev/gallery/dfd0cb80.svg +++ /dev/null @@ -1,2762 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/gallery/e188a751.svg b/dev/gallery/e188a751.svg new file mode 100644 index 0000000..92cecf6 --- /dev/null +++ b/dev/gallery/e188a751.svg @@ -0,0 +1,2519 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/gallery/index.html b/dev/gallery/index.html index 1c7a87d..ab90f89 100644 --- a/dev/gallery/index.html +++ b/dev/gallery/index.html @@ -4,6 +4,6 @@ function demolandscape(alg::T) where {T <: NeutralLandscapeMaker} heatmap(rand(alg, (200, 200)), frame=:none, aspectratio=1, c=:davos) -end
demolandscape (generic function with 1 method)

No gradient

demolandscape(NoGradient())
Example block output

Planar gradient

demolandscape(PlanarGradient(35))
Example block output

Edge gradient

demolandscape(EdgeGradient(186))
Example block output

Wave surface

demolandscape(WaveSurface(35, 3))
Example block output

Rectangular cluster

demolandscape(RectangularCluster())
Example block output

Distance gradient

sources = unique(rand(1:40000, 50))
-demolandscape(DistanceGradient(sources))
Example block output

Nearest-neighbor element

heatmap(rand(NearestNeighborElement(20, 1), (45, 45)))
Example block output

Voronoi

demolandscape(DiscreteVoronoi(40))
Example block output

Perlin Noise

demolandscape(PerlinNoise())
Example block output

Classify landscape

sources = unique(rand(1:40000, 50))
-heatmap(NeutralLandscapes.classify!(rand(DistanceGradient(sources), (200, 200)), [0.5, 1, 1, 0.5]))
Example block output

Diamond Square

demolandscape(DiamondSquare())
Example block output

Midpoint Displacement

demolandscape(MidpointDisplacement())
Example block output +end
demolandscape (generic function with 1 method)

No gradient

demolandscape(NoGradient())
Example block output

Planar gradient

demolandscape(PlanarGradient(35))
Example block output

Edge gradient

demolandscape(EdgeGradient(186))
Example block output

Wave surface

demolandscape(WaveSurface(35, 3))
Example block output

Rectangular cluster

demolandscape(RectangularCluster())
Example block output

Distance gradient

sources = unique(rand(1:40000, 50))
+demolandscape(DistanceGradient(sources))
Example block output

Nearest-neighbor element

heatmap(rand(NearestNeighborElement(20, 1), (45, 45)))
Example block output

Voronoi

demolandscape(DiscreteVoronoi(40))
Example block output

Perlin Noise

demolandscape(PerlinNoise())
Example block output

Classify landscape

sources = unique(rand(1:40000, 50))
+heatmap(NeutralLandscapes.classify!(rand(DistanceGradient(sources), (200, 200)), [0.5, 1, 1, 0.5]))
Example block output

Diamond Square

demolandscape(DiamondSquare())
Example block output

Midpoint Displacement

demolandscape(MidpointDisplacement())
Example block output diff --git a/dev/index.html b/dev/index.html index 985f849..9825854 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,36 +1,36 @@ -Index · NeutralLandscapes

NeutralLandscapes.jl

A pure Julia port of https://github.com/tretherington/nlmpy

Landscape models

NeutralLandscapes.DiamondSquareType
DiamondSquare <: NeutralLandscapeMaker
+Index · NeutralLandscapes

NeutralLandscapes.jl

A pure Julia port of https://github.com/tretherington/nlmpy

Landscape models

NeutralLandscapes.DiamondSquareType
DiamondSquare <: NeutralLandscapeMaker
 
 DiamondSquare(; H = 0.5) 
-DiamondSquare(H)

This type generates a neutral landscape using the diamond-squares algorithm, which produces fractals with variable spatial autocorrelation.

https://en.wikipedia.org/wiki/Diamond-square_algorithm

The algorithm is named diamond-square because it is an iterative procedure of "diamond" and "square" steps.

The degree of spatial autocorrelation is controlled by a parameter H, which varies from 0.0 (low autocorrelation) to 1.0 (high autocorrelation) –- note this is non-inclusive and H = 0 and H = 1 will not behave as expected. The result of the diamond-square algorithm is a fractal with dimension D = 2 + H.

A similar algorithm, midpoint-displacement, functions almost identically, except that in DiamondSquare, the square step interpolates edge midpoints from the nearest two corners and the square's center, where as midpoint-displacement only interpolates from the nearest corners (see MidpointDisplacement).

source
NeutralLandscapes.DiscreteVoronoiType
DiscreteVoronoi <: NeutralLandscapeMaker
+DiamondSquare(H)

This type generates a neutral landscape using the diamond-squares algorithm, which produces fractals with variable spatial autocorrelation.

https://en.wikipedia.org/wiki/Diamond-square_algorithm

The algorithm is named diamond-square because it is an iterative procedure of "diamond" and "square" steps.

The degree of spatial autocorrelation is controlled by a parameter H, which varies from 0.0 (low autocorrelation) to 1.0 (high autocorrelation) –- note this is non-inclusive and H = 0 and H = 1 will not behave as expected. The result of the diamond-square algorithm is a fractal with dimension D = 2 + H.

A similar algorithm, midpoint-displacement, functions almost identically, except that in DiamondSquare, the square step interpolates edge midpoints from the nearest two corners and the square's center, where as midpoint-displacement only interpolates from the nearest corners (see MidpointDisplacement).

source
NeutralLandscapes.DiscreteVoronoiType
DiscreteVoronoi <: NeutralLandscapeMaker
 
 DiscreteVoronoi(; n=3) 
-DiscreteVoronoi(n)

This type provides a rasterization of a Voronoi-like diagram. Assigns a value to each patch using a 1-NN algorithmm with n initial clusters. It is a NearestNeighborElement algorithmm with k neighbors set to 1. The default is to use three clusters.

source
NeutralLandscapes.DistanceGradientType
DistanceGradient <: NeutralLandscapeMaker
+DiscreteVoronoi(n)

This type provides a rasterization of a Voronoi-like diagram. Assigns a value to each patch using a 1-NN algorithmm with n initial clusters. It is a NearestNeighborElement algorithmm with k neighbors set to 1. The default is to use three clusters.

source
NeutralLandscapes.DistanceGradientType
DistanceGradient <: NeutralLandscapeMaker
 
 DistanceGradient(; sources=[1])
-DistanceGradient(sources)

The sources field is a Vector{Integer} of linear indices of the matrix, from which the distance must be calculated.

source
NeutralLandscapes.EdgeGradientType
EdgeGradient <: NeutralLandscapeMaker
+DistanceGradient(sources)

The sources field is a Vector{Integer} of linear indices of the matrix, from which the distance must be calculated.

source
NeutralLandscapes.EdgeGradientType
EdgeGradient <: NeutralLandscapeMaker
 
 EdgeGradient(; direction=360rand())
-EdgeGradient(direction)

This type is used to generate an edge gradient landscape, where values change as a bilinear function of the x and y coordinates. The direction is expressed as a floating point value, which will be in [0,360]. The inner constructor takes the mod of the value passed and 360, so that a value that is out of the correct interval will be corrected.

source
NeutralLandscapes.MidpointDisplacementType
MidpointDisplacement <: NeutralLandscapeMaker
+EdgeGradient(direction)

This type is used to generate an edge gradient landscape, where values change as a bilinear function of the x and y coordinates. The direction is expressed as a floating point value, which will be in [0,360]. The inner constructor takes the mod of the value passed and 360, so that a value that is out of the correct interval will be corrected.

source
NeutralLandscapes.MidpointDisplacementType
MidpointDisplacement <: NeutralLandscapeMaker
 
-MidpointDisplacement(; H = 0.5)

Creates a midpoint-displacement algorithm object MidpointDisplacement. The degree of spatial autocorrelation is controlled by a parameter H, which varies from 0.0 (low autocorrelation) to 1.0 (high autocorrelation) –- note this is non-inclusive and H = 0 and H = 1 will not behave as expected.

A similar algorithm, diamond-square, functions almost identically, except that in diamond-square, the square step interpolates edge midpoints from the nearest two corners and the square's center, where as MidpointDisplacement only interpolates from the nearest corners (see DiamondSquare).

source
NeutralLandscapes.NearestNeighborClusterType
NearestNeighborCluster <: NeutralLandscapeMaker
+MidpointDisplacement(; H = 0.5)

Creates a midpoint-displacement algorithm object MidpointDisplacement. The degree of spatial autocorrelation is controlled by a parameter H, which varies from 0.0 (low autocorrelation) to 1.0 (high autocorrelation) –- note this is non-inclusive and H = 0 and H = 1 will not behave as expected.

A similar algorithm, diamond-square, functions almost identically, except that in diamond-square, the square step interpolates edge midpoints from the nearest two corners and the square's center, where as MidpointDisplacement only interpolates from the nearest corners (see DiamondSquare).

source
NeutralLandscapes.NearestNeighborClusterType
NearestNeighborCluster <: NeutralLandscapeMaker
 
 NearestNeighborCluster(; p=0.5, n=:rook)
-NearestNeighborCluster(p, [n=:rook])

Create a random cluster nearest-neighbour neutral landscape model with values ranging 0-1. p sets the density of original clusters, and n sets the neighborhood for clustering (see ?label for neighborhood options)

source
NeutralLandscapes.NearestNeighborElementType
NearestNeighborElement <: NeutralLandscapeMaker
+NearestNeighborCluster(p, [n=:rook])

Create a random cluster nearest-neighbour neutral landscape model with values ranging 0-1. p sets the density of original clusters, and n sets the neighborhood for clustering (see ?label for neighborhood options)

source
NeutralLandscapes.NearestNeighborElementType
NearestNeighborElement <: NeutralLandscapeMaker
 
 NearestNeighborElement(; n=3, k=1)
-NearestNeighborElement(n, [k=1])

Assigns a value to each patch using a k-NN algorithmm with n initial clusters and k neighbors. The default is to use three cluster and a single neighbor.

source
NeutralLandscapes.NoGradientType
NoGradient <: NeutralLandscapeMaker
+NearestNeighborElement(n, [k=1])

Assigns a value to each patch using a k-NN algorithmm with n initial clusters and k neighbors. The default is to use three cluster and a single neighbor.

source
NeutralLandscapes.PerlinNoiseType
PerlinNoise <: NeutralLandscapeMaker
 
 PerlinNoise(; kw...)
-PerlinNoise(periods, [octaves=1, lacunarity=2, persistance=0.5, valley=:u])

Create a Perlin noise neutral landscape model with values ranging 0-1.

Keywords

  • periods::Tuple{Int,Int}=(1,1): the number of periods of Perlin noise across row and column dimensions for the first octave.
  • octaves::Int=1: the number of octaves that will form the Perlin noise.
  • lacunarity::Int=2 : the rate at which the frequency of periods increases for each octive.
  • persistance::Float64=0.5 : the rate at which the amplitude of periods decreases for each octive.
  • valley::Symbol=:u: the kind of valley bottom that will be mimicked::uproduces u-shaped valleys,:vproduces v-shaped valleys, and:-` produces flat bottomed valleys.

Note: This is a memory-intensive algorithm with some settings. Be careful using larger prime numbers for period when also using a large array size, high lacuarity and/or many octaves. Memory use scales with the lowest common multiple of periods.

source
NeutralLandscapes.PlanarGradientType
PlanarGradient <: NeutralLandscapeMaker
+PerlinNoise(periods, [octaves=1, lacunarity=2, persistance=0.5, valley=:u])

Create a Perlin noise neutral landscape model with values ranging 0-1.

Keywords

  • periods::Tuple{Int,Int}=(1,1): the number of periods of Perlin noise across row and column dimensions for the first octave.
  • octaves::Int=1: the number of octaves that will form the Perlin noise.
  • lacunarity::Int=2 : the rate at which the frequency of periods increases for each octive.
  • persistance::Float64=0.5 : the rate at which the amplitude of periods decreases for each octive.
  • valley::Symbol=:u: the kind of valley bottom that will be mimicked::uproduces u-shaped valleys,:vproduces v-shaped valleys, and:-` produces flat bottomed valleys.

Note: This is a memory-intensive algorithm with some settings. Be careful using larger prime numbers for period when also using a large array size, high lacuarity and/or many octaves. Memory use scales with the lowest common multiple of periods.

source
NeutralLandscapes.PlanarGradientType
PlanarGradient <: NeutralLandscapeMaker
 
 PlanarGradient(; direction=360rand())
-PlanarGradient(direction)

This type is used to generate a planar gradient landscape, where values change as a bilinear function of the x and y coordinates. The direction is expressed as a floating point value, which will be in [0,360]. The inner constructor takes the mod of the value passed and 360, so that a value that is out of the correct interval will be corrected.

source
NeutralLandscapes.RectangularClusterType
RectangularCluster <: NeutralLandscapeMaker
+PlanarGradient(direction)

This type is used to generate a planar gradient landscape, where values change as a bilinear function of the x and y coordinates. The direction is expressed as a floating point value, which will be in [0,360]. The inner constructor takes the mod of the value passed and 360, so that a value that is out of the correct interval will be corrected.

source
NeutralLandscapes.RectangularClusterType
RectangularCluster <: NeutralLandscapeMaker
 
 RectangularCluster(; minimum=2, maximum=4)
-RectangularCluster(minimum, [maximum=4])

Fills the landscape with rectangles containing a random value. The size of each rectangle/patch is between minimum and maximum (the two can be equal for a fixed size rectangle).

source
NeutralLandscapes.WaveSurfaceType
WaveSurface <: NeutralLandscapeMaker
+RectangularCluster(minimum, [maximum=4])

Fills the landscape with rectangles containing a random value. The size of each rectangle/patch is between minimum and maximum (the two can be equal for a fixed size rectangle).

source
NeutralLandscapes.WaveSurfaceType
WaveSurface <: NeutralLandscapeMaker
 
 WaveSurface(; direction=360rand(), periods=1)
-WaveSurface(direction, [periods=1])

Creates a sinusoidal landscape with a direction and a number of periods. If neither are specified, there will be a single period of random direction.

source

Landscape generating function

Base.randFunction
rand(alg, dims::Tuple{Vararg{Int64,2}}; mask=nothing) where {T <: Integer}

Creates a landscape of size dims (a tuple of two integers) following the model defined by alg. The mask argument accepts a matrix of boolean values, and is passed to mask! if it is not nothing.

source
Random.rand!Function
rand!(mat, alg) where {IT <: Integer}

Fill the matrix mat with a landscape created following the model defined by alg. The mask argument accepts a matrix of boolean values, and is passed to mask! if it is not nothing.

source

Temporal Change

NeutralLandscapes.TemporallyVariableUpdaterType
TemporallyVariableUpdater{D,S} <: NeutralLandscapeUpdater

A NeutralLandscapeUpdater that has a prescribed level of temporal variation (variability) and rate of change (rate), but no spatial correlation in where change is distributed.

source
NeutralLandscapes.SpatiallyAutocorrelatedUpdaterType
SpatiallyAutocorrelatedUpdater{SU,R,V}

A NeutralLandscapeUpdater that has a prescribed level of spatial variation (variability) and rate of change (rate), and where the spatial distribution of this change is proportional to a neutral landscape generated with spatialupdater at every time step.

TODO: make it possible to fix a given spatial updater at each timestep.

source
NeutralLandscapes.SpatiotemporallyAutocorrelatedUpdaterType
SpatiotemporallyAutocorrelatedUpdater{SU,R,V}

A NeutralLandscapeUpdater that has a prescribed level of spatial and temporal variation (variability) and rate of change (rate), and where the spatial distribution of this change is proportional to a neutral landscape generated with spatialupdater at every time step.

TODO: perhaps spatial and temporal should each have their own variability param

source
NeutralLandscapes.updateFunction
update(updater::T, mat)

Returns one-timestep applied to mat based on the NeutralLandscapeUpdater provided (updater).

source
update(updater::T, mat, n::I)

Returns a sequence of length n where the original neutral landscape mat is updated by the NeutralLandscapeUpdater update for n timesteps.

source
NeutralLandscapes.normalizeFunction
normalize(mats::Vector{M})

Normalizes a vector of neutral landscapes mats such that all values between 0 and 1. Note that this does not preserve the rate parameter for a given NeutralLandscapeUpdater, and instead rescales it proportional to the difference between the total maximum and total minimum across all mats.

source
NeutralLandscapes.rateFunction
spatialupdater(up::NeutralLandscapeUpdater)

All NeutralLandscapeUpdaters have a field rate which defines the expected (or mean) change across all cells per timestep.

source
NeutralLandscapes.variabilityFunction
variability(up::NeutralLandscapeUpdater)

Returns the variability of a given NeutralLandscapeUpdater. The variability of an updater is how much temporal variation there will be in a generated time-series of landscapes.

source
NeutralLandscapes.spatialupdaterFunction
spatialupdater(up::NeutralLandscapeUpdater)

All NeutralLandscapeUpdater's have a spatialupdater field which is either a NeutralLandscapeMaker, or Missing (in the case of temporally correlated updaters).

source
NeutralLandscapes._updateFunction
_update(tvu::TemporallyVariableUpdater, mat)

Updates mat using temporally autocorrelated change, using the direction and rate parameters from tvu.

TODO: this doesn't have to be a Normal distribution, could be arbitrary distribution that is continuous and can have mean 0 (or that can be transformed to have mean 0)

source
_update(sau::SpatiallyAutocorrelatedUpdater, mat; transform=ZScoreTransform)

Updates mat using spatially autocorrelated change, using the direction, rate, and spatial updater parameters from sau.

TODO: doesn't necessarily have to be a ZScoreTransform, could be arbitrary argument

source
_update(stau::SpatiotemporallyAutocorrelatedUpdater, mat)

Updates mat using temporally autocorrelated change, using the direction, rate, and spatialupdater parameters from stau.

TODO: doesn't necessarily have to be a Normal distribution or ZScoreTransform, could be arbitrary argument

source

Other functions

NeutralLandscapes.blendFunction
blend(arrays[, scaling])

Blend arrays weighted by scaling factors.

source
blend(clusterarray, arrays[, scaling])

Blend a primary cluster NLM with other arrays in which the mean value per cluster is weighted by scaling factors.

source
NeutralLandscapes.labelFunction
label(mat[, neighborhood = :rook])

Assign an arbitrary label to all clusters of contiguous matrix elements with the same value. Returns a matrix of values and the total number of final clusters. The neighborhood structure can be :rook :queen :diagonal 0 1 0 1 1 1 0 1 1 1 x 1 1 x 1 1 x 1 0 1 0 1 1 1 1 1 0 :rook is the default

source
NeutralLandscapes.mask!Function
mask!(array::AbstractArray{<:AbstractFloat}, maskarray::AbstractArray{<:AbstractBool})

Modifies array so that the positions at which maskarray is false are replaced by NaN.

source
+WaveSurface(direction, [periods=1])

Creates a sinusoidal landscape with a direction and a number of periods. If neither are specified, there will be a single period of random direction.

source

Landscape generating function

Base.randFunction
rand(alg, dims::Tuple{Vararg{Int64,2}}; mask=nothing) where {T <: Integer}

Creates a landscape of size dims (a tuple of two integers) following the model defined by alg. The mask argument accepts a matrix of boolean values, and is passed to mask! if it is not nothing.

source
Random.rand!Function
rand!(mat, alg) where {IT <: Integer}

Fill the matrix mat with a landscape created following the model defined by alg. The mask argument accepts a matrix of boolean values, and is passed to mask! if it is not nothing.

source

Temporal Change

NeutralLandscapes.TemporallyVariableUpdaterType
TemporallyVariableUpdater{D,S} <: NeutralLandscapeUpdater

A NeutralLandscapeUpdater that has a prescribed level of temporal variation (variability) and rate of change (rate), but no spatial correlation in where change is distributed.

source
NeutralLandscapes.SpatiallyAutocorrelatedUpdaterType
SpatiallyAutocorrelatedUpdater{SU,R,V}

A NeutralLandscapeUpdater that has a prescribed level of spatial variation (variability) and rate of change (rate), and where the spatial distribution of this change is proportional to a neutral landscape generated with spatialupdater at every time step.

TODO: make it possible to fix a given spatial updater at each timestep.

source
NeutralLandscapes.SpatiotemporallyAutocorrelatedUpdaterType
SpatiotemporallyAutocorrelatedUpdater{SU,R,V}

A NeutralLandscapeUpdater that has a prescribed level of spatial and temporal variation (variability) and rate of change (rate), and where the spatial distribution of this change is proportional to a neutral landscape generated with spatialupdater at every time step.

TODO: perhaps spatial and temporal should each have their own variability param

source
NeutralLandscapes.updateFunction
update(updater::T, mat)

Returns one-timestep applied to mat based on the NeutralLandscapeUpdater provided (updater).

source
update(updater::T, mat, n::I)

Returns a sequence of length n where the original neutral landscape mat is updated by the NeutralLandscapeUpdater update for n timesteps.

source
NeutralLandscapes.normalizeFunction
normalize(mats::Vector{M})

Normalizes a vector of neutral landscapes mats such that all values between 0 and 1. Note that this does not preserve the rate parameter for a given NeutralLandscapeUpdater, and instead rescales it proportional to the difference between the total maximum and total minimum across all mats.

source
NeutralLandscapes.rateFunction
spatialupdater(up::NeutralLandscapeUpdater)

All NeutralLandscapeUpdaters have a field rate which defines the expected (or mean) change across all cells per timestep.

source
NeutralLandscapes.variabilityFunction
variability(up::NeutralLandscapeUpdater)

Returns the variability of a given NeutralLandscapeUpdater. The variability of an updater is how much temporal variation there will be in a generated time-series of landscapes.

source
NeutralLandscapes.spatialupdaterFunction
spatialupdater(up::NeutralLandscapeUpdater)

All NeutralLandscapeUpdater's have a spatialupdater field which is either a NeutralLandscapeMaker, or Missing (in the case of temporally correlated updaters).

source
NeutralLandscapes._updateFunction
_update(tvu::TemporallyVariableUpdater, mat)

Updates mat using temporally autocorrelated change, using the direction and rate parameters from tvu.

TODO: this doesn't have to be a Normal distribution, could be arbitrary distribution that is continuous and can have mean 0 (or that can be transformed to have mean 0)

source
_update(sau::SpatiallyAutocorrelatedUpdater, mat; transform=ZScoreTransform)

Updates mat using spatially autocorrelated change, using the direction, rate, and spatial updater parameters from sau.

TODO: doesn't necessarily have to be a ZScoreTransform, could be arbitrary argument

source
_update(stau::SpatiotemporallyAutocorrelatedUpdater, mat)

Updates mat using temporally autocorrelated change, using the direction, rate, and spatialupdater parameters from stau.

TODO: doesn't necessarily have to be a Normal distribution or ZScoreTransform, could be arbitrary argument

source

Other functions

NeutralLandscapes.blendFunction
blend(arrays[, scaling])

Blend arrays weighted by scaling factors.

source
blend(clusterarray, arrays[, scaling])

Blend a primary cluster NLM with other arrays in which the mean value per cluster is weighted by scaling factors.

source
NeutralLandscapes.labelFunction
label(mat[, neighborhood = :rook])

Assign an arbitrary label to all clusters of contiguous matrix elements with the same value. Returns a matrix of values and the total number of final clusters. The neighborhood structure can be :rook :queen :diagonal 0 1 0 1 1 1 0 1 1 1 x 1 1 x 1 1 x 1 0 1 0 1 1 1 1 1 0 :rook is the default

source
NeutralLandscapes.mask!Function
mask!(array::AbstractArray{<:AbstractFloat}, maskarray::AbstractArray{<:AbstractBool})

Modifies array so that the positions at which maskarray is false are replaced by NaN.

source
diff --git a/dev/vignettes/overview/index.html b/dev/vignettes/overview/index.html index ab769da..3e7471f 100644 --- a/dev/vignettes/overview/index.html +++ b/dev/vignettes/overview/index.html @@ -1,2 +1,2 @@ -Overview · NeutralLandscapes
+Overview · NeutralLandscapes