---
name: "test_functions.hpp"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/test_functions.hpp"
---

# test\_functions.hpp(3)

## NAME

src/mlpack/core/optimizers/lbfgs/test\_functions.hpp -

## SYNOPSIS

### Classes

class **mlpack::optimization::test::GeneralizedRosenbrockFunction**\
 *The Generalized Rosenbrock function in n dimensions, defined by f(x) = sum\_i^{n - 1} (f(i)(x)) f\_i(x) = 100 \* (x\_i^2 - x\_{i + 1})^2 + (1 - x\_i)^2 x\_0 = \[-1.2, 1, -1.2, 1, ...\].*  class **mlpack::optimization::test::RosenbrockFunction**\
 *The Rosenbrock function, defined by f(x) = f1(x) + f2(x) f1(x) = 100 (x2 - x1^2)^2 f2(x) = (1 - x1)^2 x\_0 = \[-1.2, 1\].*  class **mlpack::optimization::test::RosenbrockWoodFunction**\
 *The Generalized Rosenbrock function in 4 dimensions with the Wood Function in four dimensions.*  class **mlpack::optimization::test::WoodFunction**\
 *The Wood function, defined by f(x) = f1(x) + f2(x) + f3(x) + f4(x) + f5(x) + f6(x) f1(x) = 100 (x2 - x1^2)^2 f2(x) = (1 - x1)^2 f3(x) = 90 (x4 - x3^2)^2 f4(x) = (1 - x3)^2 f5(x) = 10 (x2 + x4 - 2)^2 f6(x) = (1 / 10) (x2 - x4)^2 x\_0 = \[-3, -1, -3, -1\].*

### Namespaces

 **mlpack**\
 *Linear algebra utility functions, generally performed on matrices or vectors.*   **mlpack::optimization**\
  **mlpack::optimization::test**\

## Detailed Description

**Author:**

Ryan Curtin

A collection of functions to test optimizers (in this case, L-BFGS). These come from the following paper:

This file is part of MLPACK 1.0.10.

MLPACK is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MLPACK is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details (LICENSE.txt).

You should have received a copy of the GNU General Public License along with MLPACK. If not, see http://www.gnu.org/licenses/.

Definition in file **test\_functions.hpp**.

## Author

Generated automatically by Doxygen for MLPACK from the source code.
