mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine". The following entities from std namespace are now used with std:: explicitly specified (from Standard_Stream.hxx): std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream, std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr, std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision, std::hex,std::dec.
This commit is contained in:
@@ -159,8 +159,8 @@ void math_BissecNewton::Dump(Standard_OStream& o) const {
|
||||
o << "math_BissecNewton ";
|
||||
if(Done) {
|
||||
o << " Status = Done \n";
|
||||
o << " The Root is: " << x << endl;
|
||||
o << " The value at this Root is: " << f << endl;
|
||||
o << " The Root is: " << x << std::endl;
|
||||
o << " The value at this Root is: " << f << std::endl;
|
||||
}
|
||||
else {
|
||||
o << " Status = not Done \n";
|
||||
|
@@ -240,10 +240,10 @@ Standard_Boolean math_BracketMinimum::LimitAndMayBeSwap
|
||||
o << "math_BracketMinimum ";
|
||||
if(Done) {
|
||||
o << " Status = Done \n";
|
||||
o << " The bracketed triplet is: " << endl;
|
||||
o << Ax << ", " << Bx << ", " << Cx << endl;
|
||||
o << " The corresponding function values are: "<< endl;
|
||||
o << FAx << ", " << FBx << ", " << FCx << endl;
|
||||
o << " The bracketed triplet is: " << std::endl;
|
||||
o << Ax << ", " << Bx << ", " << Cx << std::endl;
|
||||
o << " The corresponding function values are: "<< std::endl;
|
||||
o << FAx << ", " << FBx << ", " << FCx << std::endl;
|
||||
}
|
||||
else {
|
||||
o << " Status = not Done \n";
|
||||
|
@@ -107,9 +107,9 @@ math_BracketedRoot::math_BracketedRoot (math_Function& F,
|
||||
o << "math_BracketedRoot ";
|
||||
if(Done) {
|
||||
o << " Status = Done \n";
|
||||
o << " Number of iterations = " << NbIter << endl;
|
||||
o << " The Root is: " << TheRoot << endl;
|
||||
o << " The value at the root is: " << TheError << endl;
|
||||
o << " Number of iterations = " << NbIter << std::endl;
|
||||
o << " The Root is: " << TheRoot << std::endl;
|
||||
o << " The value at the root is: " << TheError << std::endl;
|
||||
}
|
||||
else {
|
||||
o << " Status = not Done \n";
|
||||
|
@@ -60,14 +60,14 @@ const Standard_Real ZERO = 1.0e-30;
|
||||
Standard_Real IniVal = Value(N, Poly, IniSol);
|
||||
Standard_Integer Index;
|
||||
|
||||
// cout << "Improve\n";
|
||||
// std::cout << "Improve\n";
|
||||
for(Index = 1; Index < 10; Index++) {
|
||||
Values(N, Poly, Sol, Val, Der);
|
||||
if(Abs(Der) <= ZERO) break;
|
||||
Delta = - Val / Der;
|
||||
if(Abs(Delta) <= EPSILON * Abs(Sol)) break;
|
||||
Sol = Sol + Delta;
|
||||
// cout << " Iter = " << Index << " Delta = " << Delta
|
||||
// std::cout << " Iter = " << Index << " Delta = " << Delta
|
||||
// << " Val = " << Val << " Der = " << Der << "\n";
|
||||
}
|
||||
if(Abs(Val) <= Abs(IniVal)) {
|
||||
|
@@ -223,8 +223,8 @@ void math_FunctionAllRoots::Dump(Standard_OStream& o) const {
|
||||
o<< "math_FunctionAllRoots ";
|
||||
if(done) {
|
||||
o<< " Status = Done \n";
|
||||
o << " Number of null intervals = " << pdeb.Length() << endl;
|
||||
o << " Number of points where the function is null: " << piso.Length() << endl;
|
||||
o << " Number of null intervals = " << pdeb.Length() << std::endl;
|
||||
o << " Number of points where the function is null: " << piso.Length() << std::endl;
|
||||
}
|
||||
else {
|
||||
o<< " Status = not Done \n";
|
||||
|
@@ -116,9 +116,9 @@ class math_MyFunctionSetWithDerivatives : public math_FunctionSetWithDerivatives
|
||||
o<< "math_FunctionRoot ";
|
||||
if(Done) {
|
||||
o<< " Status = Done \n";
|
||||
o << " Number of iterations = " << NbIter << endl;
|
||||
o << " The Root is: " << TheRoot << endl;
|
||||
o << "The value at the root is: " << TheError << endl;
|
||||
o << " Number of iterations = " << NbIter << std::endl;
|
||||
o << " The Root is: " << TheRoot << std::endl;
|
||||
o << "The value at the root is: " << TheError << std::endl;
|
||||
}
|
||||
else {
|
||||
o<< " Status = not Done \n";
|
||||
|
@@ -65,8 +65,8 @@ static void AppendRoot(TColStd_SequenceOfReal& Sol,
|
||||
Standard_Real t;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (myDebug) {
|
||||
cout << " Ajout de la solution numero : " << n+1 << endl;
|
||||
cout << " Valeur de la racine :" << X << endl;
|
||||
std::cout << " Ajout de la solution numero : " << n+1 << std::endl;
|
||||
std::cout << " Valeur de la racine :" << X << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -115,9 +115,9 @@ static void Solve(math_FunctionWithDerivative& F,
|
||||
TColStd_SequenceOfInteger& NbStateSol) {
|
||||
#ifdef OCCT_DEBUG
|
||||
if (myDebug) {
|
||||
cout <<"--> Resolution :" << ++nbsolve << endl;
|
||||
cout <<" x1 =" << x1 << " y1 =" << y1 << endl;
|
||||
cout <<" x2 =" << x2 << " y2 =" << y2 << endl;
|
||||
std::cout <<"--> Resolution :" << ++nbsolve << std::endl;
|
||||
std::cout <<" x1 =" << x1 << " y1 =" << y1 << std::endl;
|
||||
std::cout <<" x2 =" << x2 << " y2 =" << y2 << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -206,7 +206,7 @@ static void Solve(math_FunctionWithDerivative& F,
|
||||
fb-=K;
|
||||
}
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" Non Convergence dans math_FunctionRoots.cxx "<<endl;
|
||||
std::cout<<" Non Convergence dans math_FunctionRoots.cxx "<<std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
if (myDebug) {
|
||||
cout << "---- Debut de math_FunctionRoots ----" << endl;
|
||||
std::cout << "---- Debut de math_FunctionRoots ----" << std::endl;
|
||||
nbsolve = 0;
|
||||
}
|
||||
#endif
|
||||
@@ -627,7 +627,7 @@ math_FunctionRoots::math_FunctionRoots(math_FunctionWithDerivative& F,
|
||||
Standard_Real NEpsX = 0.0000000001 * DeltaU;
|
||||
if(EpsX < NEpsX) {
|
||||
EpsX = NEpsX;
|
||||
//-- cout<<" \n EpsX Init = "<<_EpsX<<" devient : (deltaU : "<<DeltaU<<" ) EpsX = "<<EpsX<<endl;
|
||||
//-- std::cout<<" \n EpsX Init = "<<_EpsX<<" devient : (deltaU : "<<DeltaU<<" ) EpsX = "<<EpsX<<std::endl;
|
||||
}
|
||||
//--
|
||||
Null2 = EpsNull*EpsNull;
|
||||
@@ -1083,9 +1083,9 @@ void math_FunctionRoots::Dump(Standard_OStream& o) const
|
||||
o << "math_FunctionRoots ";
|
||||
if(Done) {
|
||||
o << " Status = Done \n";
|
||||
o << " Number of solutions = " << Sol.Length() << endl;
|
||||
o << " Number of solutions = " << Sol.Length() << std::endl;
|
||||
for (Standard_Integer i = 1; i <= Sol.Length(); i++) {
|
||||
o << " Solution Number " << i << "= " << Sol.Value(i) << endl;
|
||||
o << " Solution Number " << i << "= " << Sol.Value(i) << std::endl;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@@ -63,7 +63,7 @@
|
||||
//==========================================================
|
||||
//static Standard_Boolean mydebug = Standard_True;
|
||||
//#undef FSR_DEBUG
|
||||
//#define FSR_DEBUG(arg) {if (mydebug) { cout << arg << endl; }}
|
||||
//#define FSR_DEBUG(arg) {if (mydebug) { std::cout << arg << std::endl; }}
|
||||
//===========================================================
|
||||
|
||||
class MyDirFunction : public math_Function
|
||||
@@ -764,7 +764,7 @@ void math_FunctionSetRoot::Perform(math_FunctionSetWithDerivatives& F,
|
||||
// de faire une seconde iteration...
|
||||
Save(0) = Max (F2, EpsSqrt);
|
||||
Standard_Real aTol_Func = Epsilon(F2);
|
||||
FSR_DEBUG("=== Mode Debug de Function Set Root" << endl);
|
||||
FSR_DEBUG("=== Mode Debug de Function Set Root" << std::endl);
|
||||
FSR_DEBUG(" F2 Initial = " << F2);
|
||||
|
||||
if ((F2 <= Eps) || (Gnr1 <= Eps2)) {
|
||||
|
@@ -108,7 +108,7 @@ void math_Gauss::Dump(Standard_OStream& o) const {
|
||||
o << "math_Gauss ";
|
||||
if(Done) {
|
||||
o<< " Status = Done \n";
|
||||
o << " Determinant of A = " << D << endl;
|
||||
o << " Determinant of A = " << D << std::endl;
|
||||
}
|
||||
else {
|
||||
o << " Status = not Done \n";
|
||||
|
@@ -221,7 +221,7 @@ void math_GlobOptMin::Perform(const Standard_Boolean isFindSingleSolution)
|
||||
if (minLength < Precision::PConfusion())
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "math_GlobOptMin::Perform(): Degenerated parameters space" << endl;
|
||||
std::cout << "math_GlobOptMin::Perform(): Degenerated parameters space" << std::endl;
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
@@ -48,7 +48,7 @@ void math_Jacobi::Dump(Standard_OStream& o) const {
|
||||
o <<"math_Jacobi ";
|
||||
if (Done) {
|
||||
o << " Status = Done \n";
|
||||
o << " The eigenvalues vector is: " << EigenValues << endl;
|
||||
o << " The eigenvalues vector is: " << EigenValues << std::endl;
|
||||
}
|
||||
else {
|
||||
o << "Status = not Done \n";
|
||||
|
@@ -258,13 +258,13 @@ void math_NewtonMinimum::Perform(math_MultipleVarFunctionWithHessian& F,
|
||||
void math_NewtonMinimum::Dump(Standard_OStream& o) const
|
||||
{
|
||||
o<< "math_Newton Optimisation: ";
|
||||
o << " Done =" << Done << endl;
|
||||
o << " Status = " << (Standard_Integer)TheStatus << endl;
|
||||
o << " Location Vector = " << Location() << endl;
|
||||
o << " Minimum value = "<< Minimum()<< endl;
|
||||
o << " Previous value = "<< PreviousMinimum << endl;
|
||||
o << " Number of iterations = " <<NbIterations() << endl;
|
||||
o << " Convexity = " << Convex << endl;
|
||||
o << " Eigen Value = " << MinEigenValue << endl;
|
||||
o << " Done =" << Done << std::endl;
|
||||
o << " Status = " << (Standard_Integer)TheStatus << std::endl;
|
||||
o << " Location Vector = " << Location() << std::endl;
|
||||
o << " Minimum value = "<< Minimum()<< std::endl;
|
||||
o << " Previous value = "<< PreviousMinimum << std::endl;
|
||||
o << " Number of iterations = " <<NbIterations() << std::endl;
|
||||
o << " Convexity = " << Convex << std::endl;
|
||||
o << " Eigen Value = " << MinEigenValue << std::endl;
|
||||
}
|
||||
|
||||
|
@@ -372,14 +372,14 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
|
||||
//-- est ce une racine double ou une erreur numerique ?
|
||||
Standard_Real qw=Zer(i+1);
|
||||
Standard_Real va=ko(4)+qw*(2.0*ko(3)+qw*(3.0*ko(2)+qw*(4.0*ko(1))));
|
||||
//-- cout<<" Val Double ("<<qw<<")=("<<va<<")"<<endl;
|
||||
//-- std::cout<<" Val Double ("<<qw<<")=("<<va<<")"<<std::endl;
|
||||
if(Abs(va)>Eps) {
|
||||
bko=Standard_True;
|
||||
nbko++;
|
||||
#ifdef OCCT_DEBUG
|
||||
//if(nbko==1) {
|
||||
// cout<<"Pb ds math_TrigonometricFunctionRoots CC="
|
||||
// <<A<<" CS="<<B<<" C="<<C<<" S="<<D<<" Cte="<<E<<endl;
|
||||
// std::cout<<"Pb ds math_TrigonometricFunctionRoots CC="
|
||||
// <<A<<" CS="<<B<<" C="<<C<<" S="<<D<<" Cte="<<E<<std::endl;
|
||||
//}
|
||||
#endif
|
||||
break;
|
||||
@@ -428,7 +428,7 @@ void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,
|
||||
//-- lbr le 7 mars 97 (newton converge tres tres loin de la solution initilale)
|
||||
Standard_Real DeltaNewton = TetaNewton-Teta;
|
||||
if((DeltaNewton > SupmInfs100) || (DeltaNewton < -SupmInfs100)) {
|
||||
//-- cout<<"\n Newton X0="<<Teta<<" -> "<<TetaNewton<<endl;
|
||||
//-- std::cout<<"\n Newton X0="<<Teta<<" -> "<<TetaNewton<<std::endl;
|
||||
}
|
||||
else {
|
||||
Teta=TetaNewton;
|
||||
|
@@ -203,11 +203,11 @@ void math_Uzawa::Perform(const math_Matrix& Cont, const math_Vector& Secont,
|
||||
if (NbIter > 1) {
|
||||
if (Xmax <= EpsLix) {
|
||||
if (ErrMax <= EpsLic) {
|
||||
// cout <<"Convergence atteinte dans Uzawa"<<endl;
|
||||
// std::cout <<"Convergence atteinte dans Uzawa"<<std::endl;
|
||||
Done = Standard_True;
|
||||
}
|
||||
else {
|
||||
// cout <<"convergence non atteinte pour le probleme dual"<<endl;
|
||||
// std::cout <<"convergence non atteinte pour le probleme dual"<<std::endl;
|
||||
Done = Standard_False;
|
||||
return;
|
||||
}
|
||||
@@ -235,8 +235,8 @@ void math_Uzawa::Dump(Standard_OStream& o) const {
|
||||
o << "math_Uzawa";
|
||||
if(Done) {
|
||||
o << " Status = Done \n";
|
||||
o << " Number of iterations = " << NbIter << endl;
|
||||
o << " The solution vector is: " << Resul << endl;
|
||||
o << " Number of iterations = " << NbIter << std::endl;
|
||||
o << " The solution vector is: " << Resul << std::endl;
|
||||
}
|
||||
else {
|
||||
o << " Status = not Done \n";
|
||||
|
Reference in New Issue
Block a user