A.51 library(solution_sequences): Modify solution sequences
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(solution_sequences): Modify solution sequences
          • distinct/1
          • distinct/2
          • reduced/1
          • reduced/3
          • limit/2
          • offset/2
          • call_nth/2
          • order_by/2
          • group_by/4
    • Packages
Availability::- use_module(library(solution_sequences)).(can be autoloaded)
Sourcereduced(:Goal)
reduced(?Witness, :Goal, +Options)
Similar to distinct/1, but does not guarantee unique results in return for using a limited amount of memory. Both distinct/1 and reduced/1 create a table that block duplicate results. For distinct/1, this table may get arbitrary large. In contrast, reduced/1 discards the table and starts a new one of the table size exceeds a specified limit. This filter is useful for reducing the number of answers when processing large or infinite long tail distributions. Options:
size_limit(+Integer)
Max number of elements kept in the table. Default is 10,000.