Jpp
master_rocky-37-gf0c5bc59d
the software that should make you happy
|
Implementation of the JGenerator interface. More...
#include <JMarkovGenerator.hh>
Public Member Functions | |
JCombinedGenerator (double _c1, JGenerator *_g1, double _c2, JGenerator *_g2) | |
Constructor. More... | |
JPosition3D | getPosition () |
Return a randomly generated position. More... | |
double | getWeight (JPosition3D pos) |
return the weight (=probability density dP/dV) for the given position. More... | |
Protected Attributes | |
JGenerator * | g1 |
JGenerator * | g2 |
double | p1 |
double | p2 |
Implementation of the JGenerator interface.
Generates positions by combining two other JGenerators
Definition at line 400 of file JMarkovGenerator.hh.
|
inline |
Constructor.
The arguments _gn are pointers to the two JGenerators to use. Note that ownership is not transferred, i.e.
The arguments _cn are the relative weights of the two generators. They do not have to add up to 1. The probability that a value is generated from g1 is c1/(c1+c2).
Definition at line 418 of file JMarkovGenerator.hh.
|
inlinevirtual |
Return a randomly generated position.
Implements JMARKOV::JGenerator.
Definition at line 423 of file JMarkovGenerator.hh.
|
inlinevirtual |
return the weight (=probability density dP/dV) for the given position.
When the generator is properly normalized, the integral of this quantity over the whole space is 1.
Implements JMARKOV::JGenerator.
Definition at line 431 of file JMarkovGenerator.hh.
|
protected |
Definition at line 439 of file JMarkovGenerator.hh.
|
protected |
Definition at line 440 of file JMarkovGenerator.hh.
|
protected |
Definition at line 441 of file JMarkovGenerator.hh.
|
protected |
Definition at line 442 of file JMarkovGenerator.hh.