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

Implementation of the JGenerator interface. More...

#include <JMarkovGenerator.hh>

Inheritance diagram for JMARKOV::JShiftedGenerator:
JMARKOV::JGenerator

Public Member Functions

 JShiftedGenerator (JGenerator *_g, JPosition3D _shift)
 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

JGenerator * g
 
JPosition3D shift
 

Detailed Description

Implementation of the JGenerator interface.

Generates positions by shifting the positions from another JGenerator

Definition at line 485 of file JMarkovGenerator.hh.

Constructor & Destructor Documentation

◆ JShiftedGenerator()

JMARKOV::JShiftedGenerator::JShiftedGenerator ( JGenerator * _g,
JPosition3D _shift )
inline

Constructor.

_g is a pointer to some other generator, note that memory ownership of the instance pointed to by _g is not transferred, so

Definition at line 497 of file JMarkovGenerator.hh.

497 :
498 g(_g), shift(_shift) {}

Member Function Documentation

◆ getPosition()

JPosition3D JMARKOV::JShiftedGenerator::getPosition ( )
inlinevirtual

Return a randomly generated position.

Implements JMARKOV::JGenerator.

Definition at line 500 of file JMarkovGenerator.hh.

500 {
501 return g->getPosition() + shift ;
502 }
virtual JPosition3D getPosition()=0
Return a randomly generated position.

◆ getWeight()

double JMARKOV::JShiftedGenerator::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 504 of file JMarkovGenerator.hh.

504 {
505 return g->getWeight( pos-shift ) ;
506 }
virtual double getWeight(JPosition3D pos)=0
return the weight (=probability density dP/dV) for the given position.

Member Data Documentation

◆ g

JGenerator* JMARKOV::JShiftedGenerator::g
protected

Definition at line 510 of file JMarkovGenerator.hh.

◆ shift

JPosition3D JMARKOV::JShiftedGenerator::shift
protected

Definition at line 511 of file JMarkovGenerator.hh.


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