⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vnl_least_squares_cost_function.h

📁 InsightToolkit-1.4.0(有大量的优化算法程序)
💻 H
字号:
// This is vxl/vnl/vnl_least_squares_cost_function.h
#ifndef vnl_least_squares_cost_function_h_
#define vnl_least_squares_cost_function_h_
#ifdef VCL_NEEDS_PRAGMA_INTERFACE
#pragma interface
#endif
//:
//  \file
//  \brief vnl_least_squares_function -> vnl_cost_function adaptor
//  \author Andrew W. Fitzgibbon, Oxford RRG
//  \date   20 Aug 99
//
// \verbatim
// Modifications:
//     990820 AWF Initial version.
//     LSB (Manchester) 23/3/01 Tidied documentation
// \endverbatim
//
//-----------------------------------------------------------------------------

#include <vnl/vnl_cost_function.h>
#include <vnl/vnl_least_squares_function.h>

//: An adaptor that converts a vnl_least_squares_function to a vnl_cost_function
class vnl_least_squares_cost_function : public vnl_cost_function
{
 public:
  vnl_least_squares_cost_function(vnl_least_squares_function* f);

  double f(const vnl_vector<double>& x);

  virtual void gradf(const vnl_vector<double>& x, vnl_vector<double>& gradient);

 protected:
  vnl_vector<double> storage_;
  vnl_matrix<double> jacobian_;
  vnl_least_squares_function* f_;
};

#endif // vnl_least_squares_cost_function_h_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -