Home | History | Annotate | Download | only in src

Lines Matching refs:nsteps

832     int nsteps;
843 nsteps = 0;
848 steps[nsteps++] = std::make_pair(cost(y, x-1) + costH(y, x-1), 1);
850 steps[nsteps++] = std::make_pair(cost(y-1, x-1) + costH(y-1, x-1) + costV(y-1, x), 2);
852 steps[nsteps++] = std::make_pair(cost(y+1, x-1) + costH(y+1, x-1) + costV(y, x), 3);
855 if (nsteps)
857 std::pair<float, int> opt = *min_element(steps, steps + nsteps);
873 nsteps = 0;
878 steps[nsteps++] = std::make_pair(cost(y-1, x) + costV(y-1, x), 1);
880 steps[nsteps++] = std::make_pair(cost(y-1, x-1) + costV(y-1, x-1) + costH(y, x-1), 2);
882 steps[nsteps++] = std::make_pair(cost(y-1, x+1) + costV(y-1, x+1) + costH(y, x), 3);
885 if (nsteps)
887 std::pair<float, int> opt = *min_element(steps, steps + nsteps);