Skip to content

A layer structure for any ICN

The layer.jl file defines a Layer structure and several associated functions for manipulating and interacting with this structure in the context of an Interpretable Compositional Network (ICN).

The Layer structure is used to store a LittleDict of operations that can be selected during the learning phase of an ICN. Each layer can be exclusive, meaning only one operation can be selected at a time. This is particularly useful in the context of ICNs, which are used to learn alternative expressions for highly combinatorial functions, such as those found in Constraint-based Local Search solvers.

# CompositionalNetworks.LayerType.
julia
Layer

A structure to store a LittleDict of operations that can be selected during the learning phase of an ICN. If the layer is exclusive, only one operation can be selected at a time.

source


# CompositionalNetworks.functionsFunction.
julia
functions(layer)

Access the operations of a layer. The container is ordered.

source


# Base.lengthMethod.
julia
length(layer)

Return the number of operations in a layer.

source


# CompositionalNetworks.excluFunction.
julia
exclu(layer)

Return true if the layer has mutually exclusive operations.

source


# CompositionalNetworks.symbolFunction.
julia
symbol(layer, i)

Return the i-th symbols of the operations in a given layer.

source


# CompositionalNetworks.nbits_excluFunction.
julia
nbits_exclu(layer)

Convert the length of an exclusive layer into a number of bits.

source


# CompositionalNetworks.show_layerFunction.
julia
show_layer(layer)

Return a string that contains the elements in a layer.

source


# CompositionalNetworks.selected_sizeFunction.
julia
selected_size(layer, layer_weights)

Return the number of operations selected by layer_weights in layer.

source


# CompositionalNetworks.is_viableFunction.
julia
is_viable(layer, w)
is_viable(icn)
is_viable(icn, w)

Assert if a pair of layer/icn and weights compose a viable pattern. If no weights are given with an icn, it will check the current internal value.

source


# CompositionalNetworks.generate_inclusive_operationsFunction.
julia
generate_inclusive_operations(predicate, bits)
generate_exclusive_operation(max_op_number)

Generates the operations (weights) of a layer with inclusive/exclusive operations.

source


# CompositionalNetworks.generate_exclusive_operationFunction.
julia
generate_exclusive_operation(max_op_number)

Generates the operations (weights) of a layer with exclusive operations.

source


Missing docstring.

Missing docstring for generate_weigths. Check Documenter's build log for details.