10 results

Generate sequences of random derangement

A derangement is a permutation of the elements of a set, such that no element appears in its original position.The code use non rejection method for better predictable runtime.

RANDPERMFULL

Version 4.0.0.1

by Jos (10584)

RANDPERMFULL (N) returns a random derangement (complete permutation) of the integers from 1 to N

RANDPERMFULL(N) creates a row vector R, such that R(j) ~= j for all j=1:N. This type of permutation is called a derangement.N should be larger than 1.Example:randpermfull(7) % might be [2 4 5 6 1 7 3], but not

CeItrConnGUI

Version 1.0.0.0

by Gal Haspel

This GUI is used to study the iterativity of connections within the locomotion network of C. elegans

RPG Lab

Version 1.2.0.0

by Derek O'Connor

A set of functions for generating and testing random permutations of the integers (1,2, ..., n).

The main functions provided are:1. p = GRPfys(n); generates a random permutation of length n.2. p = GRPmex(n); generates a random permutation of length n.3. p = GRDrej(n); generates a derangement of

Shuffle

Version 1.4.0.0

by Jan

Random permutation of array elements, C-Mex: much faster than RANDPERM

output elements. Optional, default: N.OUTPUT: Index: [1:NOut] elements of shuffled [1:N] vector in the smallest possible integer type.3. Derangement index:Index = Shuffle(N, 'derange', NOut)Equivalent to

Partial random permutation of a vector.

("derangement"). If you don't like this, use the following syntax: X = PARTPERM(A,IDX,'allow') randomly permutes the elements of vector A which are specified by vector IDX, but allows indexed elements to remain

RAND_INT(R,N) returns an n-by-n matrix containing pseudo-random integer values from range R.

RANDPERMFULL (derangement)#17981 - RANDBLOCK#27076 - Shuffle

Subfactorial

Version 1.0.0.0

by Yash

Calculate subfactorial of integers up to 170.

by Ragaar 13 Oct 2009

generates random variates from over 870 univariate distributions