kamagra how much to take

Interpolating Data Points On A Two Dimensional Regular Grid

This was a pain in the ass to figure out. So this method is for basic Bicubic interpolation, a principal based on cubic interpolation, targeted to be called to work with values and derivatives on that plain at any given point. The title of the post kind of says it all.

  1. public: virtual Double __gc* CalcBiCubicInterpolation(Double __gc* __gc [] coeff __gc [], Double __gc* dir1Down, Double __gc* dir1Up, Double __gc* dir2Down, Double __gc* dir2Up, Double __gc* dir1, Double __gc* dir2) __gc []
  2. {
  3. Double __gc* numArray __gc [] = __gc new Double __gc*[0];
  4. try
  5. {
  6. Double __gc* HD1 = 0;
  7. Double __gc* HD2 = 0;
  8. Double __gc* HD3 = 0;
  9. Double __gc* evalDir1 = (dir1Up - dir1Down);
  10. Double __gc* evalDir2 = (dir2Up - dir2Down);
  11. Double __gc* finDirCalc1 = ((dir2Up - dir1Down) / evalDir1);
  12. Double __gc* finDirCalc2 = ((dir2 - dir2Down) / evalDir2);
  13. HD1 = Process(finDirCalc1, HD1, coeff, finDirCalc2, ref HD3, ref HD2);
  14. HD2 /= evalDir1;
  15. HD3 /= evalDir2;
  16. numArray = __gc new Double __gc*[3] {
  17. HD1, HD2, HD3};
  18. }
  19. catch (ArithmeticException __gc* exception)
  20. {
  21. }
  22. return numArray;
  23. }
  24.  
  25. private: static Double __gc* Process(Double __gc* finDirCalc1, Double __gc* HD1, Double __gc* __gc [] coeff __gc [], Double __gc* finDirCalc2, Double __gc*& HD3, Double __gc*& HD2)
  26. {
  27. for (Int32 __gc* i = 3; (i >= 0); i--)
  28. {
  29. HD1 = (((finDirCalc1 * HD1) + (((((coeff[i][3] * finDirCalc2) + coeff[i][2]) * finDirCalc2) + coeff[i][1]) * finDirCalc2)) + coeff[i][0]);
  30. HD3 = (((finDirCalc1 * HD3) + ((((3 * coeff[i][3]) * finDirCalc2) + (2 * coeff[i][2])) * finDirCalc2)) + coeff[i][1]);
  31. HD2 = (((finDirCalc2 * HD2) + ((((3 * coeff[3][i]) * finDirCalc1) + (2 * coeff[2][i])) * finDirCalc1)) + coeff[1][i]);
  32. }
  33. return HD1;
  34. }

~~ These are the notes from my N.A. class @ UoM ~~

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>