Copyright | © 2016-2017 George Steel and Peter Jurgec |
---|---|

License | GPL-2+ |

Maintainer | george.steel@gmail.com |

Safe Haskell | None |

Language | Haskell2010 |

Implementations of line search and conjugate gradient search for minimization. Line search uses Illinois False Position.

# Documentation

traceInline :: String -> a -> a Source #

Version of `trace`

which does not output a trailing linebreak. Good for progress bars.

:: Double | stoping threshold uncertainty |

-> (Vec -> Vec -> Double) | derivative of function to minimize |

-> Vec | starting point |

-> Vec | direction to search in |

-> Vec | minimum point |

Line search minimization using a modified Illinois False Position method.

Adapted from description at https://en.wikipedia.org/wiki/False_position_method

conjugateGradientSearch Source #

:: Bool | trace progress to |

-> (Double, Double) | stopping thresholds for conjugate gradient step and line search |

-> (Vec -> (Vec, Bool)) | function to project points back into area defined by inequality constraints
(for unconstrained problems use |

-> (Vec -> (Double, Vec)) | function to minimize, returns value and gradient |

-> (Vec -> Vec -> Double) | partial derivative of function to minimize |

-> Vec | starting point |

-> Vec | minimum point |

Nonlinear conjugate gradient search using Polak-Ribière method. Stopping condition is two steps both havong a delta below the threshold.