Skip to content

Commit

Permalink
Rand: Add metadata to curveball for spatially constrained swapper
Browse files Browse the repository at this point in the history
Metadata only at this stage.
  • Loading branch information
shawnlaffan committed Nov 6, 2024
1 parent fb7e9fa commit 7a8d3f7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/Biodiverse/Randomise/CurveBall.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,27 @@ number of swaps.
TOOLTIP_SWAP_ATTEMPTS
;

sub get_curveball_spatial_allocation_metadata {
my $self = shift;

my $spatial_condition_param = bless {
name => 'spatial_condition_for_swap_pairs',
label_text => "Spatial condition\nto define a target swap group\nneighbourhood",
default => '# default is whole data set',
type => 'spatial_conditions',
tooltip => 'On selecting a first group, the second group to swap labels with '
. 'will be selected within the specified neighbourhood. '
. 'If left blank then any group can be selected.',
}, $parameter_rand_metadata_class;

return $spatial_condition_param;
}

sub get_metadata_rand_curveball {
my $self = shift;

my @parameters = (
$self->get_curveball_spatial_allocation_metadata,
$self->get_common_independent_swaps_metadata,
$self->get_common_rand_metadata,
);
Expand Down

0 comments on commit 7a8d3f7

Please sign in to comment.