eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // ISpline.h Math.Component package 00003 //============================================================================ 00004 // Usage : linear algebra - Spline 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2007 by eLynx project 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 // See the GNU Library General Public License for more details. 00017 //---------------------------------------------------------------------------- 00018 #ifndef __ISpline_h__ 00019 #define __ISpline_h__ 00020 00021 #include <utility> 00022 00023 namespace eLynx { 00024 namespace Math { 00025 00029 template <typename T, uint32 DEGREE> 00030 class ISpline1D 00031 { 00032 public: 00035 virtual bool IsUseful() const = 0; 00036 00039 virtual std::pair<int32,int32> GetRange() const = 0; 00040 00045 virtual T Evaluate(int32 iX) const = 0; 00046 00047 protected: 00048 virtual ~ISpline1D() {} 00049 }; 00050 00054 template <typename T, uint32 DEGREE> 00055 class ISpline2D 00056 { 00057 public: 00060 virtual bool IsUseful() const = 0; 00061 00064 virtual std::pair<int32,int32> GetXRange() const = 0; 00065 00068 virtual std::pair<int32,int32> GetYRange() const = 0; 00069 00075 virtual T Evaluate(int32 iX, int32 iY) const = 0; 00076 00084 virtual void Evaluate(const int32 *iX, uint32 iSize, int32 iY, T* oValues) const = 0; 00085 00086 protected: 00087 virtual ~ISpline2D() {} 00088 }; 00089 00090 } // namespace Math 00091 } // namespace eLynx 00092 00093 #endif // __ISpline_h__ 00094