CompositionalNetworks.jl
Documentation for CompositionalNetworks.jl.
Utilities
CompositionalNetworks.map_tr! Function
map_tr!(f, x, X, param)Return an anonymous function that applies f to all elements of x and store the result in X, with a parameter param (which is set to nothing for function with no parameter).
CompositionalNetworks.lazy Function
lazy(funcs::Function...)Generate methods extended to a vector instead of one of its components. A function f should have the following signature: f(i::Int, x::V).
CompositionalNetworks.lazy_param Function
lazy_param(funcs::Function...)Generate methods extended to a vector instead of one of its components. A function f should have the following signature: f(i::Int, x::V; param).
CompositionalNetworks.as_bitvector Function
as_bitvector(n::Int, max_n::Int = n)Convert an Int to a BitVector of minimal size (relatively to max_n).
CompositionalNetworks.reduce_symbols Function
reduce_symbols(symbols, sep)Produce a formatted string that separates the symbols by sep. Used internally for show_composition.
CompositionalNetworks.tr_in Function
tr_in(tr, X, x, param)Application of an operation from the transformation layer. Used to generate more efficient code for all compositions.
Metrics
CompositionalNetworks.hamming Function
hamming(x, X)Compute the hamming distance of x over a collection of solutions X, i.e. the minimal number of variables to switch in xto reach a solution.
CompositionalNetworks.weights_bias Function
weights_bias(x)A metric that bias x towards operations with a lower bit. Do not affect the main metric.