neuron_t Derived Type

type, public :: neuron_t

linked list of neurons


Inherited by

type~~neuron_t~~InheritedByGraph type~neuron_t neuron_t type~neuron_t->type~neuron_t next type~layer_t layer_t type~layer_t->type~neuron_t neuron type~layer_t->type~layer_t next

Components

Type Visibility Attributes Name Initial
integer, public, kind :: k = default_real
real(kind=k), private :: bias_
type(neuron_t(k)), private, allocatable :: next
real(kind=k), private, allocatable :: weights_(:)

Constructor

public interface neuron_t

  • private pure module function default_real_from_components(weights, bias) result(neuron)

    construct single neuron_t object from an array of weights and a bias

    Arguments

    Type IntentOptional Attributes Name
    real, intent(in) :: weights(:)
    real, intent(in) :: bias

    Return Value type(neuron_t)

  • private pure module function double_precision_from_components(weights, bias) result(neuron)

    construct single neuron_t object from an array of weights and a bias

    Arguments

    Type IntentOptional Attributes Name
    double precision, intent(in) :: weights(:)
    double precision, intent(in) :: bias

    Return Value type(neuron_t(double_precision))

  • private pure recursive module function double_precision_from_json(neuron_lines, start) result(neuron)

    construct linked list of neuron_t objects from an array of JSON-formatted text lines

    Arguments

    Type IntentOptional Attributes Name
    type(double_precision_string_t), intent(in) :: neuron_lines(:)
    integer, intent(in) :: start

    Return Value type(neuron_t(double_precision))

  • private pure recursive module function from_json(neuron_lines, start) result(neuron)

    construct linked list of neuron_t objects from an array of JSON-formatted text lines

    Arguments

    Type IntentOptional Attributes Name
    type(string_t), intent(in) :: neuron_lines(:)
    integer, intent(in) :: start

    Return Value type(neuron_t)


Type-Bound Procedures

generic, public :: bias => default_real_bias, double_precision_bias

generic, public :: next_allocated => default_real_next_allocated, double_precision_next_allocated

generic, public :: next_pointer => default_real_next_pointer, double_precision_next_pointer

generic, public :: num_inputs => default_real_num_inputs, double_precision_num_inputs

generic, public :: to_json => default_real_to_json, double_precision_to_json

generic, public :: weights => default_real_weights, double_precision_weights

procedure, private :: default_real_bias

  • interface

    private module function default_real_bias(self) result(my_bias)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t), intent(in) :: self

    Return Value real

procedure, private :: default_real_next_allocated

  • interface

    private module function default_real_next_allocated(self) result(next_is_allocated)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t), intent(in) :: self

    Return Value logical

procedure, private :: default_real_next_pointer

  • interface

    private module function default_real_next_pointer(self) result(next_ptr)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t), intent(in), target :: self

    Return Value type(neuron_t), pointer

procedure, private :: default_real_num_inputs

  • interface

    private pure module function default_real_num_inputs(self) result(size_weights)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t), intent(in) :: self

    Return Value integer

procedure, private :: default_real_to_json

  • interface

    private pure module function default_real_to_json(self) result(lines)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t), intent(in) :: self

    Return Value type(string_t), allocatable, (:)

procedure, private :: default_real_weights

  • interface

    private module function default_real_weights(self) result(my_weights)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t), intent(in) :: self

    Return Value real, allocatable, (:)

procedure, private :: double_precision_bias

  • interface

    private module function double_precision_bias(self) result(my_bias)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t(double_precision)), intent(in) :: self

    Return Value double precision

procedure, private :: double_precision_next_allocated

  • interface

    private module function double_precision_next_allocated(self) result(next_is_allocated)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t(double_precision)), intent(in) :: self

    Return Value logical

procedure, private :: double_precision_next_pointer

  • interface

    private module function double_precision_next_pointer(self) result(next_ptr)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t(double_precision)), intent(in), target :: self

    Return Value type(neuron_t(double_precision)), pointer

procedure, private :: double_precision_num_inputs

  • interface

    private pure module function double_precision_num_inputs(self) result(size_weights)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t(double_precision)), intent(in) :: self

    Return Value integer

procedure, private :: double_precision_to_json

  • interface

    private pure module function double_precision_to_json(self) result(lines)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t(double_precision)), intent(in) :: self

    Return Value type(string_t), allocatable, (:)

procedure, private :: double_precision_weights

  • interface

    private module function double_precision_weights(self) result(my_weights)

    Arguments

    Type IntentOptional Attributes Name
    class(neuron_t(double_precision)), intent(in) :: self

    Return Value double precision, allocatable, (:)