MIDSX 0.1
A x-ray transport code system for dosimetry
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
PolyenergeticSpectrum Class Reference

Class which represents a polyenergetic energy spectrum. More...

#include <source.h>

Collaboration diagram for PolyenergeticSpectrum:

Public Member Functions

 PolyenergeticSpectrum (const Eigen::Matrix< double, Eigen::Dynamic, 2 > &probabilities_matrix)
 Constructor for the PolyenergeticSpectrum class.
 
double sampleEnergy () override
 Returns a sample from the polyenergetic spectrum.
 
double getExpectationValue () const
 Returns the expectation value of the polyenergetic spectrum.
 

Private Attributes

Eigen::Matrix< double, Eigen::Dynamic, 2 > probabilities_matrix_
 
ProbabilityDist::DiscreteInversion energy_dist_
 

Detailed Description

Class which represents a polyenergetic energy spectrum.

Definition at line 55 of file source.h.

Constructor & Destructor Documentation

◆ PolyenergeticSpectrum()

PolyenergeticSpectrum::PolyenergeticSpectrum ( const Eigen::Matrix< double, Eigen::Dynamic, 2 > & probabilities_matrix)
explicit

Constructor for the PolyenergeticSpectrum class.

Parameters
probabilities_matrixA matrix where the first column is the energy and the second column is the probability.

Member Function Documentation

◆ getExpectationValue()

double PolyenergeticSpectrum::getExpectationValue ( ) const

Returns the expectation value of the polyenergetic spectrum.

Returns
The expectation value of the polyenergetic spectrum.

◆ sampleEnergy()

double PolyenergeticSpectrum::sampleEnergy ( )
overridevirtual

Returns a sample from the polyenergetic spectrum.

Returns
A sample from the polyenergetic spectrum.

Implements EnergySpectrum.

Member Data Documentation

◆ energy_dist_

ProbabilityDist::DiscreteInversion PolyenergeticSpectrum::energy_dist_
private

Definition at line 80 of file source.h.

◆ probabilities_matrix_

Eigen::Matrix<double, Eigen::Dynamic, 2> PolyenergeticSpectrum::probabilities_matrix_
private

Definition at line 79 of file source.h.


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