DiscussionsIssue archiveOCCT:Modeling Data

Archived issue #0029271

missing factor in function gradient

CommunityOCCT:Modeling Dataclosed5 public notes

Search issues

Description

In functions Gradient and Values
of class Extrema_FuncDistSS
file Extrema_GenExtSS.cxx
I think that a "2" factor is missing:

the function is d(u,v,s,t) = (P(u,v) - Q(s,t)) . (P(u,v) - Q(s,t))

so the u derivative should be

2 * (P - Q) * dP/du

Public activity

5 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Mathematically, you are right but in this algorithm, it is not needed. Coefficient only affects the magnitude of the first derivative but it does not affect the direction. A calculated derivative is used in step estimation (one-dimensional optimization problem), so coefficient can be omitted (as it is done in current implementation).
02Author
Looking at math_BFGS.cxx (of my version, which is 6.6.0) I saw some use of the derivative (not just its direction), to find the bracketing values.
Then the minimum is found using only the function values.
Anyway you know it better than me, for me you can close the issue
03Commenter 3
Several improvements in math_BFGS have been made over years. Your version of the occt is outdated.
04Commenter 4
Dear msv,
It is proposed to close this issue.
05Commenter 5
I agree.

Related records