Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sortField_AbsHigh.h
Go to the documentation of this file.
1 
15 #ifndef SORTFIELD_ABSHIGH_INCLUDED
16 #define SORTFIELD_ABSHIGH_INCLUDED
17 
18 #include <valarray>
19 
20 #include "sortField.h"
21 
22 
24 
33 {
34  public:
35  void sort(int, std::valarray<double>&);
36  void sort(int, std::valarray<double>&, std::valarray<Field>&);
37 
38  int converged(double v, double v_thrs)
39  {
40  if (fabs(v) < fabs(v_thrs)) return 1;
41 
42  return 0;
43  }
44 };
45 #endif
void sort(int, std::valarray< double > &)
Sorting (value,field) in descending order of abs(value).
int converged(double v, double v_thrs)
Base class for sorting pair instances (value,field).
Definition: sortField.h:34