interface
This commit is contained in:
parent
304489c74f
commit
5e7c08fff7
@ -78,14 +78,11 @@ static lbfgsfloatval_t evaluate(
|
|||||||
|
|
||||||
a1 = YAP_ArgOfTerm(1,call);
|
a1 = YAP_ArgOfTerm(1,call);
|
||||||
if (YAP_IsFloatTerm(a1)) {
|
if (YAP_IsFloatTerm(a1)) {
|
||||||
YAP_ShutdownGoal( TRUE );
|
|
||||||
return (lbfgsfloatval_t) YAP_FloatOfTerm(a1);
|
return (lbfgsfloatval_t) YAP_FloatOfTerm(a1);
|
||||||
} else if (YAP_IsIntTerm(a1)) {
|
} else if (YAP_IsIntTerm(a1)) {
|
||||||
YAP_ShutdownGoal( TRUE );
|
|
||||||
return (lbfgsfloatval_t) YAP_IntOfTerm(a1);
|
return (lbfgsfloatval_t) YAP_IntOfTerm(a1);
|
||||||
}
|
}
|
||||||
|
|
||||||
YAP_ShutdownGoal( TRUE );
|
|
||||||
fprintf(stderr, "ERROR: The evaluate call back function did not return a number as first argument.\n");
|
fprintf(stderr, "ERROR: The evaluate call back function did not return a number as first argument.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user