24 #ifndef COM_DAFER45_TBTK_FIELD_WRAPPER
25 #define COM_DAFER45_TBTK_FIELD_WRAPPER
27 #include "TBTK/Field.h"
29 #include <initializer_list>
42 enum class ArgumentType{
47 template<
typename DataType,
typename ArgumentType>
48 FieldWrapper(Field<DataType, ArgumentType> &field);
51 DataType getDataType()
const;
54 ArgumentType getArgumentType()
const;
57 template<
typename Data,
typename Argument>
58 Data operator()(std::initializer_list<Argument> arguments)
const;
61 template<
typename Data,
typename Argument>
62 bool getIsCompact()
const;
65 template<
typename Data,
typename Argument>
66 const std::vector<Argument>& getCoordinates()
const;
70 template<
typename Data,
typename Argument>
71 Argument getExtent()
const;
81 ArgumentType argumentType;
85 inline FieldWrapper::FieldWrapper(Field<std::complex<double>,
double> &field){
87 dataType = DataType::ComplexDouble;
88 argumentType = ArgumentType::Double;
91 inline FieldWrapper::DataType FieldWrapper::getDataType()
const{
95 inline FieldWrapper::ArgumentType FieldWrapper::getArgumentType()
const{
100 inline std::complex<double> FieldWrapper::operator()<std::complex<double>,
double>(
101 std::initializer_list<double> arguments
103 return ((Field<std::complex<double>,
double>*)field)->
operator()(arguments);
107 inline bool FieldWrapper::getIsCompact<std::complex<double>,
double>()
const{
108 return ((Field<std::complex<double>,
double>*)field)->getIsCompact();
112 inline const std::vector<double>& FieldWrapper::getCoordinates<std::complex<double>,
double>()
const{
113 return ((Field<std::complex<double>,
double>*)field)->getCoordinates();
117 inline double FieldWrapper::getExtent<std::complex<double>,
double>()
const{
118 return ((Field<std::complex<double>,
double>*)field)->getExtent();