SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | List of all members
NI3 Class Reference

Extends the class NortaInitDisc and implements the algorithm NI3. More...

Inheritance diagram for NI3:
[legend]
Collaboration diagram for NI3:
[legend]

Public Member Functions

 NI3 (double rX, DiscreteDistributionInt dist1, DiscreteDistributionInt dist2, double tr, double tolerance)
 Constructor with the target rank correlation rX, the two discrete marginals dist1 and dist2, the parameter for the truncation tr (see the constructor of class NortaInitDisc ), and the specific parameter \(\epsilon=\) tolerance for the algorithm NI3, as defined above.
 
double computeCorr ()
 Computes and returns the correlation \(\rho_Z\) using algorithm NI3. More...
 
String toString ()
 
- Public Member Functions inherited from NortaInitDisc
 NortaInitDisc (double rX, DiscreteDistributionInt dist1, DiscreteDistributionInt dist2, double tr)
 Constructor with the target rank correlation rX, the two discrete marginals dist1 and dist2 and the parameter for the truncation tr. More...
 
abstract double computeCorr ()
 Computes and returns the correlation \(\rho_Z\). More...
 
void computeParams ()
 Computes the following inputs of each marginal distribution: More...
 
double integ (double r)
 Computes the function. More...
 
double deriv (double r)
 Computes the derivative of \(g_r\), given by. More...
 
String toString ()
 

Additional Inherited Members

- Protected Attributes inherited from NortaInitDisc
double rX
 
DiscreteDistributionInt dist1
 
DiscreteDistributionInt dist2
 
double tr
 
double mu1
 
- Package Attributes inherited from NortaInitDisc
double mu2
 
double sd1
 
double sd2
 
int m2
 

Detailed Description

Extends the class NortaInitDisc and implements the algorithm NI3.

It uses the function \(g_r\) and its derivative \(gā€™_r\), so it calls the methods integ and deriv, given in ( gr_M ) and ( grp_M ) and uses an adapted version of the Newton-Raphson algorithm. At any iteration, if the solution falls outside the search interval, the algorithm uses bisection and halves the interval length to guarantee convergence. The initial solution is taken as \(\rho_0=2 \sin(\pi r_X /6)\), and then at each iteration \(k\), \(f_r(\rho_k)\) and \(f_r^ā€™(\rho_k)\) are calculated and a solution is computed by the recurrence formula:

\[ \rho_{k+1}=\rho_k-\frac{f_r(\rho_k)}{f_r^ā€™(\rho_k)}. \]

The algorithm stops at iteration \(k\) if \(|\rho_{k-1}-\rho_k|\leq\epsilon\). The function \(f_r\) is the one given in ( fr ).

Member Function Documentation

◆ computeCorr()

double computeCorr ( )

Computes and returns the correlation \(\rho_Z\) using algorithm NI3.

f, df, dx correspond to f(rho_k), f'(rho_k) and f(rho_k)/f'(rho_k), respectively, in the paper (paragraph "Method NI3"of section 3).


The documentation for this class was generated from the following file: