00001 /* 00002 Estimation and computation of a polynomials. 00003 00004 Copyright (C) 2010 - 2014 Christoph Haenisch 00005 00006 Chair of Medical Engineering (mediTEC) 00007 RWTH Aachen University 00008 Pauwelsstr. 20 00009 52074 Aachen 00010 Germany 00011 00012 See license.txt for more information. 00013 00014 Version 1.0.0 (2013-04-05) 00015 */ 00016 00022 #ifndef POLYNOMIAL_HPP_7886646936 00023 #define POLYNOMIAL_HPP_7886646936 00024 00025 00026 #include <cassert> 00027 #include <cmath> 00028 #include <vector> 00029 00030 #include <Eigen/Core> 00031 #include <Eigen/Dense> 00032 00033 #include "Coordinate.hpp" 00034 #include "ErrorObj.hpp" 00035 #include "Iterator.hpp" 00036 #include "Range.hpp" 00037 00038 00039 namespace TRTK 00040 { 00041 00042 00058 template <class T> 00059 class Polynomial 00060 { 00061 public: 00062 00063 EIGEN_MAKE_ALIGNED_OPERATOR_NEW 00064 00065 enum Error {DIVISION_BY_ZERO, 00066 INVALID_ARGUMENT, 00067 NOT_ENOUGH_POINTS, 00068 UNEQUAL_NUMBER_OF_POINTS, 00069 UNKNOWN_ERROR, 00070 WRONG_COORDINATE_SIZE}; 00071 00072 typedef T value_type; 00073 typedef Coordinate<T> Point; 00074 typedef Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> MatrixXT; 00075 00076 /* 00077 Polynomial() {}; 00078 00079 Polynomial(const MatrixXT &) {}; 00080 00081 template <class U> 00082 Polynomial(const Polynomial<U> &) {}; 00083 00084 virtual ~Polynomial() {}; 00085 */ 00086 00087 virtual MatrixXT & getCoefficients() = 0; 00088 virtual const MatrixXT & getCoefficients() const = 0; 00089 00090 virtual T estimate(Range<Point> source_points, 00091 Range<Point> target_points, 00092 Range<T> weights = Range<T>()) = 0; 00093 00094 virtual T estimate(Iterator<Point> source_points_first, 00095 Iterator<Point> source_points_last, 00096 Iterator<Point> target_points_first, 00097 Iterator<Point> target_points_last, 00098 Iterator<T> weights_first = Iterator<T>(), 00099 Iterator<T> weights_last = Iterator<T>()) = 0; 00100 00101 virtual Point operator*(const Point &) const = 0; 00102 virtual Point transform(const Point &) const = 0; 00103 00104 virtual Polynomial<T> & reset() = 0; 00105 00106 protected: 00107 00108 typedef Coordinate<T> coordinate_type; 00109 typedef Eigen::Matrix<T, Eigen::Dynamic, 1> VectorXT; 00110 typedef Eigen::Matrix<T, 2, 1> Vector2T; 00111 typedef Eigen::Matrix<T, 3, 1> Vector3T; 00112 }; 00113 00114 00185 } // namespace TRTK 00186 00187 00188 #endif // POLYNOMIAL_HPP_7886646936
Documentation generated by Doxygen