From: <mk...@us...> - 2003-09-18 00:32:09
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Source In directory sc8-pr-cvs1:/tmp/cvs-serv25328/Source Modified Files: Tag: b0_4_0 Date.cpp LUT.cpp Log Message: Index: Date.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Date.cpp,v retrieving revision 1.7.2.4 retrieving revision 1.7.2.5 diff -C2 -d -r1.7.2.4 -r1.7.2.5 *** Date.cpp 18 Sep 2003 00:27:38 -0000 1.7.2.4 --- Date.cpp 18 Sep 2003 00:32:06 -0000 1.7.2.5 *************** *** 475,479 **** setJulian(julian_); } else { ! time_ = getTime(); julian_ = getJulian(); archive(time_); --- 475,479 ---- setJulian(julian_); } else { ! time_ = static_cast<float>(getTime()); julian_ = getJulian(); archive(time_); Index: LUT.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/LUT.cpp,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** LUT.cpp 22 Aug 2003 00:21:45 -0000 1.5.2.1 --- LUT.cpp 18 Sep 2003 00:32:06 -0000 1.5.2.2 *************** *** 227,231 **** typename DataVector::iterator c1 = m_Data->begin(); typename DataVector::iterator c0 = c1++; ! X s = 1.0 / (c1->first - c0->first); for (i = 0; i < n; ++i) { X x = x0 + i * dx; --- 227,231 ---- typename DataVector::iterator c1 = m_Data->begin(); typename DataVector::iterator c0 = c1++; ! X s = static_cast<X>(1.0) / (c1->first - c0->first); for (i = 0; i < n; ++i) { X x = x0 + i * dx; *************** *** 235,239 **** throwBreakpointOrder(); } ! s = 1.0 / (c1->first - c0->first); } X f = (x - c0->first) * s; --- 235,239 ---- throwBreakpointOrder(); } ! s = static_cast<X>(1.0) / (c1->first - c0->first); } X f = (x - c0->first) * s; *************** *** 408,412 **** X f; find(x, i, f); ! X value = table(i).getValue(v.rest()) * (1.0-f) + table(i+1).getValue(v.rest()) * f; __LUTLOG("getValue[N]: " << x << " " << i << " " << f << " = " << value); return value; --- 408,412 ---- X f; find(x, i, f); ! X value = table(i).getValue(v.rest()) * (static_cast<X>(1.0)-f) + table(i+1).getValue(v.rest()) * f; __LUTLOG("getValue[N]: " << x << " " << i << " " << f << " = " << value); return value; *************** *** 515,519 **** typename DataVector::iterator c1 = m_Data->begin(); typename DataVector::iterator c0 = c1++; ! X s = 1.0 / (c1->first - c0->first); for (int i = 0; i < n; ++i) { X x = x0 + i * dx; --- 515,519 ---- typename DataVector::iterator c1 = m_Data->begin(); typename DataVector::iterator c0 = c1++; ! X s = static_cast<X>(1.0) / (c1->first - c0->first); for (int i = 0; i < n; ++i) { X x = x0 + i * dx; *************** *** 523,530 **** throwBreakpointOrder(); } ! s = 1.0 / (c1->first - c0->first); } X f = (x - c0->first) * s; ! (*_table)[i] = (1.0 - f) * c0->second + f * c1->second; } } --- 523,530 ---- throwBreakpointOrder(); } ! s = static_cast<X>(1.0) / (c1->first - c0->first); } X f = (x - c0->first) * s; ! (*_table)[i] = (static_cast<X>(1.0) - f) * c0->second + f * c1->second; } } *************** *** 548,552 **** X yb = data(1).second; X h = xb - xa; ! X s = 1.0 / h; X d2s = h * h * 0.166666667; for (int i = 0; i < n; ++i) { --- 548,552 ---- X yb = data(1).second; X h = xb - xa; ! X s = static_cast<X>(1.0) / h; X d2s = h * h * 0.166666667; for (int i = 0; i < n; ++i) { *************** *** 559,571 **** yb = data(index).second; h = xb - xa; ! s = 1.0 / h; d2s = h * h * 0.166666667; } X f = (x - xa) * s; ! X g = 1.0 - f; (*_table)[i] = g * ya + f * yb + ! ((g*g-1.0)*g*uv[index-1] + ! (f*f-1.0)*f*uv[index]) * d2s; } } --- 559,571 ---- yb = data(index).second; h = xb - xa; ! s = static_cast<X>(1.0) / h; d2s = h * h * 0.166666667; } X f = (x - xa) * s; ! X g = static_cast<X>(1.0) - f; (*_table)[i] = g * ya + f * yb + ! ((g*g-static_cast<X>(1.0))*g*uv[index-1] + ! (f*f-static_cast<X>(1.0))*f*uv[index]) * d2s; } } *************** *** 604,609 **** out.data(i).second = y * y0.data(i).second + x * y1.data(i).second + ! ((y * y - 1.0) * y * c0.curve(i) + ! (x * x - 1.0) * x * c1.curve(i)) * d2s; } } --- 604,609 ---- out.data(i).second = y * y0.data(i).second + x * y1.data(i).second + ! ((y * y - static_cast<X>(1.0)) * y * c0.curve(i) + ! (x * x - static_cast<X>(1.0)) * x * c1.curve(i)) * d2s; } } *************** *** 668,672 **** X f; find(x, i, f); ! X value = table(i) * (1.0-f) + table(i+1) * f; __LUTLOG("getValue[1]: " << x << " " << i << " " << f << " = " << value); return value; --- 668,672 ---- X f; find(x, i, f); ! X value = table(i) * (static_cast<X>(1.0)-f) + table(i+1) * f; __LUTLOG("getValue[1]: " << x << " " << i << " " << f << " = " << value); return value; |