Lines Matching refs:k
69 int fallFac( int n, int k ) in fallFac() argument
72 assert(n>=k); // "For factorials, n must be greater or equal k" in fallFac()
74 assert(k>=0); // "For factorials, k must be positive" in fallFac()
79 while( k-- && n ) res *= n--; in fallFac()
330 unsigned int k; in Impl_calcSafeParams_clip() local
331 for( k=0; k<poly.size(); ++k ) in Impl_calcSafeParams_clip()
333 cout << poly[k].x << " " << poly[k].y << endl; in Impl_calcSafeParams_clip()
338 for( k=0; k<convHull.size(); ++k ) in Impl_calcSafeParams_clip()
340 cout << convHull[k].x << " " << convHull[k].y << endl; in Impl_calcSafeParams_clip()
846 int i, j, k, l; // variable notation from formulas above and Sederberg article in Impl_calcSafeParams_focus() local
853 for( d=0.0, k=::std::max(0,i-n); k<=k_max && k<=i; ++k ) in Impl_calcSafeParams_focus()
855 l = i - k; // invariant: k + l = i in Impl_calcSafeParams_focus()
856 assert(k>=0 && k<=n-1); // k \in {0,...,n-1} in Impl_calcSafeParams_focus()
862 d += static_cast<double>(fallFac(n,l)*fallFac(n-1,k)*fac(i)) / in Impl_calcSafeParams_focus()
863 static_cast<double>(fac(l)*fac(k) * fallFac(2*n-1,i)) * n * in Impl_calcSafeParams_focus()
864 ( (curve[k+1].x - curve[k].x)*(curve[l].x - focus[j].x) + // dot product here in Impl_calcSafeParams_focus()
865 (curve[k+1].y - curve[k].y)*(curve[l].y - focus[j].y) ); in Impl_calcSafeParams_focus()
1283 unsigned int i,j,k; in main() local
1412 for( k=0; k<convHull.size(); ++k ) in main()
1414 cout << convHull[k].x << " " << convHull[k].y << endl; in main()
1667 unsigned int k; in main() local
1668 for( k=0; k<poly.size(); ++k ) in main()
1670 cout << poly[k].x << " " << poly[k].y << endl; in main()
1675 for( k=0; k<convHull.size(); ++k ) in main()
1677 cout << convHull[k].x << " " << convHull[k].y << endl; in main()
2037 for( k=0; k<result.size(); ++k ) in main()
2039 cout << result[k].first << endl; in main()
2043 for( k=0; k<result.size(); ++k ) in main()
2045 cout << result[k].second << endl; in main()