Polymetic  1.1
A c++ library for polynomial and matrix arithmetic, focused on applications in Kinematics.
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Polynomial_testutils.ipp File Reference

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>
Include dependency graph for Polynomial_testutils.ipp:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

Header for the utility functions like == operator for polynomials.

Definition in file Polynomial_testutils.ipp.

Macro Definition Documentation

#define _POLYNOMIAL_TESTUTILS_IPP

Definition at line 19 of file Polynomial_testutils.ipp.

Function Documentation

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.

Definition at line 99 of file Polynomial_testutils.ipp.

References readInputSize().

Here is the call graph for this function:

template<typename FieldT >
bool operator== ( const Polynomial< FieldT > &  lhs,
const Polynomial< FieldT > &  rhs 
)

Definition at line 30 of file Polynomial_testutils.ipp.

References Polynomial< FieldT >::size().

Here is the call graph for this function:

bool operator== ( const Polynomial< double > &  lhs,
const Polynomial< double > &  rhs 
)

Definition at line 45 of file Polynomial_testutils.ipp.

References Polynomial< FieldT >::size().

Here is the call graph for this function:

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().

Here is the caller graph for this function:

template<typename FieldT >
Polynomial<FieldT> readPolynomialFromFile ( const std::string &  resultfile)

Definition at line 133 of file Polynomial_testutils.ipp.

References Polynomial< FieldT >::appendTerm().

Here is the call graph for this function:

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.

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.

template<>
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.