@@ -13,31 +13,31 @@ public class Solver<T> : SolverStats where T : class{
1313 public bool brfs , safe = true ;
1414 public PlanningState status { get ; private set ; }
1515 public int peak { get ; private set ; }
16- public int I { get ; private set ; }
16+ public int iteration { get ; private set ; }
1717 T initialState ;
1818 Dish < T > dish ;
1919 Goal < T > goal ;
2020 NodeSet < T > avail = null ;
2121
2222 public bool isRunning => status == S . Running ;
2323
24- public Node < T > Next ( T s , in Goal < T > goal , int iter = - 1 ) {
24+ public Node < T > Next ( T s , in Goal < T > goal , int cap = - 1 ) {
2525 if ( s == null ) throw new NullRef ( NO_INIT_ERR ) ;
2626 dish = dish ?? Dish < T > . Create ( s , safe ) ;
2727 initialState = s ;
2828 this . goal = goal ;
29- I = 0 ;
29+ iteration = 0 ;
3030 avail = new NodeSet < T > ( s , goal . h , ! brfs , maxNodes ,
3131 tolerance ) ;
32- return Iterate ( iter ) ;
32+ return Iterate ( cap ) ;
3333 }
3434
35- public Node < T > Iterate ( int iter = - 1 ) {
35+ public Node < T > Iterate ( int cap = - 1 ) {
3636 if ( initialState == null ) throw new InvOp ( NO_INIT_ERR ) ;
3737 if ( status == S . MaxIterExceeded ) return null ;
38- if ( iter == - 1 ) iter = maxIter ;
38+ if ( cap == - 1 ) cap = maxIter ;
3939 int i = 0 ;
40- while ( avail && i ++ < iter && I ++ < maxIter ) {
40+ while ( avail && i ++ < cap && iteration ++ < maxIter ) {
4141 var current = avail . Pop ( ) ;
4242 if ( goal . match ( current . state ) ) {
4343 status = S . Done ;
@@ -51,7 +51,7 @@ public Node<T> Iterate(int iter=-1){
5151 status = S . CapacityExceeded ;
5252 } else {
5353 status = avail
54- ? ( I < maxIter ? S . Running : S . MaxIterExceeded )
54+ ? ( iteration < maxIter ? S . Running : S . MaxIterExceeded )
5555 : S . Failed ;
5656 }
5757 return null ;
0 commit comments