Help for this page

Select Code to Download


  1. or download this
    # randomly choose subsets of items from a set, without replacement.
    # items in the set are not equally probable.
    ...
      my @items = choose_items(2, \%weights, $tree);
      print "@items\n";
    }