protocol
cartesian_products_protocol
Protocol for Cartesian-product operations over lists.
logtalk_load(cartesian_products(loader))staticPublic predicates
cartesian_product/2
Generates the Cartesian product of a list of lists using default order.
staticcartesian_product(Lists,Product)cartesian_product(+list(list),-list) - onecartesian_tuple/2
True iff the second argument is a tuple obtained by selecting one element from each list in the first argument using default order.
staticcartesian_tuple(Lists,Tuple)cartesian_tuple(+list(list),-list) - one_or_morecartesian_product/3
Generates the Cartesian product with the given order: default or lexicographic.
staticcartesian_product(Lists,Order,Product)cartesian_product(+list(list),+atom,-list) - onecartesian_tuple/3
True iff the third argument is a Cartesian-product tuple with the given order: default or lexicographic.
staticcartesian_tuple(Lists,Order,Tuple)cartesian_tuple(+list(list),+atom,-list) - one_or_moredistinct_cartesian_product/2
Generates the Cartesian product after deduplicating repeated values in each factor list using default order.
staticdistinct_cartesian_product(Lists,Product)distinct_cartesian_product(+list(list),-list) - onedistinct_cartesian_tuple/2
True iff the second argument is a tuple in the distinct Cartesian product of the factor lists using default order.
staticdistinct_cartesian_tuple(Lists,Tuple)distinct_cartesian_tuple(+list(list),-list) - one_or_moredistinct_cartesian_product/3
Generates the distinct Cartesian product with the given order: default or lexicographic.
staticdistinct_cartesian_product(Lists,Order,Product)distinct_cartesian_product(+list(list),+atom,-list) - onedistinct_cartesian_tuple/3
True iff the third argument is a tuple in the distinct Cartesian product with the given order: default or lexicographic.
staticdistinct_cartesian_tuple(Lists,Order,Tuple)distinct_cartesian_tuple(+list(list),+atom,-list) - one_or_morecount_cartesian_product/2
Counts the number of tuples in the Cartesian product of a list of lists.
staticcount_cartesian_product(Lists,Count)count_cartesian_product(+list(list),-integer) - onecount_distinct_cartesian_product/2
Counts the number of tuples in the distinct Cartesian product after deduplicating repeated values in each factor list.
staticcount_distinct_cartesian_product(Lists,Count)count_distinct_cartesian_product(+list(list),-integer) - onenth_cartesian_tuple/3
Returns the Cartesian-product tuple at a given zero-based index using default order.
staticnth_cartesian_tuple(Lists,Index,Tuple)nth_cartesian_tuple(+list(list),+integer,-list) - zero_or_onenth_cartesian_tuple/4
Returns the Cartesian-product tuple at a given zero-based index in the given order: default or lexicographic.
staticnth_cartesian_tuple(Lists,Order,Index,Tuple)nth_cartesian_tuple(+list(list),+atom,+integer,-list) - zero_or_onecartesian_tuple_index/3
Returns the zero-based index of a Cartesian-product tuple using default order.
staticcartesian_tuple_index(Lists,Tuple,Index)cartesian_tuple_index(+list(list),+list,-integer) - zero_or_onecartesian_tuple_index/4
Returns the zero-based index of a Cartesian-product tuple in the given order: default or lexicographic.
staticcartesian_tuple_index(Lists,Order,Tuple,Index)cartesian_tuple_index(+list(list),+atom,+list,-integer) - zero_or_onenth_distinct_cartesian_tuple/3
Returns the distinct Cartesian-product tuple at a given zero-based index in default generation order.
staticnth_distinct_cartesian_tuple(Lists,Index,Tuple)nth_distinct_cartesian_tuple(+list(list),+integer,-list) - zero_or_onedistinct_cartesian_tuple_index/3
Returns the zero-based index of a distinct Cartesian-product tuple in default generation order.
staticdistinct_cartesian_tuple_index(Lists,Tuple,Index)distinct_cartesian_tuple_index(+list(list),+list,-integer) - zero_or_onerandom_cartesian_tuple/2
Returns a random Cartesian-product tuple.
staticrandom_cartesian_tuple(Lists,Tuple)random_cartesian_tuple(+list(list),-list) - zero_or_onesample_cartesian_tuples/3
Returns SampleCount random Cartesian-product tuples, sampled with replacement.
staticsample_cartesian_tuples(Lists,SampleCount,Samples)sample_cartesian_tuples(+list(list),+integer,-list) - zero_or_onerandom_distinct_cartesian_tuple/2
Returns a random tuple from the distinct Cartesian product after deduplicating repeated values in each factor list.
staticrandom_distinct_cartesian_tuple(Lists,Tuple)random_distinct_cartesian_tuple(+list(list),-list) - zero_or_onesample_distinct_cartesian_tuples/3
Returns SampleCount random tuples from the distinct Cartesian product, sampled with replacement.
staticsample_distinct_cartesian_tuples(Lists,SampleCount,Samples)sample_distinct_cartesian_tuples(+list(list),+integer,-list) - zero_or_onenext_cartesian_tuple/3
Returns the next distinct Cartesian-product tuple in lexicographic order induced by the factor lists.
staticnext_cartesian_tuple(Lists,Tuple,Next)next_cartesian_tuple(+list(list),+list,-list) - zero_or_oneprevious_cartesian_tuple/3
Returns the previous distinct Cartesian-product tuple in lexicographic order induced by the factor lists.
staticprevious_cartesian_tuple(Lists,Tuple,Previous)previous_cartesian_tuple(+list(list),+list,-list) - zero_or_oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)