36 typedef std::complex<double> (*tIntegrandFunction)(double, std::complex<double>,
void*);
38 inline static std::complex<double> one(
double omega, std::complex<double> fomega,
void* parameters) {
42 inline static std::complex<double> arg(
double omega, std::complex<double> fomega,
void* parameters) {
102 void set(
int index,
double argument, std::complex<double> value);
118 void setValue(
int index, std::complex<double> value);
132 std::complex<double>
getValue(
int index)
const;
157 void write(std::string filename)
const;
168 void read(std::string filename);
227 void createLogGrid(
double maxFrequency,
double lambda,
int n);
243 math::CFunction interpolate(
double x1,
double x2, std::complex<double> C1, std::complex<double> C2, std::complex<double> D1, std::complex<double> D2)
const;
246 std::complex<double> integrate(
double x_1,
double x_2)
const;
247 std::complex<double> integrate(
double x_1,
double x_2, tIntegrandFunction g,
void * parameters)
const;
251 std::complex<double>* m_values;
std::complex< double > interpolate(double x)
finds the linear interpolation of the discretized function at x.
Definition: cfunction.cpp:262
void writeBinary(std::string filename) const
writes the data of the instance as a binary file named filename.
Definition: cfunction.cpp:142
void rescale(double factor)
multiplies all arguments and values by the factor factor.
Definition: cfunction.cpp:187
void read(std::string filename)
reads data from the text file named filename.
Definition: cfunction.cpp:104
double getValueImag(int index) const
returns the value's imaginary part of the pair with index index.
Definition: cfunction.cpp:98
void setValue(int index, std::complex< double > value)
sets value of the argument-value pair with index index to value
Definition: cfunction.cpp:74
std::complex< double > getValue(int index) const
returns the value of the pair with index index.
Definition: cfunction.cpp:86
The MPI singleton is responsible for data exchange between compute nodes via OpenMPI.
Definition: openmpi.h:35
void write(std::string filename) const
writes the data of the instance as a text file named filename.
Definition: cfunction.cpp:128
void dump() const
dumps the data of the instance to std::cout.
Definition: cfunction.cpp:182
void resize(int length)
changes the size of the storage container to hold length argument-value pairs.
Definition: cfunction.cpp:206
void set(int index, double argument, std::complex< double > value)
sets the datapoint with indicated index.
Definition: cfunction.cpp:61
double getValueReal(int index) const
returns the value's real part of the pair with index index.
Definition: cfunction.cpp:92
double getArgument(int index) const
returns the argument of the pair with index index.
Definition: cfunction.cpp:80
void createLogGrid(double maxFrequency, double lambda, int n)
creates a logarithmic grid in argument space about 0.
Definition: cfunction.cpp:359
CFunction()
empty, default constructor
Definition: cfunction.cpp:10
int getSize() const
returns current size of the storage container
Definition: cfunction.h:88
virtual ~CFunction()
destructor frees all previously allocated memory.
Definition: cfunction.cpp:55
void setArgument(int index, double argument)
sets argument of the argument-value pair with index index to argument
Definition: cfunction.cpp:68
Definition: pfunction.h:8
void readBinary(std::string filename)
reads data to the instance as a binary file named filename.
Definition: cfunction.cpp:162
Discretized complex-valued function for real arguments.
Definition: cfunction.h:34
CFunction & operator=(const CFunction &orig)
operator=
Definition: cfunction.cpp:37
bool operator==(const CFunction &rhs) const
compares the current instance to the instance rhs
Definition: cfunction.cpp:195