Changeset 271d71c in tol
- Timestamp:
- Mar 20, 2012, 5:57:33 PM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- bb29eda
- Parents:
- 83cb210
- Location:
- tol/btol/timeset_type
- Files:
-
- 2 edited
-
tms.cpp (modified) (1 diff)
-
tmsgrav.cpp (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/timeset_type/tms.cpp
r83cb210 r271d71c 279 279 if(!S) 280 280 { 281 //Std(BText("\nTRACE GetHashBetween type=")+typeid(*this).name()+"\n");282 if(typeid(*this).name()=="class BTmsRangeSuc")283 printf("");284 281 NCThis->CalcHashBetween(hash, first, last); 285 282 NCThis->PutCache(hash, bc, ec); -
tol/btol/timeset_type/tmsgrav.cpp
r83cb210 r271d71c 695 695 int iter, n, N = (int)MaxIter().Value(), M = (int)OutOfRange().Value(); 696 696 BDate curLimit = CurrentCalcLastDate(); 697 if(curLimit.IsTheEnd() || !curLimit.HasValue()) 698 { curLimit = BDate::DefaultLast(); } 697 if(!curLimit.HasValue()) { curLimit = BDate::DefaultLast(); } 699 698 double defaultRange = BDate::DefaultLast() - BDate::DefaultFirst(); 700 699 BDate cutLimit = curLimit+((1+defaultRange)*cutRangeFactor_.Value()); … … 702 701 { 703 702 dte = EnsureNotAbortedSuccessor(dte); 704 EnsureLimitsSuccessor(dte); 703 if(dte.IsUnknown()||dte.IsTheEnd()) { return(dte); } 704 if(dte>=Sup()) { return(BDate::End()); } 705 705 706 if(curLimit<dte) 706 707 { … … 746 747 int iter, n, N = (int)MaxIter().Value(), M = (int)OutOfRange().Value(); 747 748 BDate curLimit = CurrentCalcFirstDate(); 748 if(curLimit.IsTheBegin() || !curLimit.HasValue()) 749 { curLimit = BDate::DefaultFirst(); } 749 if(curLimit==BDate::Begin()) { curLimit = BDate::DefaultFirst(); } 750 750 double defaultRange = BDate::DefaultLast() - BDate::DefaultFirst(); 751 751 BDate cutLimit = curLimit-((1+defaultRange)*cutRangeFactor_.Value()); 752 BDate old = dte;753 752 for(n=iter=0; iter<N; iter++) 754 753 { 755 754 dte = EnsureNotAbortedPredecessor(dte); 756 EnsureLimitsPredecessor(dte); 755 if(dte.IsUnknown()||dte.IsTheBegin()) { return(dte); } 756 if(dte<=Inf()) { return(BDate::Begin()); } 757 757 if(curLimit>dte) 758 758 { … … 778 778 else if( ac && bc) { BDate d = Maximum(aPred,bPred); AbortSaveInfo(dte_, d, -1); return(d); } 779 779 else { dte = Minimum(aPred,bPred); } 780 if(dte==old)781 {782 return(BDate::Begin());783 }784 old = dte;785 780 } 786 781 AbortMessageMaxIter("BTmsIntersection::Predecessor",dte_,dte,-1); … … 852 847 int iter, n, N = (int)MaxIter().Value(), M = (int)OutOfRange().Value(); 853 848 BDate curLimit = CurrentCalcLastDate(); 854 if(curLimit.IsTheEnd() || !curLimit.HasValue()) 855 { curLimit = BDate::DefaultLast(); } 849 if(!curLimit.HasValue()) { curLimit = BDate::DefaultLast(); } 856 850 double defaultRange = BDate::DefaultLast() - BDate::DefaultFirst(); 857 851 BDate cutLimit = curLimit+((1+defaultRange)*cutRangeFactor_.Value()); … … 861 855 { 862 856 dte = EnsureNotAbortedSuccessor(dte); 863 EnsureLimitsSuccessor(dte); 857 if(dte.IsUnknown()||dte.IsTheEnd()) { return(dte); } 858 if(dte>=Sup()) { return(BDate::End()); } 864 859 if(curLimit<dte) 865 860 { … … 906 901 int iter, n, N = (int)MaxIter().Value(), M = (int)OutOfRange().Value(); 907 902 BDate curLimit = CurrentCalcFirstDate(); 908 if(curLimit.IsTheBegin() || !curLimit.HasValue()) 909 { curLimit = BDate::DefaultFirst(); } 903 if(curLimit==BDate::Begin()) { curLimit = BDate::DefaultFirst(); } 910 904 double defaultRange = BDate::DefaultLast() - BDate::DefaultFirst(); 911 905 BDate cutLimit = curLimit-((1+defaultRange)*cutRangeFactor_.Value()); … … 915 909 { 916 910 dte = EnsureNotAbortedPredecessor(dte); 917 EnsureLimitsPredecessor(dte); 911 if(dte.IsUnknown()||dte.IsTheBegin()) { return(dte); } 912 if(dte<=Inf()) { return(BDate::Begin()); } 918 913 if(curLimit>dte) 919 914 { … … 971 966 { 972 967 BDate d, inf; 973 for(BInt n=1; ( !inf.IsTheBegin()) && (n<=NumArgs()); n++)968 for(BInt n=1; (inf!=BDate::Begin()) && (n<=NumArgs()); n++) 974 969 { 975 970 d = Tms(Arg(n))->Inf(); … … 984 979 { 985 980 BDate d, sup; 986 for(BInt n=1; ( !sup.IsTheEnd()) && (n<=NumArgs()); n++)981 for(BInt n=1; (sup!=BDate::End()) && (n<=NumArgs()); n++) 987 982 { 988 983 d = Tms(Arg(n))->Sup(); … … 1195 1190 BArray<BDate> D(NumArgs()); 1196 1191 BDate curLimit = CurrentCalcLastDate(); 1197 if(curLimit.IsTheEnd() || !curLimit.HasValue()) 1198 { curLimit = BDate::DefaultLast(); } 1192 if(!curLimit.HasValue()) { curLimit = BDate::DefaultLast(); } 1199 1193 double defaultRange = BDate::DefaultLast() - BDate::DefaultFirst(); 1200 1194 BDate cutLimit = curLimit+((1+defaultRange)*cutRangeFactor_.Value()); … … 1202 1196 { 1203 1197 dte = EnsureNotAbortedSuccessor(dte); 1204 EnsureLimitsSuccessor(dte); 1198 if(dte.IsUnknown()||dte.IsTheEnd()) { return(dte); } 1199 if(dte>=Sup()) { return(BDate::End()); } 1205 1200 if(curLimit<dte) 1206 1201 { … … 1260 1255 BArray<BDate> D(NumArgs()); 1261 1256 BDate curLimit = CurrentCalcFirstDate(); 1262 if(curLimit.IsTheBegin() || !curLimit.HasValue()) 1263 { curLimit = BDate::DefaultFirst(); } 1257 if(curLimit==BDate::Begin()) { curLimit = BDate::DefaultFirst(); } 1264 1258 double defaultRange = BDate::DefaultLast() - BDate::DefaultFirst(); 1265 1259 BDate cutLimit = curLimit+((1+defaultRange)*cutRangeFactor_.Value()); … … 1267 1261 { 1268 1262 dte = EnsureNotAbortedPredecessor(dte); 1269 EnsureLimitsPredecessor(dte); 1263 if(dte.IsUnknown()||dte.IsTheBegin()) { return(dte); } 1264 if(dte<=Inf()) { return(BDate::Begin()); } 1270 1265 if(curLimit>dte) 1271 1266 { … … 2106 2101 BDate d, inf, cInf = center_->Inf(), uInf = units_->Inf(); 2107 2102 if(cInf.IsTheBegin()) { return(uInf); } 2108 for(int k = from_; ( !inf.IsTheBegin()) && (k<=until_); k++)2103 for(int k = from_; (inf!=BDate::Begin()) && (k<=until_); k++) 2109 2104 { 2110 2105 if(!k) { d = icu_->Inf(); } … … 2125 2120 BDate d, sup, cSup = center_->Sup(), uSup = units_->Sup(); 2126 2121 if(cSup.IsTheEnd()) { return(uSup); } 2127 for(int k = from_; ( !sup.IsTheEnd()) && (k<=until_); k++)2122 for(int k = from_; (sup!=BDate::End()) && (k<=until_); k++) 2128 2123 { 2129 2124 if(!k) { d = icu_->Sup(); } … … 2512 2507 int iter, n, N = (int)MaxIter().Value(), M = (int)OutOfRange().Value(); 2513 2508 BDate curLimit = CurrentCalcLastDate(); 2514 if(curLimit.IsTheEnd() || !curLimit.HasValue()) 2515 { curLimit = BDate::DefaultLast(); } 2509 if(!curLimit.HasValue()) { curLimit = BDate::DefaultLast(); } 2516 2510 //Std(Out()+"\nBTmsOfSerie::Successor of "+ser->Identify()+" "+dte); 2517 2511 for(n=iter=0; iter<N; iter++) 2518 2512 { 2519 2513 dte = EnsureNotAbortedSuccessor(dte); 2520 EnsureLimitsSuccessor(dte); 2514 if(dte.IsUnknown()||dte.IsTheEnd()) { return(dte); } 2515 if(dte>=Sup()) { return(BDate::End()); } 2516 2521 2517 if(curLimit<dte) 2522 2518 { … … 2553 2549 int iter, n, N = (int)MaxIter().Value(), M = (int)OutOfRange().Value(); 2554 2550 BDate curLimit = CurrentCalcFirstDate(); 2555 if(curLimit.IsTheBegin() || !curLimit.HasValue()) 2556 { curLimit = BDate::DefaultFirst(); } 2551 if(curLimit==BDate::Begin()) { curLimit = BDate::DefaultFirst(); } 2557 2552 for(n=iter=0; iter<N; iter++) 2558 2553 { 2559 2554 dte = EnsureNotAbortedPredecessor(dte); 2560 EnsureLimitsPredecessor(dte); 2555 if(dte.IsUnknown()||dte.IsTheBegin()) { return(dte); } 2556 if(dte<=Inf()) { return(BDate::Begin()); } 2561 2557 if(curLimit>dte) 2562 2558 {
Note: See TracChangeset
for help on using the changeset viewer.
