Jpp  18.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
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. 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

JCombinedGenerator gsub
 
JCombinedGenerator g
 

Detailed Description

Implementation of the JGenerator interface.

Generates positions by combining three other JGenerators

Definition at line 446 of file JMarkovGenerator.hh.

Constructor & Destructor Documentation

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 463 of file JMarkovGenerator.hh.

463  :
464  gsub(c1,g1,c2,g2), g(c1+c2,&gsub,c3,g3) {}
TCanvas * c1
Global variables to handle mouse events.

Member Function Documentation

JPosition3D JMARKOV::JTripleGenerator::getPosition ( )
inlinevirtual

Return a randomly generated position.

Implements JMARKOV::JGenerator.

Definition at line 466 of file JMarkovGenerator.hh.

466 { return g.getPosition() ; }
JPosition3D getPosition()
Return a randomly generated position.
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 468 of file JMarkovGenerator.hh.

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

Member Data Documentation

JCombinedGenerator JMARKOV::JTripleGenerator::gsub
protected

Definition at line 472 of file JMarkovGenerator.hh.

JCombinedGenerator JMARKOV::JTripleGenerator::g
protected

Definition at line 473 of file JMarkovGenerator.hh.


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