mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
Coding - Initialize member variables with default values #362
Clang-tidy applying rule for cppcoreguidelines-pro-type-member-init. Updated: TKernel and TKMath Update constructor in some classes instead of direct initialization Refactor Bnd_BoundSortBox and Bnd_Box constructors to initialize member variables directly
This commit is contained in:
parent
a8950426b5
commit
fb73c3b712
@ -64,7 +64,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
// local buffer, to be sufficient for addressing by index [Degree+1][Degree+1]
|
// local buffer, to be sufficient for addressing by index [Degree+1][Degree+1]
|
||||||
// (see math_Matrix implementation)
|
// (see math_Matrix implementation)
|
||||||
Standard_Real myBuffer[27 * 27];
|
Standard_Real myBuffer[27 * 27]{};
|
||||||
};
|
};
|
||||||
|
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
|
@ -46,9 +46,9 @@ struct BSplCLib_DataContainer
|
|||||||
"BSplCLib: bspline degree is greater than maximum supported");
|
"BSplCLib: bspline degree is greater than maximum supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
Standard_Real poles[2 * (25 + 1)];
|
Standard_Real poles[2 * (25 + 1)]{};
|
||||||
Standard_Real knots[2 * 25];
|
Standard_Real knots[2 * 25]{};
|
||||||
Standard_Real ders[4];
|
Standard_Real ders[4]{};
|
||||||
};
|
};
|
||||||
|
|
||||||
// methods for 1 dimensional BSplines
|
// methods for 1 dimensional BSplines
|
||||||
|
@ -54,10 +54,10 @@ struct BSplSLib_DataContainer
|
|||||||
"BSplSLib: bspline degree is greater than maximum supported");
|
"BSplSLib: bspline degree is greater than maximum supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
Standard_Real poles[4 * (25 + 1) * (25 + 1)];
|
Standard_Real poles[4 * (25 + 1) * (25 + 1)]{};
|
||||||
Standard_Real knots1[2 * 25];
|
Standard_Real knots1[2 * 25]{};
|
||||||
Standard_Real knots2[2 * 25];
|
Standard_Real knots2[2 * 25]{};
|
||||||
Standard_Real ders[48];
|
Standard_Real ders[48]{};
|
||||||
};
|
};
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
|
@ -418,15 +418,25 @@ void BSB_T3Bits::AppendAxisX(const Standard_Integer i, const Standard_Integer v)
|
|||||||
axisX[0][i] = n;
|
axisX[0][i] = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
|
|
||||||
Bnd_BoundSortBox::Bnd_BoundSortBox()
|
Bnd_BoundSortBox::Bnd_BoundSortBox()
|
||||||
: discrX(0),
|
: myBox(),
|
||||||
|
myBndComponents(nullptr),
|
||||||
|
Xmin(0.),
|
||||||
|
Ymin(0.),
|
||||||
|
Zmin(0.),
|
||||||
|
deltaX(0.),
|
||||||
|
deltaY(0.),
|
||||||
|
deltaZ(0.),
|
||||||
|
discrX(0),
|
||||||
discrY(0),
|
discrY(0),
|
||||||
discrZ(0)
|
discrZ(0),
|
||||||
|
theFound(0),
|
||||||
|
Crible(),
|
||||||
|
lastResult(),
|
||||||
|
TabBits(0)
|
||||||
{
|
{
|
||||||
TabBits = 0;
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
NBCOMPARE = 0L;
|
NBCOMPARE = 0L;
|
||||||
NBBOITES = 0L;
|
NBBOITES = 0L;
|
||||||
|
@ -32,24 +32,31 @@
|
|||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
|
|
||||||
Bnd_Box::Bnd_Box()
|
Bnd_Box::Bnd_Box()
|
||||||
|
// Equal to SetVoid();
|
||||||
: Xmin(RealLast()),
|
: Xmin(RealLast()),
|
||||||
Xmax(-RealLast()),
|
Xmax(-RealLast()),
|
||||||
Ymin(RealLast()),
|
Ymin(RealLast()),
|
||||||
Ymax(-RealLast()),
|
Ymax(-RealLast()),
|
||||||
Zmin(RealLast()),
|
Zmin(RealLast()),
|
||||||
Zmax(-RealLast()),
|
Zmax(-RealLast()),
|
||||||
Gap(0.0)
|
Gap(0.0),
|
||||||
|
Flags(VoidMask)
|
||||||
{
|
{
|
||||||
SetVoid();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
|
|
||||||
Bnd_Box::Bnd_Box(const gp_Pnt& theMin, const gp_Pnt& theMax)
|
Bnd_Box::Bnd_Box(const gp_Pnt& theMin, const gp_Pnt& theMax)
|
||||||
: Gap(0.0)
|
// Equal to Update(theMin.X(), theMin.Y(), theMin.Z(), theMax.X(), theMax.Y(), theMax.Z());
|
||||||
|
: Xmin(theMin.X()),
|
||||||
|
Xmax(theMax.X()),
|
||||||
|
Ymin(theMin.Y()),
|
||||||
|
Ymax(theMax.Y()),
|
||||||
|
Zmin(theMin.Z()),
|
||||||
|
Zmax(theMax.Z()),
|
||||||
|
Gap(0.0),
|
||||||
|
Flags(0)
|
||||||
{
|
{
|
||||||
SetVoid();
|
|
||||||
Update(theMin.X(), theMin.Y(), theMin.Z(), theMax.X(), theMax.Y(), theMax.Z());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
|
@ -83,8 +83,8 @@ public:
|
|||||||
Ymax = -RealLast();
|
Ymax = -RealLast();
|
||||||
Zmin = RealLast();
|
Zmin = RealLast();
|
||||||
Zmax = -RealLast();
|
Zmax = -RealLast();
|
||||||
Flags = VoidMask;
|
|
||||||
Gap = 0.0;
|
Gap = 0.0;
|
||||||
|
Flags = VoidMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Sets this bounding box so that it bounds
|
//! Sets this bounding box so that it bounds
|
||||||
|
@ -358,7 +358,7 @@ private:
|
|||||||
|
|
||||||
//! Points of ditetrahedron
|
//! Points of ditetrahedron
|
||||||
//! given by their indices in myLExtremalPoints.
|
//! given by their indices in myLExtremalPoints.
|
||||||
Standard_Integer myTriIdx[5];
|
Standard_Integer myTriIdx[5]{};
|
||||||
|
|
||||||
//! List of extremal points
|
//! List of extremal points
|
||||||
gp_XYZ myLExtremalPoints[myNbExtremalPoints];
|
gp_XYZ myLExtremalPoints[myNbExtremalPoints];
|
||||||
|
@ -93,13 +93,13 @@ private:
|
|||||||
const CSLib_Class2d& operator=(const CSLib_Class2d& Other) const;
|
const CSLib_Class2d& operator=(const CSLib_Class2d& Other) const;
|
||||||
|
|
||||||
NCollection_Handle<TColStd_Array1OfReal> MyPnts2dX, MyPnts2dY;
|
NCollection_Handle<TColStd_Array1OfReal> MyPnts2dX, MyPnts2dY;
|
||||||
Standard_Real Tolu;
|
Standard_Real Tolu{};
|
||||||
Standard_Real Tolv;
|
Standard_Real Tolv{};
|
||||||
Standard_Integer N;
|
Standard_Integer N{};
|
||||||
Standard_Real Umin;
|
Standard_Real Umin{};
|
||||||
Standard_Real Vmin;
|
Standard_Real Vmin{};
|
||||||
Standard_Real Umax;
|
Standard_Real Umax{};
|
||||||
Standard_Real Vmax;
|
Standard_Real Vmax{};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _CSLib_Class2d_HeaderFile
|
#endif // _CSLib_Class2d_HeaderFile
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
Convert_CompBezierCurves2dToBSplineCurve2d::Convert_CompBezierCurves2dToBSplineCurve2d(
|
Convert_CompBezierCurves2dToBSplineCurve2d::Convert_CompBezierCurves2dToBSplineCurve2d(
|
||||||
const Standard_Real AngularTolerance)
|
const Standard_Real AngularTolerance)
|
||||||
: myAngular(AngularTolerance),
|
: myDegree(0),
|
||||||
|
myAngular(AngularTolerance),
|
||||||
myDone(Standard_False)
|
myDone(Standard_False)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
Convert_CompBezierCurvesToBSplineCurve::Convert_CompBezierCurvesToBSplineCurve(
|
Convert_CompBezierCurvesToBSplineCurve::Convert_CompBezierCurvesToBSplineCurve(
|
||||||
const Standard_Real AngularTolerance)
|
const Standard_Real AngularTolerance)
|
||||||
: myAngular(AngularTolerance),
|
: myDegree(0),
|
||||||
|
myAngular(AngularTolerance),
|
||||||
myDone(Standard_False)
|
myDone(Standard_False)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,8 @@ Convert_ConicToBSplineCurve::Convert_ConicToBSplineCurve(const Standard_Integer
|
|||||||
const Standard_Integer Degree)
|
const Standard_Integer Degree)
|
||||||
: degree(Degree),
|
: degree(Degree),
|
||||||
nbPoles(NbPoles),
|
nbPoles(NbPoles),
|
||||||
nbKnots(NbKnots)
|
nbKnots(NbKnots),
|
||||||
|
isperiodic(Standard_False)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (NbPoles >= 2)
|
if (NbPoles >= 2)
|
||||||
|
@ -38,7 +38,9 @@ Convert_ElementarySurfaceToBSplineSurface::Convert_ElementarySurfaceToBSplineSur
|
|||||||
nbUPoles(NbUPoles),
|
nbUPoles(NbUPoles),
|
||||||
nbVPoles(NbVPoles),
|
nbVPoles(NbVPoles),
|
||||||
nbUKnots(NbUKnots),
|
nbUKnots(NbUKnots),
|
||||||
nbVKnots(NbVKnots)
|
nbVKnots(NbVKnots),
|
||||||
|
isuperiodic(Standard_False),
|
||||||
|
isvperiodic(Standard_False)
|
||||||
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -456,7 +456,7 @@ Storage_Error FSD_BinaryFile::BeginWriteInfoSection()
|
|||||||
union {
|
union {
|
||||||
char ti2[4];
|
char ti2[4];
|
||||||
Standard_Integer aResult;
|
Standard_Integer aResult;
|
||||||
} aWrapUnion;
|
} aWrapUnion{};
|
||||||
|
|
||||||
aWrapUnion.ti2[0] = 1;
|
aWrapUnion.ti2[0] = 1;
|
||||||
aWrapUnion.ti2[1] = 2;
|
aWrapUnion.ti2[1] = 2;
|
||||||
@ -619,7 +619,7 @@ void FSD_BinaryFile::ReadInfo(Standard_Integer& nbObj,
|
|||||||
|
|
||||||
void FSD_BinaryFile::ReadCompleteInfo(Standard_IStream& theIStream, Handle(Storage_Data)& theData)
|
void FSD_BinaryFile::ReadCompleteInfo(Standard_IStream& theIStream, Handle(Storage_Data)& theData)
|
||||||
{
|
{
|
||||||
FSD_FileHeader aHeaderPos;
|
FSD_FileHeader aHeaderPos{};
|
||||||
ReadHeader(theIStream, aHeaderPos);
|
ReadHeader(theIStream, aHeaderPos);
|
||||||
|
|
||||||
if (theData.IsNull())
|
if (theData.IsNull())
|
||||||
@ -1678,7 +1678,7 @@ Standard_Real FSD_BinaryFile::InverseReal(const Standard_Real theValue)
|
|||||||
union {
|
union {
|
||||||
Standard_Integer i[2];
|
Standard_Integer i[2];
|
||||||
Standard_Real aValue;
|
Standard_Real aValue;
|
||||||
} aWrapUnion;
|
} aWrapUnion{};
|
||||||
|
|
||||||
aWrapUnion.aValue = theValue;
|
aWrapUnion.aValue = theValue;
|
||||||
|
|
||||||
@ -1701,7 +1701,7 @@ Standard_ShortReal FSD_BinaryFile::InverseShortReal(const Standard_ShortReal the
|
|||||||
union {
|
union {
|
||||||
Standard_ShortReal aValue;
|
Standard_ShortReal aValue;
|
||||||
Standard_Integer aResult;
|
Standard_Integer aResult;
|
||||||
} aWrapUnion;
|
} aWrapUnion{};
|
||||||
|
|
||||||
aWrapUnion.aValue = theValue;
|
aWrapUnion.aValue = theValue;
|
||||||
aWrapUnion.aResult = InverseInt(aWrapUnion.aResult);
|
aWrapUnion.aResult = InverseInt(aWrapUnion.aResult);
|
||||||
@ -1729,7 +1729,7 @@ inline uint64_t OCCT_InverseSizeSpecialized<8>(const uint64_t theValue, int)
|
|||||||
union {
|
union {
|
||||||
Standard_Integer i[2];
|
Standard_Integer i[2];
|
||||||
uint64_t aValue;
|
uint64_t aValue;
|
||||||
} aWrapUnion;
|
} aWrapUnion{};
|
||||||
|
|
||||||
aWrapUnion.aValue = theValue;
|
aWrapUnion.aValue = theValue;
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
FSD_BStream myStream;
|
FSD_BStream myStream;
|
||||||
FSD_FileHeader myHeader;
|
FSD_FileHeader myHeader{};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _FSD_BinaryFile_HeaderFile
|
#endif // _FSD_BinaryFile_HeaderFile
|
||||||
|
@ -86,7 +86,7 @@ void* NCollection_AccAllocator::Allocate(const size_t theSize)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void NCollection_AccAllocator::Free(void* theAddress)
|
void NCollection_AccAllocator::Free(void* theAddress)
|
||||||
{
|
{
|
||||||
Key aKey;
|
Key aKey{};
|
||||||
Block* aBlock = findBlock(theAddress, aKey);
|
Block* aBlock = findBlock(theAddress, aKey);
|
||||||
|
|
||||||
#if !defined No_Exception && !defined No_Standard_ProgramError
|
#if !defined No_Exception && !defined No_Standard_ProgramError
|
||||||
|
@ -56,7 +56,7 @@ void OSD_Chronometer::GetProcessCPU(Standard_Real& theUserSeconds, Standard_Real
|
|||||||
static const long aCLK_TCK = CLK_TCK;
|
static const long aCLK_TCK = CLK_TCK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tms aCurrentTMS;
|
tms aCurrentTMS{};
|
||||||
times(&aCurrentTMS);
|
times(&aCurrentTMS);
|
||||||
|
|
||||||
theUserSeconds = (Standard_Real)aCurrentTMS.tms_utime / aCLK_TCK;
|
theUserSeconds = (Standard_Real)aCurrentTMS.tms_utime / aCLK_TCK;
|
||||||
|
@ -61,7 +61,7 @@ private:
|
|||||||
TCollection_AsciiString myMessage;
|
TCollection_AsciiString myMessage;
|
||||||
Standard_Integer myErrno;
|
Standard_Integer myErrno;
|
||||||
OSD_WhoAmI myCode;
|
OSD_WhoAmI myCode;
|
||||||
Standard_Integer extCode;
|
Standard_Integer extCode{};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _OSD_Error_HeaderFile
|
#endif // _OSD_Error_HeaderFile
|
||||||
|
@ -150,10 +150,10 @@ private:
|
|||||||
// ---------- PRIVATE FIELDS ----------
|
// ---------- PRIVATE FIELDS ----------
|
||||||
|
|
||||||
Standard_Integer myNConnections;
|
Standard_Integer myNConnections;
|
||||||
Standard_Integer myNodes[3];
|
Standard_Integer myNodes[3]{};
|
||||||
Standard_Integer myNodesOnConnected[3];
|
Standard_Integer myNodesOnConnected[3]{};
|
||||||
const Poly_CoherentTriangle* mypConnected[3];
|
const Poly_CoherentTriangle* mypConnected[3]{};
|
||||||
const Poly_CoherentLink* mypLink[3];
|
const Poly_CoherentLink* mypLink[3]{};
|
||||||
|
|
||||||
friend class Poly_CoherentTriangulation;
|
friend class Poly_CoherentTriangulation;
|
||||||
};
|
};
|
||||||
|
@ -108,6 +108,8 @@ Quantity_Date::Quantity_Date(const Standard_Integer mm,
|
|||||||
const Standard_Integer ss,
|
const Standard_Integer ss,
|
||||||
const Standard_Integer mis,
|
const Standard_Integer mis,
|
||||||
const Standard_Integer mics)
|
const Standard_Integer mics)
|
||||||
|
: mySec(0),
|
||||||
|
myUSec(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
SetValues(mm, dd, yy, hh, mn, ss, mis, mics);
|
SetValues(mm, dd, yy, hh, mn, ss, mis, mics);
|
||||||
|
@ -66,6 +66,8 @@ Quantity_Period::Quantity_Period(const Standard_Integer dd,
|
|||||||
const Standard_Integer ss,
|
const Standard_Integer ss,
|
||||||
const Standard_Integer mils,
|
const Standard_Integer mils,
|
||||||
const Standard_Integer mics)
|
const Standard_Integer mics)
|
||||||
|
: mySec(0),
|
||||||
|
myUSec(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
SetValues(dd, hh, mn, ss, mils, mics);
|
SetValues(dd, hh, mn, ss, mils, mics);
|
||||||
@ -77,6 +79,8 @@ Quantity_Period::Quantity_Period(const Standard_Integer dd,
|
|||||||
//
|
//
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
Quantity_Period::Quantity_Period(const Standard_Integer ss, const Standard_Integer mics)
|
Quantity_Period::Quantity_Period(const Standard_Integer ss, const Standard_Integer mics)
|
||||||
|
: mySec(0),
|
||||||
|
myUSec(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
SetValues(ss, mics);
|
SetValues(ss, mics);
|
||||||
|
@ -135,7 +135,8 @@ Resource_Manager::Resource_Manager(const Standard_CString aName, const Standard_
|
|||||||
|
|
||||||
Resource_Manager::Resource_Manager()
|
Resource_Manager::Resource_Manager()
|
||||||
: myName(""),
|
: myName(""),
|
||||||
myVerbose(Standard_False)
|
myVerbose(Standard_False),
|
||||||
|
myInitialized(Standard_False)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ void Standard_GUID::ToExtString(const Standard_PExtCharacter aStrGuid) const
|
|||||||
|
|
||||||
Standard_UUID Standard_GUID::ToUUID() const
|
Standard_UUID Standard_GUID::ToUUID() const
|
||||||
{
|
{
|
||||||
Standard_UUID result;
|
Standard_UUID result{};
|
||||||
|
|
||||||
result.Data1 = my32b;
|
result.Data1 = my32b;
|
||||||
result.Data2 = my16b1;
|
result.Data2 = my16b1;
|
||||||
|
@ -145,7 +145,7 @@ union RealMap {
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
static int HardwareHighBitsOfDouble()
|
static int HardwareHighBitsOfDouble()
|
||||||
{
|
{
|
||||||
RealMap MaxDouble;
|
RealMap MaxDouble{};
|
||||||
MaxDouble.real = DBL_MAX;
|
MaxDouble.real = DBL_MAX;
|
||||||
//=========================================================
|
//=========================================================
|
||||||
// representation of the max double in IEEE is
|
// representation of the max double in IEEE is
|
||||||
@ -170,7 +170,7 @@ static int HardwareHighBitsOfDouble()
|
|||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
static int HardwareLowBitsOfDouble()
|
static int HardwareLowBitsOfDouble()
|
||||||
{
|
{
|
||||||
RealMap MaxDouble;
|
RealMap MaxDouble{};
|
||||||
MaxDouble.real = DBL_MAX;
|
MaxDouble.real = DBL_MAX;
|
||||||
//=========================================================
|
//=========================================================
|
||||||
// representation of the max double in IEEE is
|
// representation of the max double in IEEE is
|
||||||
@ -193,7 +193,7 @@ static const int LowBitsOfDouble = HardwareLowBitsOfDouble();
|
|||||||
|
|
||||||
double NextAfter(const double x, const double y)
|
double NextAfter(const double x, const double y)
|
||||||
{
|
{
|
||||||
RealMap res;
|
RealMap res{};
|
||||||
|
|
||||||
res.real = x;
|
res.real = x;
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ TCollection_ExtendedString::TCollection_ExtendedString(const Standard_Integer aV
|
|||||||
union {
|
union {
|
||||||
int bid;
|
int bid;
|
||||||
char t[13];
|
char t[13];
|
||||||
} CHN;
|
} CHN{};
|
||||||
|
|
||||||
Sprintf(&CHN.t[0], "%d", aValue);
|
Sprintf(&CHN.t[0], "%d", aValue);
|
||||||
allocate((int)strlen(CHN.t));
|
allocate((int)strlen(CHN.t));
|
||||||
@ -213,7 +213,7 @@ TCollection_ExtendedString::TCollection_ExtendedString(const Standard_Real aValu
|
|||||||
union {
|
union {
|
||||||
int bid;
|
int bid;
|
||||||
char t[50];
|
char t[50];
|
||||||
} CHN;
|
} CHN{};
|
||||||
|
|
||||||
Sprintf(&CHN.t[0], "%g", aValue);
|
Sprintf(&CHN.t[0], "%g", aValue);
|
||||||
allocate((int)strlen(CHN.t));
|
allocate((int)strlen(CHN.t));
|
||||||
|
@ -110,9 +110,9 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
private:
|
private:
|
||||||
Standard_Integer thecurrentquantity;
|
Standard_Integer thecurrentquantity{};
|
||||||
Handle(Units_QuantitiesSequence) thequantitiessequence;
|
Handle(Units_QuantitiesSequence) thequantitiessequence;
|
||||||
Standard_Integer thecurrentunit;
|
Standard_Integer thecurrentunit{};
|
||||||
Handle(Units_UnitsSequence) theunitssequence;
|
Handle(Units_UnitsSequence) theunitssequence;
|
||||||
Handle(TColStd_HSequenceOfInteger) theactiveunitssequence;
|
Handle(TColStd_HSequenceOfInteger) theactiveunitssequence;
|
||||||
};
|
};
|
||||||
|
@ -96,8 +96,8 @@ protected:
|
|||||||
private:
|
private:
|
||||||
Standard_Boolean Done;
|
Standard_Boolean Done;
|
||||||
Standard_Boolean InfiniteStatus;
|
Standard_Boolean InfiniteStatus;
|
||||||
Standard_Integer NbSol;
|
Standard_Integer NbSol{};
|
||||||
Standard_Real TheRoots[4];
|
Standard_Real TheRoots[4]{};
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <math_DirectPolynomialRoots.lxx>
|
#include <math_DirectPolynomialRoots.lxx>
|
||||||
|
@ -66,7 +66,7 @@ private:
|
|||||||
Standard_EXPORT void Allocate();
|
Standard_EXPORT void Allocate();
|
||||||
|
|
||||||
Standard_Address Addr;
|
Standard_Address Addr;
|
||||||
Standard_Real Buf[16];
|
Standard_Real Buf[16]{};
|
||||||
Standard_Boolean isAllocated;
|
Standard_Boolean isAllocated;
|
||||||
Standard_Integer LowR;
|
Standard_Integer LowR;
|
||||||
Standard_Integer UppR;
|
Standard_Integer UppR;
|
||||||
|
@ -88,7 +88,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
Standard_Boolean Done;
|
Standard_Boolean Done;
|
||||||
Standard_Real TheRoot;
|
Standard_Real TheRoot;
|
||||||
Standard_Real TheError;
|
Standard_Real TheError{};
|
||||||
Standard_Real TheDerivative;
|
Standard_Real TheDerivative;
|
||||||
Standard_Integer NbIter;
|
Standard_Integer NbIter;
|
||||||
};
|
};
|
||||||
|
@ -65,11 +65,11 @@ public:
|
|||||||
Standard_EXPORT void Dump(Standard_OStream& o) const;
|
Standard_EXPORT void Dump(Standard_OStream& o) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Standard_Boolean Singular;
|
Standard_Boolean Singular{};
|
||||||
math_Matrix LU;
|
math_Matrix LU;
|
||||||
math_Matrix A2;
|
math_Matrix A2;
|
||||||
math_IntegerVector Index;
|
math_IntegerVector Index;
|
||||||
Standard_Real D;
|
Standard_Real D{};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Standard_Boolean Done;
|
Standard_Boolean Done;
|
||||||
|
@ -67,8 +67,8 @@ private:
|
|||||||
const Standard_Real Upper,
|
const Standard_Real Upper,
|
||||||
const Standard_Integer Order);
|
const Standard_Integer Order);
|
||||||
|
|
||||||
Standard_Real Val;
|
Standard_Real Val{};
|
||||||
Standard_Boolean Done;
|
Standard_Boolean Done{};
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <math_GaussSingleIntegration.lxx>
|
#include <math_GaussSingleIntegration.lxx>
|
||||||
|
@ -248,19 +248,19 @@ private:
|
|||||||
|
|
||||||
// Algorithm data.
|
// Algorithm data.
|
||||||
Standard_Real myZ;
|
Standard_Real myZ;
|
||||||
Standard_Real myE1; // Border coefficient.
|
Standard_Real myE1{}; // Border coefficient.
|
||||||
Standard_Real myE2; // Minimum step size.
|
Standard_Real myE2{}; // Minimum step size.
|
||||||
Standard_Real myE3; // Local extrema starting parameter.
|
Standard_Real myE3{}; // Local extrema starting parameter.
|
||||||
|
|
||||||
math_Vector myX; // Current modified solution.
|
math_Vector myX; // Current modified solution.
|
||||||
math_Vector myTmp; // Current modified solution.
|
math_Vector myTmp; // Current modified solution.
|
||||||
math_Vector myV; // Steps array.
|
math_Vector myV; // Steps array.
|
||||||
math_Vector myMaxV; // Max Steps array.
|
math_Vector myMaxV; // Max Steps array.
|
||||||
Standard_Real myLastStep; // Last step.
|
Standard_Real myLastStep{}; // Last step.
|
||||||
|
|
||||||
NCollection_Array1<Standard_Real> myCellSize;
|
NCollection_Array1<Standard_Real> myCellSize;
|
||||||
Standard_Integer myMinCellFilterSol;
|
Standard_Integer myMinCellFilterSol;
|
||||||
Standard_Boolean isFirstCellFilterInvoke;
|
Standard_Boolean isFirstCellFilterInvoke{};
|
||||||
NCollection_CellFilter<NCollection_CellFilter_Inspector> myFilter;
|
NCollection_CellFilter<NCollection_CellFilter_Inspector> myFilter;
|
||||||
|
|
||||||
// Continuity of local borders.
|
// Continuity of local borders.
|
||||||
|
@ -39,7 +39,8 @@ math_Householder::math_Householder(const math_Matrix& A,
|
|||||||
const math_Vector& B,
|
const math_Vector& B,
|
||||||
const Standard_Real EPS)
|
const Standard_Real EPS)
|
||||||
: Sol(1, A.ColNumber(), 1, 1),
|
: Sol(1, A.ColNumber(), 1, 1),
|
||||||
Q(1, A.RowNumber(), 1, A.ColNumber())
|
Q(1, A.RowNumber(), 1, A.ColNumber()),
|
||||||
|
Done(Standard_False)
|
||||||
{
|
{
|
||||||
|
|
||||||
mylowerArow = A.LowerRow();
|
mylowerArow = A.LowerRow();
|
||||||
@ -55,7 +56,8 @@ math_Householder::math_Householder(const math_Matrix& A,
|
|||||||
const math_Matrix& B,
|
const math_Matrix& B,
|
||||||
const Standard_Real EPS)
|
const Standard_Real EPS)
|
||||||
: Sol(1, A.ColNumber(), 1, B.ColNumber()),
|
: Sol(1, A.ColNumber(), 1, B.ColNumber()),
|
||||||
Q(1, A.RowNumber(), A.LowerCol(), A.UpperCol())
|
Q(1, A.RowNumber(), A.LowerCol(), A.UpperCol()),
|
||||||
|
Done(Standard_False)
|
||||||
{
|
{
|
||||||
|
|
||||||
mylowerArow = A.LowerRow();
|
mylowerArow = A.LowerRow();
|
||||||
@ -73,7 +75,8 @@ math_Householder::math_Householder(const math_Matrix& A,
|
|||||||
const Standard_Integer upperAcol,
|
const Standard_Integer upperAcol,
|
||||||
const Standard_Real EPS)
|
const Standard_Real EPS)
|
||||||
: Sol(1, upperAcol - lowerAcol + 1, 1, B.ColNumber()),
|
: Sol(1, upperAcol - lowerAcol + 1, 1, B.ColNumber()),
|
||||||
Q(1, upperArow - lowerArow + 1, 1, upperAcol - lowerAcol + 1)
|
Q(1, upperArow - lowerArow + 1, 1, upperAcol - lowerAcol + 1),
|
||||||
|
Done(Standard_False)
|
||||||
{
|
{
|
||||||
mylowerArow = lowerArow;
|
mylowerArow = lowerArow;
|
||||||
myupperArow = upperArow;
|
myupperArow = upperArow;
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
#include <math_Recipes.hxx>
|
#include <math_Recipes.hxx>
|
||||||
|
|
||||||
math_Jacobi::math_Jacobi(const math_Matrix& A)
|
math_Jacobi::math_Jacobi(const math_Matrix& A)
|
||||||
: AA(1, A.RowNumber(), 1, A.RowNumber()),
|
: Done(Standard_False),
|
||||||
|
AA(1, A.RowNumber(), 1, A.RowNumber()),
|
||||||
|
NbRotations(0),
|
||||||
EigenValues(1, A.RowNumber()),
|
EigenValues(1, A.RowNumber()),
|
||||||
EigenVectors(1, A.RowNumber(), 1, A.RowNumber())
|
EigenVectors(1, A.RowNumber(), 1, A.RowNumber())
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,7 @@ math_KronrodSingleIntegration::math_KronrodSingleIntegration()
|
|||||||
: myIsDone(Standard_False),
|
: myIsDone(Standard_False),
|
||||||
myValue(0.),
|
myValue(0.),
|
||||||
myErrorReached(0.),
|
myErrorReached(0.),
|
||||||
|
myAbsolutError(0.),
|
||||||
myNbPntsReached(0),
|
myNbPntsReached(0),
|
||||||
myNbIterReached(0)
|
myNbIterReached(0)
|
||||||
{
|
{
|
||||||
@ -43,7 +44,9 @@ math_KronrodSingleIntegration::math_KronrodSingleIntegration(math_Function&
|
|||||||
: myIsDone(Standard_False),
|
: myIsDone(Standard_False),
|
||||||
myValue(0.),
|
myValue(0.),
|
||||||
myErrorReached(0.),
|
myErrorReached(0.),
|
||||||
myNbPntsReached(0)
|
myAbsolutError(0.),
|
||||||
|
myNbPntsReached(0),
|
||||||
|
myNbIterReached(0)
|
||||||
{
|
{
|
||||||
Perform(theFunction, theLower, theUpper, theNbPnts);
|
Perform(theFunction, theLower, theUpper, theNbPnts);
|
||||||
}
|
}
|
||||||
@ -62,7 +65,9 @@ math_KronrodSingleIntegration::math_KronrodSingleIntegration(math_Function&
|
|||||||
: myIsDone(Standard_False),
|
: myIsDone(Standard_False),
|
||||||
myValue(0.),
|
myValue(0.),
|
||||||
myErrorReached(0.),
|
myErrorReached(0.),
|
||||||
myNbPntsReached(0)
|
myAbsolutError(0.),
|
||||||
|
myNbPntsReached(0),
|
||||||
|
myNbIterReached(0)
|
||||||
{
|
{
|
||||||
Perform(theFunction, theLower, theUpper, theNbPnts, theTolerance, theMaxNbIter);
|
Perform(theFunction, theLower, theUpper, theNbPnts, theTolerance, theMaxNbIter);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,9 @@ math_Uzawa::math_Uzawa(const math_Matrix& Cont,
|
|||||||
Erruza(1, Cont.ColNumber()),
|
Erruza(1, Cont.ColNumber()),
|
||||||
Errinit(1, Cont.ColNumber()),
|
Errinit(1, Cont.ColNumber()),
|
||||||
Vardua(1, Cont.RowNumber()),
|
Vardua(1, Cont.RowNumber()),
|
||||||
CTCinv(1, Cont.RowNumber(), 1, Cont.RowNumber())
|
CTCinv(1, Cont.RowNumber(), 1, Cont.RowNumber()),
|
||||||
|
NbIter(0),
|
||||||
|
Done(Standard_False)
|
||||||
{
|
{
|
||||||
|
|
||||||
Perform(Cont, Secont, StartingPoint, Cont.RowNumber(), 0, EpsLix, EpsLic, NbIterations);
|
Perform(Cont, Secont, StartingPoint, Cont.RowNumber(), 0, EpsLix, EpsLic, NbIterations);
|
||||||
@ -64,7 +66,9 @@ math_Uzawa::math_Uzawa(const math_Matrix& Cont,
|
|||||||
Erruza(1, Cont.ColNumber()),
|
Erruza(1, Cont.ColNumber()),
|
||||||
Errinit(1, Cont.ColNumber()),
|
Errinit(1, Cont.ColNumber()),
|
||||||
Vardua(1, Cont.RowNumber()),
|
Vardua(1, Cont.RowNumber()),
|
||||||
CTCinv(1, Cont.RowNumber(), 1, Cont.RowNumber())
|
CTCinv(1, Cont.RowNumber(), 1, Cont.RowNumber()),
|
||||||
|
NbIter(0),
|
||||||
|
Done(Standard_False)
|
||||||
{
|
{
|
||||||
|
|
||||||
Perform(Cont, Secont, StartingPoint, Nce, Nci, EpsLix, EpsLic, NbIterations);
|
Perform(Cont, Secont, StartingPoint, Nce, Nci, EpsLix, EpsLic, NbIterations);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user