Creates a helper function to convert a parameter vector par to a Gamma and/or Theta matrix.
parToMatricesFactory(
  graph,
  init = NULL,
  fixParams = integer(0),
  parIsTheta = FALSE,
  checkValidity = TRUE
)A function parToMatrices(par, forceGamma=FALSE, forceTheta=FALSE),
which takes a parameter vector and returns either NULL or a list with entries Gamma, Theta.
The function returns NULL if checkValidity==TRUE and par implies an invalid matrix.
Otherwise, depending on parIsTheta, forceTheta, and forceGamma, one or both of
Gamma and Theta are matrices implied by par.
par represents entries corresponding to the edges of graph.
The values used for fixed parameters
The indices (logical or numeric) of fixed parameters in the full parameter vector.
TRUE if par represents entries in Theta (otherwise Gamma)
Whether to check if the implied Gamma/Theta is a valid parameter matrix.