Skip to content

Instantly share code, notes, and snippets.

@jrandom
Created March 22, 2015 14:57
Show Gist options
  • Save jrandom/4d0a94b234222b659bec to your computer and use it in GitHub Desktop.
Save jrandom/4d0a94b234222b659bec to your computer and use it in GitHub Desktop.
Snippet showing type simplification via using statements
// -------------------------------------------------------------------- Types - Axon_Gene_Interface_Input_Fixed_t
using Axon_Gene_Interface_Input_Fixed_t =
NeuralNet::LSTM::Axon_Gene_Interface_Only
<
Mutatable_Index_t,
Mutatable_Weight_t,
NeuralNet::LSTM::Interface_Only_Mode_Select::Interface_Input_Only,
NeuralNet::LSTM::Interface_Only_Fixed::Yes
>;
// -------------------------------------------------------------------- Types - Axon_Gene_Interface_Output_Fixed_t
using Axon_Gene_Interface_Output_Fixed_t =
NeuralNet::LSTM::Axon_Gene_Interface_Only
<
Mutatable_Index_t,
Mutatable_Weight_t,
NeuralNet::LSTM::Interface_Only_Mode_Select::Interface_Output_Only,
NeuralNet::LSTM::Interface_Only_Fixed::Yes
>;
// -------------------------------------------------------------------- Types - Axon_Gene_Interface_Input_t
using Axon_Gene_Interface_Input_t =
NeuralNet::LSTM::Axon_Gene_Interface_Only
<
Mutatable_Index_t,
Mutatable_Weight_t,
NeuralNet::LSTM::Interface_Only_Mode_Select::Interface_Input_Only,
NeuralNet::LSTM::Interface_Only_Fixed::No
>;
// -------------------------------------------------------------------- Types - Axon_Gene_Interface_Output_t
using Axon_Gene_Interface_Output_t =
NeuralNet::LSTM::Axon_Gene_Interface_Only
<
Mutatable_Index_t,
Mutatable_Weight_t,
NeuralNet::LSTM::Interface_Only_Mode_Select::Interface_Output_Only,
NeuralNet::LSTM::Interface_Only_Fixed::No
>;
// -------------------------------------------------------------------- Types - Axon_Gene_Internal_Only_t
using Axon_Gene_Internal_Only_t =
NeuralNet::LSTM::Axon_Gene_Internal_Only
<
Mutatable_Weight_t
>;
// -------------------------------------------------------------------- Types - Neuron_Gene_t
using Neuron_Gene_t =
NeuralNet::LSTM::Neuron_Gene
<
Mutatable_Weight_t
>;
// -------------------------------------------------------------------- Types - Chromosomes
using Chromosome_Fixed_Input_Axons_t = Genetics::Chromosome< Axon_Gene_Interface_Input_Fixed_t >;
using Chromosome_Fixed_Output_Axons_t = Genetics::Chromosome< Axon_Gene_Interface_Output_Fixed_t >;
using Chromosome_Input_Axons_t = Genetics::Chromosome< Axon_Gene_Interface_Input_t >;
using Chromosome_Output_Axons_t = Genetics::Chromosome< Axon_Gene_Interface_Output_t >;
using Chromosome_Internal_Axons_t = Genetics::Chromosome< Axon_Gene_Internal_Only_t >;
using Chromosome_Neurons_t = Genetics::Chromosome< Neuron_Gene_t >;
// -------------------------------------------------------------------- Types - Chromosome Collections
using Collection_Input_Chromosomes_t = std::vector< Chromosome_Input_Axons_t >;
using Collection_Output_Chromosomes_t = std::vector< Chromosome_Output_Axons_t >;
using Collection_Internal_Chromosomes_t = std::vector< Chromosome_Internal_Axons_t >;
using Collection_Neuron_Chromosomes_t = std::vector< Chromosome_Neurons_t >;
private:
// -------------------------------------------------------------------- State
const Chromosome_Fixed_Input_Axons_t _fixed_input_axon_chromosome;
const Chromosome_Fixed_Output_Axons_t _fixed_output_axon_chromosome;
const Collection_Input_Chromosomes_t _input_axon_chromosomes;
const Collection_Output_Chromosomes_t _output_axon_chromosomes;
const Collection_Internal_Chromosomes_t _internal_axon_chromosomes;
const Collection_Neuron_Chromosomes_t _neuron_chromosomes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment