aboutsummaryrefslogtreecommitdiffstats
path: root/methods/powell/bas_util.hpp
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2010-06-03 17:55:42 +0000
committerastrojhgu <astrojhgu@ed2142bd-67ad-457f-ba7c-d818d4011675>2010-06-03 17:55:42 +0000
commit109473cacf85c7e2a2831d56531399ab4621654e (patch)
treeb26e7137d482a5711edf893af88c4487bc875783 /methods/powell/bas_util.hpp
parent492fc9d5677bad71986ff437c62f17a28d7b5996 (diff)
downloadopt-utilities-109473cacf85c7e2a2831d56531399ab4621654e.tar.bz2
git-svn-id: file:///home/svn/opt_utilities@118 ed2142bd-67ad-457f-ba7c-d818d4011675
Diffstat (limited to 'methods/powell/bas_util.hpp')
-rw-r--r--methods/powell/bas_util.hpp65
1 files changed, 0 insertions, 65 deletions
diff --git a/methods/powell/bas_util.hpp b/methods/powell/bas_util.hpp
deleted file mode 100644
index ccdce9e..0000000
--- a/methods/powell/bas_util.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef BAS_UTIL
-#define BAS_UTIL
-#define OPT_HEADER
-#include <core/opt_traits.hpp>
-#include <algorithm>
-namespace opt_utilities
-{
- template <typename T>
- T tabs(T x)
- {
- return T(x)<T(0)?T(-x):T(x);
- }
-
- template <typename T>
- T sqr(T x)
- {
- return x*x;
- }
-
-
- template <typename T>
- void shft3(T&a,T& b,T& c,T d)
- {
- opt_eq(a,b);
- opt_eq(b,c);
- opt_eq(c,d);
- }
-
- template <typename T>
- void shft(T& a,T& b,T& c,T d)
- {
- opt_eq(a,b);
- opt_eq(b,c);
- opt_eq(c,d);
- }
- // template <typename T>
- // void swap(T& ax,T& bx)
- //{
- // swap(ax,bx);
- // T temp;
- //opt_eq(temp,ax);
- //opt_eq(ax,bx);
- //opt_eq(bx,temp);
- //}
-
- template <typename T>
- T sign(const T& a,const T& b)
- {
- return b>=0?T(a>=0?T(a):T(-a)):T(a>=0?T(-a):T(a));
- }
-
- template <typename T>
- T max(T a,T b)
- {
- return b>a?T(b):T(a);
- }
-
- template <typename T>
- void mov3(T& a,T& b,T& c, T& d,T& e,T& f)
- {
- opt_eq(a,d);opt_eq(b,e);opt_eq(c,f);
- }
-}
-
-#endif