GenGeo  1.1
simplex.h
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2007-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 // simplex method
14 #ifndef __SIMPLEX_H
15 #define __SIMPLEX_H
16 
17 #include "nvector.h"
18 #include "nfunction.h"
19 
20 #include <iostream>
21 
22 
23 template<class T,int n>
25 {
26  private:
29  T m_val[n+1];
30 
31  nvector<T,n> reflect(int);
32  void insert(const nvector<T,n>&,T,int);
33  void shrink();
34  void sort();
35 
36  public:
38 
39  nvector<T,n> solve(T,const nvector<T,n> &,int max=-1);
40 };
41 
42 #include "simplex.hh"
43 
44 #endif //__SIMPLEX_H