alogos.systems.dsge._cached_calculations

Functions

maps(grammar)

Calculate different mappings used by DSGE at various points.

non_recursive_rhs(grammar)

Determine which right-hand sides of rules are not recursive.

get_all_valid_codons(nt, current_depth, max_depth, nt_to_num_options, non_recursive_rhs)

Get all valid codons depending on current and max depth.

get_first_valid_codon(nt, current_depth, max_depth, nt_to_num_options, non_recursive_rhs)

Get the first valid codon depending on current and max depth.

get_random_valid_codon(nt, current_depth, max_depth, nt_to_num_options, non_recursive_rhs)

Get a random valid codons depending on current and max depth.

get_tree_depth(grammar, genotype, nt_to_gene, nt_to_cnt)

Determine the depth of the derivation tree encoded by a genotype.


Detailed object descriptions

alogos.systems.dsge._cached_calculations.maps(grammar)[source]

Calculate different mappings used by DSGE at various points.

alogos.systems.dsge._cached_calculations.non_recursive_rhs(grammar)[source]

Determine which right-hand sides of rules are not recursive.

alogos.systems.dsge._cached_calculations.get_all_valid_codons(nt, current_depth, max_depth, nt_to_num_options, non_recursive_rhs)[source]

Get all valid codons depending on current and max depth.

alogos.systems.dsge._cached_calculations.get_first_valid_codon(nt, current_depth, max_depth, nt_to_num_options, non_recursive_rhs)[source]

Get the first valid codon depending on current and max depth.

alogos.systems.dsge._cached_calculations.get_random_valid_codon(nt, current_depth, max_depth, nt_to_num_options, non_recursive_rhs)[source]

Get a random valid codons depending on current and max depth.

alogos.systems.dsge._cached_calculations.get_tree_depth(grammar, genotype, nt_to_gene, nt_to_cnt)[source]

Determine the depth of the derivation tree encoded by a genotype.