#include <newran.h>
Inheritance diagram for Pareto:


Public Member Functions | |
| char * | Name () |
| Pareto (Real shape) | |
| virtual | ~Pareto () |
| Real | Next () |
| ExtReal | Mean () const |
| ExtReal | Variance () const |
Private Member Functions | |
| void | operator= (const Pareto &) |
Private Attributes | |
| Real | Shape |
| Real | RS |
|
|
Definition at line 392 of file newran.cpp.
00392 : Shape(shape) 00393 { 00394 if (Shape <= 0) Throw(Logic_error("Newran: illegal parameter")); 00395 RS = -1.0 / Shape; 00396 } |
|
|
Definition at line 276 of file newran.h.
00276 {}
|
|
|
Reimplemented from Random. Definition at line 401 of file newran.cpp. References PlusInfinity, and Shape.
00402 {
00403 if (Shape > 1) return Shape/(Shape-1.0);
00404 else return PlusInfinity;
00405 }
|
|
|
Reimplemented from Random. Definition at line 919 of file newran.cpp.
00919 { return "Pareto"; }
|
|
|
Reimplemented from Random. Definition at line 398 of file newran.cpp. References Random::Next(), Real, and RS.
00399 { return pow(Random::Next(), RS); }
|
|
|
Definition at line 270 of file newran.h.
00270 {} // private so can't access
|
|
|
Reimplemented from Random. Definition at line 407 of file newran.cpp. References PlusInfinity, Shape, and square().
00408 {
00409 if (Shape > 2) return Shape/(square(Shape-1.0))/(Shape-2.0);
00410 else return PlusInfinity;
00411 }
|
|
|
|
|
|
Definition at line 271 of file newran.h. Referenced by Mean(), Pareto(), and Variance(). |
1.3.3