Skip to content

CompositionalNetworks.jl

Documentation for CompositionalNetworks.jl.

Utilities

CompositionalNetworks.map_tr! Function
julia
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).

source

CompositionalNetworks.lazy Function
julia
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).

source

CompositionalNetworks.lazy_param Function
julia
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).

source

CompositionalNetworks.as_bitvector Function
julia
as_bitvector(n::Int, max_n::Int = n)

Convert an Int to a BitVector of minimal size (relatively to max_n).

source

CompositionalNetworks.as_int Function
julia
as_int(v::AbstractVector)

Convert a BitVector into an Int.

source

CompositionalNetworks.reduce_symbols Function
julia
reduce_symbols(symbols, sep)

Produce a formatted string that separates the symbols by sep. Used internally for show_composition.

source

CompositionalNetworks.tr_in Function
julia
tr_in(tr, X, x, param)

Application of an operation from the transformation layer. Used to generate more efficient code for all compositions.

source

Metrics

CompositionalNetworks.hamming Function
julia
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.

source

CompositionalNetworks.minkowski Function
julia
minkowski(x, X, p)

source

CompositionalNetworks.manhattan Function
julia
manhattan(x, X)

source

CompositionalNetworks.weights_bias Function
julia
weights_bias(x)

A metric that bias x towards operations with a lower bit. Do not affect the main metric.

source