metadata_m.f90 Source File


This file depends on

sourcefile~~metadata_m.f90~~EfferentGraph sourcefile~metadata_m.f90 metadata_m.f90 sourcefile~double_precision_string_m.f90 double_precision_string_m.f90 sourcefile~metadata_m.f90->sourcefile~double_precision_string_m.f90

Files dependent on this one

sourcefile~~metadata_m.f90~~AfferentGraph sourcefile~metadata_m.f90 metadata_m.f90 sourcefile~fiats_m.f90 fiats_m.f90 sourcefile~fiats_m.f90->sourcefile~metadata_m.f90 sourcefile~neural_network_m.f90 neural_network_m.f90 sourcefile~fiats_m.f90->sourcefile~neural_network_m.f90 sourcefile~trainable_network_m.f90 trainable_network_m.f90 sourcefile~fiats_m.f90->sourcefile~trainable_network_m.f90 sourcefile~layer_m.f90 layer_m.f90 sourcefile~layer_m.f90->sourcefile~metadata_m.f90 sourcefile~layer_m.f90->sourcefile~neural_network_m.f90 sourcefile~metadata_s.f90 metadata_s.F90 sourcefile~metadata_s.f90->sourcefile~metadata_m.f90 sourcefile~neural_network_m.f90->sourcefile~metadata_m.f90 sourcefile~concurrent-inferences.f90 concurrent-inferences.f90 sourcefile~concurrent-inferences.f90->sourcefile~fiats_m.f90 sourcefile~layer_s.f90 layer_s.F90 sourcefile~layer_s.f90->sourcefile~layer_m.f90 sourcefile~learn-addition.f90 learn-addition.F90 sourcefile~learn-addition.f90->sourcefile~fiats_m.f90 sourcefile~learn-exponentiation.f90 learn-exponentiation.F90 sourcefile~learn-exponentiation.f90->sourcefile~fiats_m.f90 sourcefile~learn-multiplication.f90 learn-multiplication.F90 sourcefile~learn-multiplication.f90->sourcefile~fiats_m.f90 sourcefile~learn-power-series.f90 learn-power-series.F90 sourcefile~learn-power-series.f90->sourcefile~fiats_m.f90 sourcefile~learn-saturated-mixing-ratio.f90 learn-saturated-mixing-ratio.F90 sourcefile~learn-saturated-mixing-ratio.f90->sourcefile~fiats_m.f90 sourcefile~saturated_mixing_ratio_m.f90 saturated_mixing_ratio_m.f90 sourcefile~learn-saturated-mixing-ratio.f90->sourcefile~saturated_mixing_ratio_m.f90 sourcefile~neural_network_s.f90 neural_network_s.F90 sourcefile~neural_network_s.f90->sourcefile~layer_m.f90 sourcefile~neural_network_s.f90->sourcefile~neural_network_m.f90 sourcefile~print-training-configuration.f90 print-training-configuration.F90 sourcefile~print-training-configuration.f90->sourcefile~fiats_m.f90 sourcefile~read-query-infer.f90 read-query-infer.f90 sourcefile~read-query-infer.f90->sourcefile~fiats_m.f90 sourcefile~saturated_mixing_ratio_m.f90->sourcefile~fiats_m.f90 sourcefile~train-and-write.f90 train-and-write.F90 sourcefile~train-and-write.f90->sourcefile~fiats_m.f90 sourcefile~trainable_network_m.f90->sourcefile~neural_network_m.f90 sourcefile~unmapped_network_s.f90 unmapped_network_s.F90 sourcefile~unmapped_network_s.f90->sourcefile~neural_network_m.f90 sourcefile~workspace_s.f90 workspace_s.F90 sourcefile~workspace_s.f90->sourcefile~neural_network_m.f90 sourcefile~write-read-infer.f90 write-read-infer.F90 sourcefile~write-read-infer.f90->sourcefile~fiats_m.f90 sourcefile~trainable_network_s.f90 trainable_network_s.F90 sourcefile~trainable_network_s.f90->sourcefile~trainable_network_m.f90

Source Code

! Copyright (c), The Regents of the University of California
! Terms of use are as specified in LICENSE.txt
module metadata_m
  use julienne_string_m, only : string_t
  use double_precision_string_m, only : double_precision_string_t
  implicit none

  private
  public :: metadata_t

  type metadata_t
    private
    type(string_t) modelName_, modelAuthor_, compilationDate_, activationFunction_, usingSkipConnections_
  contains
    generic :: operator(==) => equals
    procedure :: strings
    procedure :: to_json
    procedure :: activation_name
    procedure, private :: equals
  end type

  interface metadata_t

    pure module function from_json(lines) result(metadata)
      implicit none
      type(string_t), intent(in) :: lines(:)
      type(metadata_t) metadata
    end function

    pure module function double_precision_from_json(lines) result(metadata)
      implicit none
      type(double_precision_string_t), intent(in) :: lines(:)
      type(metadata_t) metadata
    end function

    pure module function from_components(modelName, modelAuthor, compilationDate, activationFunction, usingSkipConnections) &
      result(metadata)
      implicit none
      type(string_t), intent(in) :: modelName, modelAuthor, compilationDate, activationFunction, usingSkipConnections
      type(metadata_t) metadata
    end function

  end interface

  interface

    pure module function strings(self) result(components)
      implicit none
      class(metadata_t), intent(in) :: self
      type(string_t), allocatable :: components(:)
    end function

    pure module function activation_name(self) result(function_name)
      implicit none
      class(metadata_t), intent(in) :: self
      type(string_t) function_name
    end function

    pure module function to_json(self) result(lines)
      implicit none
      class(metadata_t), intent(in) :: self
      type(string_t), allocatable :: lines(:)
    end function

    elemental module function equals(lhs, rhs) result(lhs_equals_rhs)
      implicit none
      class(metadata_t), intent(in) :: lhs, rhs
      logical lhs_equals_rhs
    end function

  end interface

end module