7
votes
0answers
233 views

Using Compile to speed up Function with PermutationProduct

I have the following fairly simple routine dot involving PermutationProduct that I wish to speed up using ...
9
votes
4answers
229 views

Efficient way to turn a subset into a permutation

For an input vector $\{a_1,a_2,\ldots,a_n,b_{1},b_2,\ldots,b_{m}\}$ and a list of ordered positions $\{k_1,k_2,\ldots, k_n\}$, such that $1\leqslant k_1 < k_2 < \ldots < k_n \leqslant ...