File indexing completed on 2026-04-09 07:49:08
0001 #pragma once
0002
0003 #include <functional>
0004 #include "QUDARAP_API_EXPORT.hh"
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 struct NP ;
0037
0038 template <typename T>
0039 struct QUDARAP_API QCK
0040 {
0041 static const double DT_SCALE ;
0042
0043 std::string lfold ;
0044 NP* rindex ;
0045 NP* bis ;
0046 NP* avph ;
0047 NP* s2c ;
0048 NP* s2cn ;
0049 NP* icdf ;
0050 NP* icdf_prop ;
0051
0052 T emn ;
0053 T emx ;
0054 T rmn ;
0055 T rmx ;
0056
0057 void init() ;
0058
0059 void save(const char* base, const char* reldir=nullptr) const ;
0060 static QCK* Load(const char* base, const char* reldir=nullptr);
0061
0062
0063 int find_bisIdx( const T BetaInverse ) const ;
0064 void energy_range_s2cn( T& emin, T& emax, const T BetaInverse, bool dump ) const ;
0065 void energy_range_avph( T& emin, T& emax, const T BetaInverse, bool dump ) const ;
0066
0067
0068
0069 bool is_permissable( const T BetaInverse) const ;
0070
0071 T energy_lookup_( const T BetaInverse, const T u, double& dt, bool icdf_ ) const ;
0072 NP* energy_lookup( const T BetaInverse, const NP* uu, NP* tt, bool icdf_ ) const ;
0073
0074
0075 T energy_sample_( const T emin, const T emax, const T BetaInverse, const std::function<T()>& rng, double& dt, unsigned& count ) const ;
0076 NP* energy_sample( const T BetaInverse, const std::function<T()>& rng, unsigned ni, NP* tt ) const ;
0077
0078 };
0079