#include "taoapp_ga.h" int TaoGAAppSetObjectiveAndGradientRoutine(TAO_GA_APPLICATION gaapp, int (*funcgrad)(TAO_GA_APPLICATION,GAVec,double*,GAVec, void*),void *ctx)Collective on TAO_GA_APPLICATION
gaapp | - the TAO_GA_APPLICATION context | |
funcgrad | - routine for evaluating the function and gradient | |
ctx | - optional user-defined context for private data for the function and gradient evaluation routine (may be TAO_NULL) |
funcgrad (TAO_GA_APPLICATION tao,GAVec x,double *f,GAVec g,void *ctx);
tao | - TAO_GA_APPLICATION application context | |
x | - input vector | |
f | - function value | |
g | - gradient vector | |
ctx | - optional user-defined context |
Using a single routine to compute the function and gradient, as specified via TaoGAAppSetObjectiveAndGradientRoutine(), may enable better performance for applications in which many of the function and gradient computations are identical.
Level:beginner
Location:src/external/globalarraytao/taoapp_ga.c
TAO Solver Index
Table of Contents