-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ee09b6
commit 78f006b
Showing
40 changed files
with
510 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
module BiodiversityObservationNetworks | ||
|
||
using SimpleSDMLayers | ||
using Distributions | ||
using Random | ||
using HaltonSequences | ||
using StatsBase | ||
using SpecialFunctions | ||
using ProgressMeter | ||
using SliceMap | ||
using JuMP | ||
using HiGHS | ||
using LinearAlgebra | ||
using Term | ||
using TestItems | ||
|
||
include("types.jl") | ||
export BONSampler | ||
export Sites, numsites, pool | ||
export LayerType, DataLayer, InclusionProbability | ||
export Layer, Stack | ||
|
||
include("sample.jl") | ||
export sample | ||
|
||
include("exceptions.jl") | ||
export BONException, TooFewSites, TooManySites | ||
|
||
include("simplerandom.jl") | ||
export SimpleRandom | ||
|
||
include("spatialstratified.jl") | ||
export SpatiallyStratified | ||
|
||
include("balancedacceptance.jl") | ||
export BalancedAcceptance | ||
|
||
include("weightedbas.jl") | ||
export WeightedBalancedAcceptance | ||
|
||
include("adaptivehotspot.jl") | ||
export AdaptiveHotspot | ||
|
||
include("cubesampling.jl") | ||
export CubeSampling | ||
|
||
include("fractaltriad.jl") | ||
export FractalTriad | ||
|
||
include("grts.jl") | ||
export GeneralizedRandomTessellatedStratified | ||
|
||
include("uniqueness.jl") | ||
export Uniqueness | ||
|
||
#include("seed.jl") | ||
#export seed, seed! | ||
|
||
#include("refine.jl") | ||
#export refine, refine! | ||
|
||
include("entropize.jl") | ||
export entropize, entropize! | ||
|
||
include("utils.jl") | ||
export stack | ||
|
||
end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
|
||
|
||
|
||
|
||
SDMLayer | ||
Matrix | ||
|
||
struct Layer{T} | ||
layer::T | ||
end | ||
|
||
struct Stack{T} | ||
stack::Vector{Layer{T}} | ||
end | ||
|
||
|
||
|
||
abstract type InclusionType end | ||
struct CategoricalInclusion <: InclusionType | ||
layer::Layer | ||
inclusion_probability::Dict | ||
end | ||
struct ContinuousInclusion <: InclusionType | ||
layer::Layer | ||
end | ||
|
||
|
||
|
||
struct InclusionProbability{<:InclusionType} | ||
|
||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
function sample(alg::BONSampler) | ||
_sample!( | ||
_allocate_sites(numsites(alg)), | ||
_default_pool(alg), | ||
alg | ||
) | ||
end | ||
|
||
|
||
function sample(alg::BONSampler, l::L) where L<:Layer | ||
_sample!( | ||
_allocate_sites(numsites(alg)), | ||
l, | ||
alg | ||
) | ||
end | ||
|
||
|
||
function sample(alg::BONSampler, candidates::C) where C<:Sites | ||
_sample!( | ||
_allocate_sites(numsites(alg)), | ||
candidates, | ||
alg | ||
) | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module BONsMakieExt | ||
|
||
@info "Loading Makie Extension for BiodiversityObservationNetworks.jl..." | ||
|
||
@static if isdefined(Base, :get_extension) | ||
using Makie, BiodiversityObservationNetworks | ||
else | ||
using ..Makie, ..BiodiversityObservationNetworks | ||
end | ||
|
||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,41 @@ | ||
module BiodiversityObservationNetworks | ||
|
||
using SimpleSDMLayers | ||
using Distributions | ||
using Random | ||
using HaltonSequences | ||
using StatsBase | ||
using SpecialFunctions | ||
using ProgressMeter | ||
using SliceMap | ||
using JuMP | ||
using HiGHS | ||
using LinearAlgebra | ||
using Term | ||
using TestItems | ||
|
||
include("types.jl") | ||
export BONSampler | ||
export Sites, numsites, pool | ||
export LayerType, DataLayer, InclusionProbability | ||
export Layer, Stack | ||
|
||
include("sample.jl") | ||
export sample | ||
|
||
include("exceptions.jl") | ||
export BONException, TooFewSites, TooManySites | ||
|
||
include("simplerandom.jl") | ||
export SimpleRandom | ||
|
||
include("spatialstratified.jl") | ||
export SpatiallyStratified | ||
|
||
include("balancedacceptance.jl") | ||
export BalancedAcceptance | ||
|
||
include("weightedbas.jl") | ||
export WeightedBalancedAcceptance | ||
|
||
include("adaptivehotspot.jl") | ||
export AdaptiveHotspot | ||
|
||
include("cubesampling.jl") | ||
export CubeSampling | ||
|
||
include("fractaltriad.jl") | ||
export FractalTriad | ||
|
||
include("grts.jl") | ||
export GeneralizedRandomTessellatedStratified | ||
|
||
include("uniqueness.jl") | ||
export Uniqueness | ||
|
||
#include("seed.jl") | ||
#export seed, seed! | ||
|
||
#include("refine.jl") | ||
#export refine, refine! | ||
|
||
include("entropize.jl") | ||
export entropize, entropize! | ||
|
||
include("utils.jl") | ||
export stack | ||
|
||
end | ||
using Clustering | ||
using DelaunayTriangulation | ||
using Distributions | ||
using GeometryOps | ||
using GeoInterface | ||
using MultivariateStats | ||
using SpeciesDistributionToolkit | ||
using Random | ||
|
||
import GeoInterface as GI | ||
import GeometryOps as GO | ||
import SpeciesDistributionToolkit as SDT | ||
import SpeciesDistributionToolkit.GeoJSON as GJSON | ||
|
||
export BiodiversityObservationNetwork | ||
export Node | ||
export Polygon | ||
export Raster | ||
export RasterStack | ||
|
||
export BONSampler | ||
export SimpleRandom, Grid, KMeans, SpatiallyStratified | ||
export sample | ||
export datatype | ||
export nonempty | ||
export is_polygonizable, is_rasterizable, is_bonifyable | ||
|
||
include(joinpath("geometry", "bon.jl")) | ||
include(joinpath("geometry", "polygon.jl")) | ||
include(joinpath("geometry", "raster.jl")) | ||
include(joinpath("geometry", "stack.jl")) | ||
|
||
include("sample.jl") | ||
include(joinpath("samplers", "simplerandom.jl")) | ||
include(joinpath("samplers", "grid.jl")) | ||
include(joinpath("samplers", "kmeans.jl")) | ||
include(joinpath("samplers", "spatiallystratified.jl")) | ||
|
||
|
||
end |
Oops, something went wrong.