F.2 Library predicates
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Summary
        • Library predicates
          • library(aggregate)
          • library(ansi_term)
          • library(apply)
          • library(assoc)
          • library(broadcast)
          • library(charsio)
          • library(check)
          • library(clpb)
          • library(clpfd)
          • library(clpqr)
          • library(csv)
          • library(dcgbasics)
          • library(dcghighorder)
          • library(debug)
          • library(dicts)
          • library(error)
          • library(fastrw)
          • library(explain)
          • library(help)
          • library(gensym)
          • library(heaps)
          • library(increval)
          • library(intercept)
          • library(iostream)
          • library(listing)
          • library(lists)
          • library(main)
          • library(occurs)
          • library(option)
          • library(optparse)
          • library(ordsets)
          • library(persistency)
          • library(portraytext)
          • library(predicate_options)
          • library(prologdebug)
          • library(prologjiti)
          • library(prologpack)
          • library(prologxref)
          • library(pairs)
          • library(pio)
          • library(random)
          • library(rbtrees)
          • library(readutil)
          • library(record)
          • library(registry)
          • library(settings)
          • library(simplex)
          • library(statistics)
          • library(terms)
          • library(ugraphs)
          • library(url)
          • library(www_browser)
          • library(solution_sequences)
          • library(thread)
          • library(thread_pool)
          • library(varnumbers)
          • library(yall)
    • Packages

F.2.41 library(random)

getrand/1Query/set the state of the random generator.
maybe/0Succeed/fail with equal probability (variant of maybe/1).
maybe/1Succeed with probability P, fail with probability 1-P.
maybe/2Succeed with probability K/N (variant of maybe/1).
random/1Binds R to a new random float in the _open_ interval (0.0,1.0).
random/3Generate a random integer or float in a range.
random_between/3Binds R to a random integer in [L,U] (i.e., including both L and U).
random_member/2X is a random member of List.
random_numlist/4Unify List with an ascending list of integers between L and U (inclusive).
random_perm2/4Does X=A,Y=B or X=B,Y=A with equal probability.
random_permutation/2Permutation is a random permutation of List.
random_select/3Randomly select or insert an element.
random_subseq/3Selects a random subsequence Subseq of List, with Complement containing all elements of List that were not selected.
randseq/3S is a list of K unique random integers in the range 1..N.
randset/3S is a sorted list of K unique random integers in the range 1..N.
setrand/1Query/set the state of the random generator.