Guest User

Untitled

a guest
Sep 9th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.27 KB | None | 0 0
  1. private class GenericTuple<T1, T2, T3>
  2. {
  3.     public T1 item1;
  4.     public T2 item2;
  5.     public T3 item3;
  6.  
  7.     public GenericTuple(T1 item1, T2 item2, T3 item3)
  8.     {
  9.         this.item1 = item1;
  10.         this.item2 = item2;
  11.         this.item3 = item3;
  12.     }
  13. }
  14.  
  15. public static List<GenericTuple<double, double, double>> DoTheMagic()
  16. {
  17.     int v1min = 0;
  18.     int v1max = 1;
  19.     double v1granularity = 0.05;
  20.     double v2granularity = 0.05;
  21.     double v3granularity = 0.05;
  22.  
  23.     List<GenericTuple<double, double, double>> returnee = new List<GenericTuple<double, double, double>>();
  24.  
  25.     for (double v1val = v1min; v1val <= v1max; v1val += v1granularity)
  26.         for (double v2val = GetV2min(v1val); v2val <= GetV2max(v1val); v2val += v2granularity)
  27.             for (double v3val = GetV3min(v1val, v2val); v3val <= GetV3max(v1val, v2val); v3val += v3granularity)
  28.                 returnee.Add(new GenericTuple<double, double, double>(v1val, v2val, v3val));
  29.  
  30.  
  31.     return returnee;
  32. }
  33.  
  34. private static int GetV2min(double v1val)
  35. {
  36.     throw new NotImplementedException();
  37. }
  38.  
  39. private static int GetV2max(double v1val)
  40. {
  41.     throw new NotImplementedException();
  42. }
  43.  
  44. private static int GetV3min(double v1val, double v2val)
  45. {
  46.     throw new NotImplementedException();
  47. }
  48.  
  49. private static int GetV3max(double v1val, double v2val)
  50. {
  51.     throw new NotImplementedException();
  52. }
Advertisement
Add Comment
Please, Sign In to add comment