Combinatorics
Module
UTCGP.listtuple_combinatorics — Module
Combinatios of 2 elements
Exports :
- bundle_listtuple_combinatorics :
vector_of_productsvector_of_combinations
Functions
UTCGP.listtuple_combinatorics.vector_of_products — Function
_vector_of_products(list_a::Vector{T}, list_b::Vector{T}, args...)Calculates the product (combinations) between list_a and list_b and flattens the result.
julia> vector_of_products(["hungry"],["yes","no"])
2-element Vector{Tuple{String, String}}:
("hungry", "yes")
("hungry", "no")UTCGP.listtuple_combinatorics.vector_of_combinations — Function
vector_of_combinations(v::Vector{T})Returns all combinations (of size 2) between the elements of the vector.
julia> vector_of_combinations(["hungry","yes","no"])
3-element Vector{Tuple{String, String}}:
("hungry", "yes")
("hungry", "no")
("yes", "no")