Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JMARKOV::JTripleGenerator Class Reference

Implementation of the JGenerator interface. More...

#include <JMarkovGenerator.hh>

Inheritance diagram for JMARKOV::JTripleGenerator:
JMARKOV::JGenerator

Public Member Functions

 JTripleGenerator (double c1, JGenerator *g1, double c2, JGenerator *g2, double c3, JGenerator *g3)
 Constructor.
 
JPosition3D getPosition ()
 Return a randomly generated position.
 
double getWeight (JPosition3D pos)
 return the weight (=probability density dP/dV) for the given position.
 

Protected Attributes

JCombinedGenerator gsub
 
JCombinedGenerator g
 

Detailed Description

Implementation of the JGenerator interface.

Generates positions by combining three other JGenerators

Definition at line 450 of file JMarkovGenerator.hh.

Constructor & Destructor Documentation

◆ JTripleGenerator()

JMARKOV::JTripleGenerator::JTripleGenerator ( double c1,
JGenerator * g1,
double c2,
JGenerator * g2,
double c3,
JGenerator * g3 )
inline

Constructor.

The arguments gn are pointers to the three JGenerators to use. Note that ownership is not transferred, i.e.

  • the memory taken by the _gn is not freed when JTripleGenerator is deleted
  • changes made to the instances pointed to by the _gn will affect the behaviour of the JTripleGenerator

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 gi is ci/(c1+c2+c3).

Definition at line 467 of file JMarkovGenerator.hh.

467 :
468 gsub(c1,g1,c2,g2), g(c1+c2,&gsub,c3,g3) {}
TCanvas * c1
Global variables to handle mouse events.
Double_t g1(const Double_t x)
Function.
Definition JQuantiles.cc:25

Member Function Documentation

◆ getPosition()

JPosition3D JMARKOV::JTripleGenerator::getPosition ( )
inlinevirtual

Return a randomly generated position.

Implements JMARKOV::JGenerator.

Definition at line 470 of file JMarkovGenerator.hh.

470{ return g.getPosition() ; }
JPosition3D getPosition()
Return a randomly generated position.

◆ getWeight()

double JMARKOV::JTripleGenerator::getWeight ( JPosition3D pos)
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 472 of file JMarkovGenerator.hh.

472{ return g.getWeight(pos) ; }
double getWeight(JPosition3D pos)
return the weight (=probability density dP/dV) for the given position.

Member Data Documentation

◆ gsub

JCombinedGenerator JMARKOV::JTripleGenerator::gsub
protected

Definition at line 476 of file JMarkovGenerator.hh.

◆ g

JCombinedGenerator JMARKOV::JTripleGenerator::g
protected

Definition at line 477 of file JMarkovGenerator.hh.


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