Skip to content

Commit

Permalink
helper function returning output parameters which an expr depends on
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Jan 28, 2016
1 parent d6c6486 commit 375e2e9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions meta/Parameters.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
GetDependenceSPhenoRules::usage="Returns list of replacement rules for
symbols for which a DependenceSPheno rule is defined";

GetOutputParameterDependencies::usage="Returns list of output
parameters which appear in the given expression";

CreateLocalConstRefs::usage="creates local const references to model
parameters / input parameters.";

Expand Down Expand Up @@ -1240,6 +1243,15 @@
Cases[SARAH`ParameterDefinitions,
{parameter_, {___, SARAH`DependenceSPheno -> value:Except[None], ___}} :> RuleDelayed[parameter, value]];

GetSARAHParameters[] :=
(#[[1]])& /@ SARAH`SARAHparameters;

GetOutputParameterDependencies[expr_] :=
Complement[Select[Join[GetSARAHParameters[],
GetDependenceSPhenoSymbols[]],
(!FreeQ[expr,#])&],
GetModelParameters[]];

CreateInputParameterArrayGetter[inputParameters_List] :=
Module[{get = "", paramCount = 0, name = "", par,
type, i, assignment = "", nAssignments = 0},
Expand Down

0 comments on commit 375e2e9

Please sign in to comment.