Skip to content

Commit 11c2544

Browse files
committed
Draft expression templates for functions
1 parent f030602 commit 11c2544

26 files changed

+2465
-1428
lines changed

BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ load("//:generator.bzl", "build_example", "build_test")
44

55

66
build_example("simple")
7+
build_example("debug")
78
build_example("constrained_simple")
89
build_test("verify")
910

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public:
6161
* @param hessian (Optional) Pointer to store the computed Hessian.
6262
* @return The function value f(x).
6363
*/
64-
scalar_t operator()(const vector_t &x, vector_t *gradient = nullptr,
65-
matrix_t *hessian = nullptr) const override {
64+
ScalarType operator()(const VectorType &x, VectorType *gradient = nullptr,
65+
MatrixType *hessian = nullptr) const override {
6666

6767
// Even for functions declared as Differentiability::First, the gradient is not always required.
6868
// To save computation, we only calculate and store the gradient if a non-null pointer is provided.

include/cppoptlib/constrained_function.h

Lines changed: 0 additions & 342 deletions
This file was deleted.

0 commit comments

Comments
 (0)