Skip to content

Commit 1e00a94

Browse files
committed
added quickperms and dependents, created quickperms class and hopefully implemented permutation
1 parent e020698 commit 1e00a94

File tree

3 files changed

+393
-0
lines changed

3 files changed

+393
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
classdef Quickperms < nla.edge.permutationMethods.Base
2+
%QUICKPERMS Implementation of Palm's quickperms method
3+
%
4+
%
5+
6+
properties
7+
permutation_count = 0
8+
end
9+
10+
methods
11+
function obj = Quickperms()
12+
end
13+
14+
function permuted_input_struct = permute(obj, orig_input_struct)
15+
permuted_input_struct = copy(orig_input_struct);
16+
permuted_input_struct.behavior = orig_input_struct.behavior(orig_input_struct.permutations(obj.permutation_count + 1));
17+
obj.permutation_count = obj.permutation_count + 1;
18+
end
19+
20+
function extended_input_struct = createPermutations(obj, orig_input_struct, number_permutations)
21+
extended_input_struct = orig_input_struct;
22+
[permutations, ~] = nla.lib.palm_quickperms(orig_input_struct.behavior, orig_input_struct.permutation_groups, number_permutations);
23+
extended_input_struct.permutations = permutations;
24+
end
25+
end
26+
end

0 commit comments

Comments
 (0)