TooN
Public Member Functions | Public Attributes | List of all members
TooN::Internal::LineSearch< Size, Precision, Func > Struct Template Reference

Turn a multidimensional function in to a 1D function by specifying a point and direction. More...

#include <conjugate_gradient.h>

Collaboration diagram for TooN::Internal::LineSearch< Size, Precision, Func >:
Collaboration graph
[legend]

Public Member Functions

 LineSearch (const Vector< Size, Precision > &s, const Vector< Size, Precision > &d, const Func &func)
 Set up the line search class. More...
 
Precision operator() (Precision x) const
 

Public Attributes

const Vector< Size, Precision > & start
 \(\Vec{s}\)
 
const Vector< Size, Precision > & direction
 \(\Vec{d}\)
 
const Func & f
 \(f(\cdotp)\)
 

Detailed Description

template<int Size, typename Precision, typename Func>
struct TooN::Internal::LineSearch< Size, Precision, Func >

Turn a multidimensional function in to a 1D function by specifying a point and direction.

A nre function is defined:

\[ g(a) = \Vec{s} + a \Vec{d} \]

Constructor & Destructor Documentation

◆ LineSearch()

template<int Size, typename Precision, typename Func>
TooN::Internal::LineSearch< Size, Precision, Func >::LineSearch ( const Vector< Size, Precision > &  s,
const Vector< Size, Precision > &  d,
const Func &  func 
)
inline

Set up the line search class.

Parameters
sStart point, \(\Vec{s}\).
ddirection, \(\Vec{d}\).
funcFunction, \(f(\cdotp)\).

Member Function Documentation

◆ operator()()

template<int Size, typename Precision, typename Func>
Precision TooN::Internal::LineSearch< Size, Precision, Func >::operator() ( Precision  x) const
inline
Parameters
xPosition to evaluate function
Returns
\(f(\vec{s} + x\vec{d})\)

The documentation for this struct was generated from the following file: