|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPIANOS.generator.Acceptation
public class Acceptation
Generates calculations needed when generating the Fortarn module "main".
Constructor Summary | |
---|---|
Acceptation()
|
Method Summary | |
---|---|
static java.util.ArrayList<java.lang.String> |
generateAcceptationCode(Variable variable,
java.lang.String strategy)
Generates code that decides whether the new value is accepted and makes the necessary changes: updates the value of the current parameter and all functional parameters depending on it. |
static java.util.ArrayList<java.lang.String> |
generateAcceptationFormula(Variable variable)
Generates code that calculates the acceptance probability for the current parameter. |
static java.util.ArrayList<java.lang.String> |
generateNewValueCode(Variable variable)
Generates code that fetches a proposed new value for a parameter from its buffer or if the buffer is empty, calls the subroutine "generate". |
static java.util.ArrayList<java.lang.String> |
generateNewValuesFunctionalCode(Variable variable)
Generates code that calculates new values for all the functional parameters depending on the current parameter. |
static void |
setTopologicalList(java.util.ArrayList<Variable> list)
Sets the topological variable list that is used when calculating the correct new-value-generation order for functional parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Acceptation()
Method Detail |
---|
public static void setTopologicalList(java.util.ArrayList<Variable> list)
list
- A list of all variables in the current model in topolocial order.public static java.util.ArrayList<java.lang.String> generateNewValueCode(Variable variable)
variable
- A parameter for which the new value code is generated.We assume that it
is indexed by "one_dim(1)" if it is global, by "one_dim(i)" if it is one-dimensional and by
"two_dim(i, j)" if it is two-dimensional.public static java.util.ArrayList<java.lang.String> generateAcceptationCode(Variable variable, java.lang.String strategy) throws InvalidModelException
variable
- A parameter for which the acceptation code is generated. We assume that it
is indexed by "one_dim(1)" if it is global, by "one_dim(i)" if it is one-dimensional and by
"two_dim(i, j)" if it is two-dimensional.
InvalidModelException
public static java.util.ArrayList<java.lang.String> generateNewValuesFunctionalCode(Variable variable) throws InvalidModelException
variable
- The current parameter. We assume that it
is indexed by "one_dim(1)" if it is global, by "one_dim(i)" if it is one-dimensional and by
"two_dim(i, j)" if it is two-dimensional. Note that the new values for "SUM"-parameters are
not calculated here.
InvalidModelException
public static java.util.ArrayList<java.lang.String> generateAcceptationFormula(Variable variable) throws InvalidModelException, IllegalParametersException, MissingFunctionException
variable
- The current parameter. We assume that it
is indexed by "one_dim(1)" if it is global, by "one_dim(i)" if it is one-dimensional and by
"two_dim(i, j)" if it is two-dimensional.
InvalidModelException
IllegalParametersException
MissingFunctionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |