Test for 0022778: Bug in BRepMesh
[occt.git] / src / math / math_NewtonMinimum.lxx
CommitLineData
b311480e 1// Created on: 1996-05-03
2// Created by: Philippe MANGIN
3// Copyright (c) 1996-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22#include <StdFail_NotDone.hxx>
23
24inline Standard_Boolean math_NewtonMinimum::IsDone() const
25{
26 return Done;
27}
28
29inline const math_Vector& math_NewtonMinimum::Location() const
30{
31 StdFail_NotDone_Raise_if(!Done, "NewtonMinimum");
32 return TheLocation;
33}
34
35inline void math_NewtonMinimum::Location(math_Vector& Loc) const
36{
37 StdFail_NotDone_Raise_if(!Done, "NewtonMinimum");
38 Loc = TheLocation;
39}
40
41inline Standard_Real math_NewtonMinimum::Minimum() const
42{
43 StdFail_NotDone_Raise_if(!Done, "NewtonMinimum");
44 return TheMinimum;
45}
46
47inline const math_Vector& math_NewtonMinimum::Gradient() const
48{
49 StdFail_NotDone_Raise_if(!Done, "NewtonMinimum");
50 return TheGradient;
51}
52
53inline void math_NewtonMinimum::Gradient(math_Vector& Grad) const
54{
55 StdFail_NotDone_Raise_if(!Done, "NewtonMinimum");
56 Grad = TheGradient;
57}
58
59inline Standard_Integer math_NewtonMinimum::NbIterations() const
60{
61 StdFail_NotDone_Raise_if(!Done, "NewtonMinimum");
62 return nbiter;
63}
64