Help for this page

Select Code to Download


  1. or download this
    >  # @p is the position of each element in @o,
    >  # that is, @o = (0..$#e)[@p]
    >  my @p= (0..$#e);
    >  # Note that it is also true that @p = (0..$#e)[@o].
    
  2. or download this
      # an arbitrary permutation
      @o = @permutation = (1,2,0);
    ...
      @p = @positions   = (2,0,1); 
      # And then 
      print " o[p] = (@o[@p]) = p[o] = (@p[@o]) \n";
    
  3. or download this
     o[p] = (0 1 2) = p[o] = (0 1 2)