1 | /*******************************************************************************************
|
---|
2 | * AUTHOR: Dr Michael Thomas Flanagan
|
---|
3 | * DATE: 22 April 2004
|
---|
4 | * UPDATE: 21 November 2006, 31 December 2006, 14 April 2007, 19 October 2007, 16-29 March 2008,
|
---|
5 | * 3 July 2008, 19 September 2008, 28 September 2008, 13 and 18 October 2009
|
---|
6 | *
|
---|
7 | * DOCUMENTATION:
|
---|
8 | * See Michael Thomas Flanagan's Java library on-line web page:
|
---|
9 | * http://www.ee.ucl.ac.uk/~mflanaga/java/PsRandom.html
|
---|
10 | * http://www.ee.ucl.ac.uk/~mflanaga/java/
|
---|
11 | *
|
---|
12 | * Copyright (c) 2004 - 2009 Michael Thomas Flanagan
|
---|
13 | *
|
---|
14 | * PERMISSION TO COPY:
|
---|
15 | *
|
---|
16 | * Permission to use, copy and modify this software and its documentation for NON-COMMERCIAL purposes is granted, without fee,
|
---|
17 | * provided that an acknowledgement to the author, Dr Michael Thomas Flanagan at www.ee.ucl.ac.uk/~mflanaga, appears in all copies
|
---|
18 | * and associated documentation or publications.
|
---|
19 | *
|
---|
20 | * Redistributions of the source code of this source code, or parts of the source codes, must retain the above copyright notice, this list of conditions
|
---|
21 | * and the following disclaimer and requires written permission from the Michael Thomas Flanagan:
|
---|
22 | *
|
---|
23 | * Redistribution in binary form of all or parts of this class must reproduce the above copyright notice, this list of conditions and
|
---|
24 | * the following disclaimer in the documentation and/or other materials provided with the distribution and requires written permission from the Michael Thomas Flanagan:
|
---|
25 | *
|
---|
26 | * Dr Michael Thomas Flanagan makes no representations about the suitability or fitness of the software for any or for a particular purpose.
|
---|
27 | * Dr Michael Thomas Flanagan shall not be liable for any damages suffered as a result of using, modifying or distributing this software
|
---|
28 | * or its derivatives.
|
---|
29 | *
|
---|
30 | ***************************************************************************************/
|
---|
31 | package agents.anac.y2015.agentBuyogV2.flanagan.math;
|
---|
32 |
|
---|
33 | import agents.anac.y2015.agentBuyogV2.flanagan.analysis.Stat;
|
---|
34 | import agents.anac.y2015.agentBuyogV2.flanagan.roots.RealRootFunction;
|
---|
35 |
|
---|
36 | // Class to evaluate the three parameter log-normal distribution function
|
---|
37 | public class LogNormalThreeParFunct implements RealRootFunction{
|
---|
38 | public double cfd = 0.0D;
|
---|
39 | public double alpha = 0.0D;
|
---|
40 | public double beta = 0.0D;
|
---|
41 | public double gamma = 0.0D;
|
---|
42 |
|
---|
43 | public double function(double x) {
|
---|
44 |
|
---|
45 | double y = cfd - Stat.logNormalThreeParCDF(alpha, beta, gamma, x);
|
---|
46 |
|
---|
47 | return y;
|
---|
48 | }
|
---|
49 | } |
---|