Configuration
Read, parse, and extract the configuration parameters.
Contents
Index
ACFlow._v
ACFlow.chk_dict
ACFlow.fil_dict
ACFlow.get_a
ACFlow.get_b
ACFlow.get_k
ACFlow.get_m
ACFlow.get_n
ACFlow.get_r
ACFlow.get_s
ACFlow.get_x
ACFlow.inp_toml
ACFlow.rev_dict_a
ACFlow.rev_dict_b
ACFlow.rev_dict_k
ACFlow.rev_dict_m
ACFlow.rev_dict_n
ACFlow.rev_dict_r
ACFlow.rev_dict_s
ACFlow.rev_dict_x
ACFlow.see_dict
Parser
ACFlow.inp_toml
— Functioninp_toml(f::String, key::String, necessary::Bool)
Parse the configuration file (in toml format). It reads only parts of the configuration file, which depends on the value of key
.
Arguments
- f -> Filename of configuration.
- key -> Parameter's name.
- necessary -> If it is true and configuration is absent, raise an error.
Returns
- value -> Parameter's value.
inp_toml(f::String, necessary::Bool)
Parse the configuration file (in toml format). It reads the whole file.
Arguments
- f -> Filename of configuration.
- necessary -> If it is true and configuration is absent, raise an error.
Returns
- dict -> A Dictionary struct that contains all the key-value pairs.
ACFlow.fil_dict
— Functionfil_dict(cfg::Dict{String,Any})
Transfer configurations from dict cfg
to internal dicts (including PBASE
, PMaxEnt
, PBarRat
, PNevanAC
, PStochAC
, PStochSK
, PStochOM
and PStochPX
etc). In other words, all the relevant internal dicts should be filled / updated in this function.
Arguments
- cfg -> A dict struct that contains all the configurations (from ac.toml).
Returns
N/A
ACFlow.see_dict
— Functionsee_dict()
Display all of the relevant configuration parameters to the terminal.
Arguments
N/A
Returns
N/A
See also: fil_dict
.
ACFlow.rev_dict_b
— Functionrev_dict_b(BASE::Dict{String,Any})
Setup the configuration dictionary: PBASE
.
Arguments
- BASE -> A dict struct that contains configurations from the [BASE] block.
Returns
N/A
See also: PBASE
.
rev_dict_b(BASE::Dict{String,Vector{Any}})
Setup the configuration dictionary: PBASE
.
Arguments
- BASE -> A dict struct that contains configurations from the [BASE] block.
Returns
N/A
See also: PBASE
.
ACFlow.rev_dict_m
— Functionrev_dict_m(S::MaxEntSolver, MaxEnt::Dict{String,Any})
Setup the configuration dictionary: PMaxEnt
.
Arguments
- S -> A MaxEntSolver struct.
- MaxEnt -> A dict struct that contains configurations from the [MaxEnt] block.
Returns
N/A
See also: PMaxEnt
.
rev_dict_m(S::MaxEntSolver, MaxEnt::Dict{String,Vector{Any}})
Setup the configuration dictionary: PMaxEnt
.
Arguments
- S -> A MaxEntSolver struct.
- MaxEnt -> A dict struct that contains configurations from the [MaxEnt] block.
Returns
N/A
See also: PMaxEnt
.
ACFlow.rev_dict_r
— Functionrev_dict_r(S::BarRatSolver, BarRat::Dict{String,Any})
Setup the configuration dictionary: PBarRat
.
Arguments
- S -> A BarRatSolver struct.
- BarRat -> A dict struct that contains configurations from the [BarRat] block.
Returns
N/A
See also: PBarRat
.
rev_dict_r(S::BarRatSolver, BarRat::Dict{String,Vector{Any}})
Setup the configuration dictionary: PBarRat
.
Arguments
- S -> A BarRatSolver struct.
- BarRat -> A dict struct that contains configurations from the [BarRat] block.
Returns
N/A
See also: PBarRat
.
ACFlow.rev_dict_n
— Functionrev_dict_n(S::NevanACSolver, NevanAC::Dict{String,Any})
Setup the configuration dictionary: PNevanAC
.
Arguments
- S -> A NevanACSolver struct.
- NevanAC -> A dict struct that contains configurations from the [NevanAC] block.
Returns
N/A
See also: PNevanAC
.
rev_dict_n(S::NevanACSolver, NevanAC::Dict{String,Vector{Any}})
Setup the configuration dictionary: PNevanAC
.
Arguments
- S -> A NevanACSolver struct.
- NevanAC -> A dict struct that contains configurations from the [NevanAC] block.
Returns
N/A
See also: PNevanAC
.
ACFlow.rev_dict_a
— Functionrev_dict_a(S::StochACSolver, StochAC::Dict{String,Any})
Setup the configuration dictionary: PStochAC
.
Arguments
- S -> A StochACSolver struct.
- StochAC -> A dict struct that contains configurations from the [StochAC] block.
Returns
N/A
See also: PStochAC
.
rev_dict_a(S::StochACSolver, StochAC::Dict{String,Vector{Any}})
Setup the configuration dictionary: PStochAC
.
Arguments
- S -> A StochACSolver struct.
- StochAC -> A dict struct that contains configurations from the [StochAC] block.
Returns
N/A
See also: PStochAC
.
ACFlow.rev_dict_k
— Functionrev_dict_k(S::StochSKSolver, StochSK::Dict{String,Any})
Setup the configuration dictionary: PStochSK
.
Arguments
- S -> A StochSKSolver struct.
- StochSK -> A dict struct that contains configurations from the [StochSK] block.
Returns
N/A
See also: PStochSK
.
rev_dict_k(S::StochSKSolver, StochSK::Dict{String,Vector{Any}})
Setup the configuration dictionary: PStochSK
.
Arguments
- S -> A StochSKSolver struct.
- StochSK -> A dict struct that contains configurations from the [StochSK] block.
Returns
N/A
See also: PStochSK
.
ACFlow.rev_dict_s
— Functionrev_dict_s(S::StochOMSolver, StochOM::Dict{String,Any})
Setup the configuration dictionary: PStochOM
.
Arguments
- S -> A StochOMSolver struct.
- StochOM -> A dict struct that contains configurations from the [StochOM] block.
Returns
N/A
See also: PStochOM
.
rev_dict_s(S::StochOMSolver, StochOM::Dict{String,Vector{Any}})
Setup the configuration dictionary: PStochOM
.
Arguments
- S -> A StochOMSolver struct.
- StochOM -> A dict struct that contains configurations from the [StochOM] block.
Returns
N/A
See also: PStochOM
.
ACFlow.rev_dict_x
— Functionrev_dict_x(S::StochPXSolver, StochPX::Dict{String,Any})
Setup the configuration dictionary: PStochPX
.
Arguments
- S -> A StochPXSolver struct.
- StochPX -> A dict struct that contains configurations from the [StochPX] block.
Returns
N/A
See also: PStochPX
.
rev_dict_x(S::StochPXSolver, StochPX::Dict{String,Vector{Any}})
Setup the configuration dictionary: PStochPX
.
Arguments
- S -> A StochPXSolver struct.
- StochPX -> A dict struct that contains configurations from the [StochPX] block.
Returns
N/A
See also: PStochPX
.
Validation
ACFlow.chk_dict
— FunctionACFlow._v
— Function_v(key::String, val::Array{Any,1})
Verify the value array. Called by chk_dict() function only.
Arguments
- key -> Key of parameter.
- val -> Value of parameter.
Returns
N/A
See also: chk_dict
.
Extraction
ACFlow.get_b
— Functionget_b(key::String)
Extract configurations from dict: PBASE.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PBASE
.
ACFlow.get_m
— Functionget_m(key::String)
Extract configurations from dict: PMaxEnt.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PMaxEnt
.
ACFlow.get_r
— Functionget_r(key::String)
Extract configurations from dict: PBarRat.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PBarRat
.
ACFlow.get_n
— Functionget_n(key::String)
Extract configurations from dict: PNevanAC.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PNevanAC
.
ACFlow.get_a
— Functionget_a(key::String)
Extract configurations from dict: PStochAC.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PStochAC
.
ACFlow.get_k
— Functionget_k(key::String)
Extract configurations from dict: PStochSK.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PStochSK
.
ACFlow.get_s
— Functionget_s(key::String)
Extract configurations from dict: PStochOM.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PStochOM
.
ACFlow.get_x
— Functionget_x(key::String)
Extract configurations from dict: PStochPX.
Arguments
- key -> Key of parameter.
Returns
- value -> Value of parameter.
See also: PStochPX
.