Rollback integration OCC22567 Speed up of math_FunctionSetRoot (used in Extrema)
[occt.git] / src / math / math_BFGS.lxx
1 // file math_BFGS.lxx
2
3 #include <StdFail_NotDone.hxx>
4 #include <math_Vector.hxx>
5
6 inline Standard_Boolean math_BFGS::IsDone() const { return Done; }
7
8 inline Standard_OStream& operator<<(Standard_OStream& o, 
9                                     const math_BFGS& B) 
10 {
11   B.Dump(o);
12   return o;
13 }
14
15
16 inline  const math_Vector&  math_BFGS::Location() const{ 
17   StdFail_NotDone_Raise_if(!Done, " ");
18   return TheLocation; 
19 }
20
21 inline  void math_BFGS::Location(math_Vector& Loc) const{ 
22   StdFail_NotDone_Raise_if(!Done, " ");
23   Loc = TheLocation; 
24 }
25
26
27 inline Standard_Real math_BFGS::Minimum() const{ 
28   StdFail_NotDone_Raise_if(!Done, " ");
29   return TheMinimum;
30 }
31
32
33 inline const math_Vector& math_BFGS::Gradient() const {
34   StdFail_NotDone_Raise_if(!Done, " ");
35   return TheGradient;
36 }
37
38
39 inline void math_BFGS::Gradient(math_Vector& Grad) const {
40   StdFail_NotDone_Raise_if(!Done, " ");
41   Grad = TheGradient;
42 }
43
44
45 inline Standard_Integer math_BFGS::NbIterations() const {
46   StdFail_NotDone_Raise_if(!Done, " ");
47   return nbiter;
48 }
49