CFL
Ind.hpp
Go to the documentation of this file.
1 //Copyright (c) Dmitry Kramkov, 2000-2006. All rights reserved.
2 
3 #ifndef __cflInd_hpp__
4 #define __cflInd_hpp__
5 
6 #include "cfl/Macros.hpp"
7 #include <memory>
8 #include <valarray>
9 
21 namespace cfl
22 {
29  // @{
30 
32 
38  class IInd
39  {
40  public:
44  virtual ~IInd(){}
45 
56  virtual void indicator(std::valarray<double> & rValues, double dBarrier) const = 0;
57  };
58 
60 
67  class Ind
68  {
69  public:
75  explicit Ind(IInd * pNewInd = 0);
76 
80  void indicator(std::valarray<double> & rValues,
81  double dBarrier) const;
82  private:
83  std::shared_ptr<IInd> m_pInd;
84  };
85 
86 
88 
92  namespace NInd
93  {
98  Ind smart();
99 
107  Ind naive();
108  }
109  // @}
110 }
111 
112 #include "cfl/Inline/iInd.hpp"
113 #endif // of __cflInd_hpp__
Ind naive()
Ind smart()
virtual void indicator(std::valarray< double > &rValues, double dBarrier) const =0
Standard concrete class for indicator functions.
Definition: Ind.hpp:67
Macros and constants for cfl library.
Main namespace for cfl library.
Definition: Approx.hpp:22
virtual ~IInd()
Definition: Ind.hpp:44
Interface class for one-dimensional indicator function.
Definition: Ind.hpp:38