Polymetic
1.1
A c++ library for polynomial and matrix arithmetic, focused on applications in Kinematics.
|
Header for the utility functions like == operator for polynomials. More...
#include "../include/Polynomial.hpp"
#include "../include/Matrix.ipp"
#include <limits>
#include <string>
#include <utility>
#include <regex>
#include <fstream>
#include <stdexcept>
Go to the source code of this file.
Macros | |
#define | _POLYNOMIAL_TESTUTILS_IPP |
Functions | |
template<typename FieldT > | |
bool | operator== (const Polynomial< FieldT > &lhs, const Polynomial< FieldT > &rhs) |
bool | operator== (const Polynomial< double > &lhs, const Polynomial< double > &rhs) |
std::pair< size_t, size_t > | readInputSize (const std::string filename) |
Function to read the size of matrix and polynomial entries from filename of the input file. More... | |
template<typename FieldT > | |
FieldT | stringToField (const std::string &s) |
Function to convert string to various number types or coef types. Specialize for every supported type. More... | |
template<> | |
double | stringToField (const std::string &s) |
Specialization for double as return type. More... | |
template<typename FieldT > | |
void | createMatrixWithPolynomialEntries (const std::string &inputfile, Matrix< Polynomial< FieldT >> *pmat) |
Read the input and output files and create the matrix of polynomials. More... | |
template<typename FieldT > | |
Polynomial< FieldT > | readPolynomialFromFile (const std::string &resultfile) |
Header for the utility functions like == operator for polynomials.
Definition in file Polynomial_testutils.ipp.
#define _POLYNOMIAL_TESTUTILS_IPP |
Definition at line 19 of file Polynomial_testutils.ipp.
void createMatrixWithPolynomialEntries | ( | const std::string & | inputfile, |
Matrix< Polynomial< FieldT >> * | pmat | ||
) |
Read the input and output files and create the matrix of polynomials.
Definition at line 99 of file Polynomial_testutils.ipp.
References readInputSize().
bool operator== | ( | const Polynomial< FieldT > & | lhs, |
const Polynomial< FieldT > & | rhs | ||
) |
Definition at line 30 of file Polynomial_testutils.ipp.
References Polynomial< FieldT >::size().
bool operator== | ( | const Polynomial< double > & | lhs, |
const Polynomial< double > & | rhs | ||
) |
Definition at line 45 of file Polynomial_testutils.ipp.
References Polynomial< FieldT >::size().
std::pair<size_t,size_t> readInputSize | ( | const std::string | filename | ) |
Function to read the size of matrix and polynomial entries from filename of the input file.
Definition at line 65 of file Polynomial_testutils.ipp.
Referenced by createMatrixWithPolynomialEntries().
Polynomial<FieldT> readPolynomialFromFile | ( | const std::string & | resultfile | ) |
Definition at line 133 of file Polynomial_testutils.ipp.
References Polynomial< FieldT >::appendTerm().
FieldT stringToField | ( | const std::string & | s | ) |
Function to convert string to various number types or coef types. Specialize for every supported type.
Function to convert string to various number types or coef types. Specialize for every supported type.
Definition at line 90 of file Polynomial_testutils.ipp.
double stringToField | ( | const std::string & | s | ) |
Specialization for double as return type.
Function to convert string to various number types or coef types. Specialize for every supported type.
Definition at line 90 of file Polynomial_testutils.ipp.