class Gambit::DRes::DependencyResolver

Main dependency resolver.

#include <depresolver.hpp>

Public Functions

Name
DependencyResolver(const gambit_core & core, const Models::ModelFunctorClaw & claw, const IniParser::IniFile & iniFile, const Utils::type_equivalency & equiv_classes, Printers::BasePrinter & printer)
Constructor, provide module and backend functor lists.
voiddoResolution()
The dependency resolution.
voidprintFunctorList()
Pretty print module functor information.
voidprintFunctorEvalOrder(bool toterminal =false)
Pretty print function evaluation order.
voidprintRequiredBackends()
Print the list of required backends.
voidgetCitationKeys()
Collect the citation keys for backends, modules, etc.
voidprintCitationKeys()
Print citation keys.
std::vector< VertexID >getObsLikeOrder()
Retrieve the order in which target vertices are to be evaluated.
voidcalcObsLike(VertexID vertex)
Calculate a single target vertex.
voidprintObsLike(VertexID vertex, const int pointID)
Print a single target vertex.
boolprintTiming()
Getter for print_timing flag (used by LikelihoodContainer)
functor *get_functor(VertexID id)
Get the functor corresponding to a single VertexID.
strcheckTypeMatch(VertexID vertex, const str & purpose, const std::vector< str > & types)
Ensure that the type of a given vertex is equivalent to at least one of a provided list, and return the matching list entry.
template <typename TYPE >
TYPE
getObsLike(VertexID vertex)
Return the result of a functor.
const str &getPurpose(VertexID v)
Return the purpose associated with a given functor.
voidinvalidatePointAt(VertexID vertex, bool isnan)
Tell functor that it invalidated the current point in model space (due to a large or NaN contribution to lnL)
voidresetAll()
Reset all active functors and delete existing results.
voidcheckForUnusedRules()
Check for unused rules and options.
voidset_scanID()
Set the Scan ID.
map_str_strgetMetadata()
Construct metadata information from used observables, rules and options.
MasterGraphTypecullInactiveFunctors(MasterGraphType & )
Helper function that returns a new graph with all inactive vertices removed.

Public Attributes

Name
intscanID

Public Functions Documentation

function DependencyResolver

DependencyResolver(
    const gambit_core & core,
    const Models::ModelFunctorClaw & claw,
    const IniParser::IniFile & iniFile,
    const Utils::type_equivalency & equiv_classes,
    Printers::BasePrinter & printer
)

Constructor, provide module and backend functor lists.

Constructor.

function doResolution

void doResolution()

The dependency resolution.

Main dependency resolution.

function printFunctorList

void printFunctorList()

Pretty print module functor information.

List of masterGraph content.

function printFunctorEvalOrder

void printFunctorEvalOrder(
    bool toterminal =false
)

Pretty print function evaluation order.

function printRequiredBackends

void printRequiredBackends()

Print the list of required backends.

function getCitationKeys

void getCitationKeys()

Collect the citation keys for backends, modules, etc.

function printCitationKeys

void printCitationKeys()

Print citation keys.

Print the BibTeX citation keys.

function getObsLikeOrder

std::vector< VertexID > getObsLikeOrder()

Retrieve the order in which target vertices are to be evaluated.

Returns list of ObsLike vertices in order of runtime.

function calcObsLike

void calcObsLike(
    VertexID vertex
)

Calculate a single target vertex.

Evaluates ObsLike vertex, and everything it depends on, and prints results.

function printObsLike

void printObsLike(
    VertexID vertex,
    const int pointID
)

Print a single target vertex.

Prints the results of an ObsLike vertex.

function printTiming

bool printTiming()

Getter for print_timing flag (used by LikelihoodContainer)

function get_functor

functor * get_functor(
    VertexID id
)

Get the functor corresponding to a single VertexID.

function checkTypeMatch

str checkTypeMatch(
    VertexID vertex,
    const str & purpose,
    const std::vector< str > & types
)

Ensure that the type of a given vertex is equivalent to at least one of a provided list, and return the matching list entry.

Ensure that the type of a given vertex is equivalent to at least one of a provided list, and return the match.

function getObsLike

template <typename TYPE >
inline TYPE getObsLike(
    VertexID vertex
)

Return the result of a functor.

function getPurpose

const str & getPurpose(
    VertexID v
)

Return the purpose associated with a given functor.

Returns the purpose associated with a given functor. Non-null only if the functor corresponds to an ObsLike entry in the ini file.

‘__no_purpose’ if the functor does not correspond to an ObsLike entry in the ini file.

function invalidatePointAt

void invalidatePointAt(
    VertexID vertex,
    bool isnan
)

Tell functor that it invalidated the current point in model space (due to a large or NaN contribution to lnL)

function resetAll

void resetAll()

Reset all active functors and delete existing results.

function checkForUnusedRules

void checkForUnusedRules()

Check for unused rules and options.

function set_scanID

void set_scanID()

Set the Scan ID.

function getMetadata

map_str_str getMetadata()

Construct metadata information from used observables, rules and options.

Construct metadata information from used observables, rules and options Note: No keys can be identical (or differing only by capitalisation) to those printed in the main file, otherwise the sqlite printer fails

function cullInactiveFunctors

static MasterGraphType cullInactiveFunctors(
    MasterGraphType & 
)

Helper function that returns a new graph with all inactive vertices removed.

Public Attributes Documentation

variable scanID

int scanID;

Updated on 2024-07-18 at 13:53:31 +0000