FocusingProtocol¶
-
class
FocusingProtocol¶ Abstract type representing a protocol for the focusing procedure, i.e. a way to produce successive values for the quantities γ, n_rep and β. Currently, however, only
β=Infis supported. To be provided as an argument tofocusingBP.Available protocols are:
StandardReinforcement,Scoping,PseudoReinforcementandFreeScopingPublic Functions
-
FocusingProtocol()¶ Default constructor.
-
FocusingProtocol(const std::string &prot, const long int &size)¶ Constructor with protocol type and number of replicas.
Protocol types are set with default values. If you want introduce other values you must use appropriated protocol functions
- Parameters
prot: protocol type. Available protocols are:StandardReinforcement,Scoping,PseudoReinforcementandFreeScoping. This value is used to switch between the available protocols and the corresponding arrays are stored.size: number of step. Converted to Nrep into the class
-
~FocusingProtocol()¶ Destructor set as default.
-
void
StandardReinforcement(const double *rho, const long int &Nrho)¶ Standard reinforcement protocol, returns
γ=Infandn_rep=1/(1-x), wherexis taken from the given rangeρ.- Parameters
rho: double pointer which store the range values of xNrho: number of step. Converted to Nrep into the class
-
void
StandardReinforcement(const double &drho)¶ Shorthand for Standard reinforcement protocol.
- Parameters
drho: double related to the range increment
-
void
Scoping(const double *gr, const double &x, const long int &ngr)¶ Focusing protocol with fixed
n_repand a varyingγtaken from the givenγ * rrange.- Parameters
gr: double pointer with γ * r valuesx: fixed value of n_repngr: number of replicas
-
void
PseudoReinforcement(const double *rho, const long int &nrho, double x = .5)¶ A focusing protocol in which both
γandn_repare progressively increased, according to the formulas.γ = atanh(ρ**x) n_rep = 1 + ρ**(1 - 2x) / (1 - ρ)
where
ρis taken from the given range(ngr)r. Withx=0, this is basically the same asStandardReinforcement.- Parameters
rho: double pointer with ρ valuesnrho: lenght of rho arrayx: fixed value of n_rep
-
void
PseudoReinforcement(const double &drho, double x = .5)¶ Shorthand for Pseudo Reinforcement protocol.
- Parameters
drho: double related to the range incrementx: fixed value of n_rep
-
void
FreeScoping(double **list, const long int &nlist)¶ A focusing protocol which just returns the values of
(γ, n_rep)from the givenlist.- Parameters
list: array of lists (nlist, 3) with valuesnlist: lenght of list
Public Members
-
long int
Nrep¶ Number of repetitions, i.e. number of focusing iterations.
-
std::unique_ptr<double[]>
gamma¶ Distance parameters.
-
std::unique_ptr<double[]>
n_rep¶ Number of replicas (y in the paper and original code)
-
std::unique_ptr<double[]>
beta¶ 1/kT (it must be infinite in the current implementation)
-