#include <Spectrum.h>

Container for spectrum data. More...
Typedefs | |
typedef std::shared_ptr< Spectrum > | SP |
typedef std::shared_ptr< const Spectrum > | SCP |
typedef std::function< SP_Vec_Dbl(const Vec_Dbl &, const Vec_Int &, const Vec_Dbl &)> | Integrator_t |
Basic Methods | |
const Vec_Dbl & | bounds () const |
return a const reference to bounds More... | |
void | set_bounds (const Vec_Dbl &) |
set the bounds (copy operation) More... | |
const Vec_Dbl & | intensity () const |
return a const reference to intensity More... | |
void | set_intensity (const Vec_Dbl &) |
set the intensity (copy operation) More... | |
Comparison | |
bool | match (const Spectrum &) const |
bool | operator== (const Spectrum &) const |
static bool | match (const Spectrum &, const Spectrum &) |
Convenience Methods | |
double | total_intensity () const |
EnergyRange_t | energy_range () const |
double | mean_energy () const |
double | total_energy_intensity () const |
SP_Vec_Dbl | newsp_energy_intensity () const |
Memory-usage Variants of Other Methods | |
Vec_Dbl * | newptr_energy_intensity () const |
SCP_Vec_Dbl | scp_intensity () const |
return a shared (read-only) intensity pointer More... | |
SCP_Vec_Dbl | scp_bounds () const |
return a shared (read-only) bounds pointer More... | |
Mapping Methods | |
bool | map_intensity (const Vec_Dbl &new_bounds, Integrator_t integrator, Vec_Dbl *intensity, double wt=1.0, double tol=ETOL) const |
bool | map_intensity (const Vec_Dbl &new_bounds, Vec_Dbl *intensity, double wt=1.0, double tol=ETOL) const |
void | remap_intensity (Vec_Dbl *intensity, double wt=1.0) const |
bool | has_mapping_variables () const |
void | clear_mapping_variables () const |
std::string | print_bins () const |
Additional Methods for Language Bindings (e.g. Fortran) | |
double | bounds_at (size_t) const |
get element of bounds vector by index More... | |
double const * | bounds_array () const |
return view of bounds vector More... | |
size_t | bounds_size () const |
return size of bounds vector More... | |
bool | has_bounds () const |
return whether the class has a non-null bounds More... | |
void | get_bounds (Vec_Dbl &) const |
populate an existing Vec_Dbl with a copy of bounds More... | |
void | manageptr_bounds (Vec_Dbl *&) |
set the bounds (ownership transfer) More... | |
void | getptr_bounds (Vec_Dbl const *&) const |
retrieve pointer (read-only) to bounds More... | |
void | get_bounds_array (size_t, double *) const |
get array of bounds vector (Fortran) More... | |
void | set_bounds_array (size_t, double *) |
set bounds vector from array (Fortran) More... | |
double | intensity_at (size_t) const |
get element of intensity vector by index More... | |
double const * | intensity_array () const |
return view of intensity vector More... | |
size_t | intensity_size () const |
return size of intensity vector More... | |
bool | has_intensity () const |
return whether the class has a non-null intensity More... | |
void | get_intensity (Vec_Dbl &) const |
populate an existing Vec_Dbl with a copy of intensity More... | |
void | manageptr_intensity (Vec_Dbl *&) |
set the intensity (ownership transfer) More... | |
void | getptr_intensity (Vec_Dbl const *&) const |
retrieve pointer (read-only) to intensity More... | |
void | get_intensity_array (size_t, double *) const |
get array of intensity vector (Fortran) More... | |
void | set_intensity_array (size_t, double *) |
set intensity vector from array (Fortran) More... | |
Static Helper Functions | |
returns true if the new and old bounds have the same min/max energy, i.e. the mapping will be conservative | |
static bool | map_bins (const Vec_Dbl &old_bounds, const Vec_Dbl &new_bounds, Vec_Int *union_to_old, Vec_Int *union_to_new, Vec_Dbl *union_grid, double tol=ETOL) |
static void | map_intensity (const Vec_Dbl &old_bounds, const Vec_Dbl &new_bounds, const Vec_Int &union_to_old, const Vec_Int &union_to_new, const Vec_Dbl &union_grid, const Vec_Dbl &old_intensity, const Vec_Dbl &union_wts, Vec_Dbl *new_intensity, double wt=1.0) |
static SP_Vec_Dbl | computeUnionWts_1 (const Vec_Dbl &union_grid, const Vec_Int &union_to_old, const Vec_Dbl &old_flux) |
static std::string | print_bins (const Vec_Dbl &bounds, const Vec_Dbl &intensity) |
Ctors/Dtors | |
Spectrum () | |
virtual | ~Spectrum () |
Detailed Description
Container for spectrum data.
The Spectrum data container manages the energy bounds and the intensity for a single spectrum.
Both bounds and intensity are stored as shared pointers to std::vector<double>. This class has COW semantics.
Member Typedef Documentation
typedef std::function<SP_Vec_Dbl( const Vec_Dbl &, const Vec_Int &, const Vec_Dbl & )> Integrator_t |
Constructor & Destructor Documentation
Spectrum | ( | ) |
|
inlinevirtual |
Member Function Documentation
const Vec_Dbl & bounds | ( | ) | const |
return a const reference to bounds
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Invalid if this instance of Spectrum goes out of scope.
Referenced by Spectrum::operator==(), and StateSetIO_bof::write().
void set_bounds | ( | const Vec_Dbl & | bounds | ) |
set the bounds (copy operation)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
- Examples:
- tstEmissionResource.cpp, tstEmissionSpectrum.cpp, and tstGammaResource.cpp.
Referenced by FakeFactory::newspStateSet_10nuclide(), StateSetIO_s62b::read(), StateSetIO_bof::read(), StateSetIO_s61::read(), GammaResourceIO_cimg::read(), FakeFactory::StateSet_random1(), and TEST().
const Vec_Dbl & intensity | ( | ) | const |
return a const reference to intensity
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Invalid if this instance of Spectrum goes out of scope.
Referenced by Spectrum::operator==(), and StateSetIO_bof::write().
void set_intensity | ( | const Vec_Dbl & | intensity | ) |
set the intensity (copy operation)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Referenced by FakeFactory::newspStateSet_10nuclide(), StateSetIO_s62b::read(), StateSetIO_s61::read(), StateSetIO_bof::read(), GammaResourceIO_cimg::read(), and FakeFactory::StateSet_random1().
bool match | ( | const Spectrum & | b | ) | const |
Referenced by NeutronSpectra::match(), BetaSpectra::match(), GammaSpectra::match(), and AlphaSpectra::match().
bool operator== | ( | const Spectrum & | b | ) | const |
References Spectrum::b_bounds, Spectrum::b_intensity, Spectrum::bounds(), and Spectrum::intensity().
Referenced by AlphaSpectra::operator==(), GammaSpectra::operator==(), and BetaSpectra::operator==().
References Spectrum::b_bounds.
double total_intensity | ( | ) | const |
References Spectrum::b_intensity, and Spectrum::has_intensity().
Referenced by Spectrum::mean_energy(), and EmissionSpectrum::total_intensity().
EnergyRange_t energy_range | ( | ) | const |
References Spectrum::b_bounds, Origen::EMAX, and Origen::EMIN.
Referenced by EmissionSpectrum::energy_range().
double mean_energy | ( | ) | const |
References Spectrum::total_energy_intensity(), and Spectrum::total_intensity().
double total_energy_intensity | ( | ) | const |
References Spectrum::newsp_energy_intensity().
Referenced by Spectrum::mean_energy(), and EmissionSpectrum::total_energy_intensity().
SP_Vec_Dbl newsp_energy_intensity | ( | ) | const |
References Spectrum::newptr_energy_intensity().
Referenced by Spectrum::total_energy_intensity().
Vec_Dbl * newptr_energy_intensity | ( | ) | const |
References Spectrum::b_bounds, Spectrum::b_intensity, and Spectrum::intensity_size().
Referenced by Spectrum::newsp_energy_intensity().
SCP_Vec_Dbl scp_intensity | ( | ) | const |
return a shared (read-only) intensity pointer
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
SCP_Vec_Dbl scp_bounds | ( | ) | const |
return a shared (read-only) bounds pointer
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
bool map_intensity | ( | const Vec_Dbl & | new_bounds, |
Integrator_t | integrator, | ||
Vec_Dbl * | intensity, | ||
double | wt = 1.0 , |
||
double | tol = ETOL |
||
) | const |
Referenced by EmissionSpectrum::bin(), Spectrum::map_intensity(), and Spectrum::remap_intensity().
bool map_intensity | ( | const Vec_Dbl & | new_bounds, |
Vec_Dbl * | intensity, | ||
double | wt = 1.0 , |
||
double | tol = ETOL |
||
) | const |
References Spectrum::computeUnionWts_1(), and Spectrum::map_intensity().
void remap_intensity | ( | Vec_Dbl * | intensity, |
double | wt = 1.0 |
||
) | const |
bool has_mapping_variables | ( | ) | const |
References Spectrum::b_intensity, Spectrum::b_new_bounds, Spectrum::b_union_grid, Spectrum::b_union_to_new, Spectrum::b_union_to_old, and Spectrum::b_union_wts.
Referenced by Spectrum::remap_intensity().
void clear_mapping_variables | ( | ) | const |
std::string print_bins | ( | ) | const |
- Examples:
- tstDiscreteSpectrum.cpp, tstEmissionResource.cpp, tstEmissionSpectrum.cpp, tstGammaResource.cpp, and tstGammaResourceIO.cpp.
References Spectrum::b_bounds, and Spectrum::b_intensity.
Referenced by EmissionSpectrum::print_continuous(), TEST(), and TEST_P().
Vec_Dbl::value_type bounds_at | ( | size_t | i | ) | const |
get element of bounds vector by index
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
- Examples:
- tstGammaResourceIO.cpp.
Referenced by TEST().
Vec_Dbl::value_type const * bounds_array | ( | ) | const |
return view of bounds vector
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Referenced by StateSetIO_s62b::write().
size_t bounds_size | ( | ) | const |
return size of bounds vector
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Referenced by Spectrum::canonicalize_intensity().
bool has_bounds | ( | ) | const |
return whether the class has a non-null bounds
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void get_bounds | ( | Vec_Dbl & | bounds | ) | const |
populate an existing Vec_Dbl with a copy of bounds
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void manageptr_bounds | ( | Vec_Dbl *& | bounds | ) |
set the bounds (ownership transfer)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void getptr_bounds | ( | Vec_Dbl const *& | bounds | ) | const |
retrieve pointer (read-only) to bounds
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void get_bounds_array | ( | size_t | , |
double * | |||
) | const |
get array of bounds vector (Fortran)
void set_bounds_array | ( | size_t | , |
double * | |||
) |
set bounds vector from array (Fortran)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Vec_Dbl::value_type intensity_at | ( | size_t | i | ) | const |
get element of intensity vector by index
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Vec_Dbl::value_type const * intensity_array | ( | ) | const |
return view of intensity vector
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Referenced by StateSetIO_s62b::write().
size_t intensity_size | ( | ) | const |
return size of intensity vector
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
Referenced by NeutronSpectra::is_consistent(), Spectrum::newptr_energy_intensity(), EmissionSpectrum::num_continuous(), and NeutronSpectra::resum().
bool has_intensity | ( | ) | const |
return whether the class has a non-null intensity
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
Referenced by Spectrum::total_intensity().
void get_intensity | ( | Vec_Dbl & | intensity | ) | const |
populate an existing Vec_Dbl with a copy of intensity
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void manageptr_intensity | ( | Vec_Dbl *& | intensity | ) |
set the intensity (ownership transfer)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void getptr_intensity | ( | Vec_Dbl const *& | intensity | ) | const |
retrieve pointer (read-only) to intensity
Auto-generated from macro #ORIGEN_ACCESSORS_SP_OBJECT().
void get_intensity_array | ( | size_t | , |
double * | |||
) | const |
get array of intensity vector (Fortran)
void set_intensity_array | ( | size_t | , |
double * | |||
) |
set intensity vector from array (Fortran)
Auto-generated from macro #ORIGEN_ACCESSORS_SP_VECTOR().
|
static |
|
static |
|
static |
Referenced by Spectrum::map_intensity().
|
protected |
|
protected |
References Spectrum::b_intensity, and Spectrum::bounds_size().
Member Data Documentation
|
protected |
|
protected |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
The documentation for this class was generated from the following files:
- Core/dc/Spectrum.h
- Core/dc/Spectrum.cpp