SDA (SDA flex)  7.2
Simulation of Diffusional Association
ArrayPrs.hpp
Go to the documentation of this file.
1 
15 #ifndef ARRAYPRS_HPP_
16 #define ARRAYPRS_HPP_
17 
18 template<typename K>
19 class ArrayPrs {
20 
22 
23 public:
24 
25  void Set_Pair_Array_Values(K*,int);
27 
28  template <class M, class H>
29  friend class DTGrid2D;
30  template <class M, class H>
31  friend class DTGrid3D;
32  friend class DTGrid3Dex;
33  template <class M, class H>
34  friend class DTGrid1D;
35  template <class M, class H>
36  friend class ArrayPtr;
37  template <class M, class H>
38  friend class ArrayMix;
39 
40 protected:
41 
42  class PairArray {
43  public:
44  K v1;
45  K v2;
46 
47  public:
49  };
50 
53 
54 };
55 
57 
60 template<typename K>
62 {
63  delete[] PArray;
64  //delete[] PArray_Copy;
65 }
66 
68 
73 template<typename K>
75  int count = 0;
76  PArray = new (std::nothrow) PairArray [I/2];
77  for (int i =0;i<I;i+=2) {
78  PArray[count].Set_Pair_Array_Elements(array[i],array[i+1]);
79  ++count;
80  }
81  PArray_Copy = PArray;
82 }
83 
85 
90 template<typename K>
92  v1 = a;
93  v2 = b;
94 }
95 
97 
102 template<typename K>
105 }
106 
107 #endif /* ARRAYPRS_HPP_ */
Definition: ArrayPrs.hpp:42
void Set_Pair_Array_Elements(K, K)
index into the icoord array (max connected component)
Definition: ArrayPrs.hpp:91
K v2
index into the icoord array (min connected component)
Definition: ArrayPrs.hpp:45
K v1
Definition: ArrayPrs.hpp:44
Definition: ArrayPrs.hpp:19
PairArray * PArray_Copy
Definition: ArrayPrs.hpp:52
friend class ArrayMix
Definition: ArrayPrs.hpp:38
~ArrayPrs()
ArrayPrs destructor.
Definition: ArrayPrs.hpp:61
PairArray * PArray
Definition: ArrayPrs.hpp:51
void Reset_Set_Pair_Array_Values(void)
Reset pointer to the array.
Definition: ArrayPrs.hpp:103
void Set_Pair_Array_Values(K *, int)
Setup the array that stores the complete icoord values.
Definition: ArrayPrs.hpp:74
Definition: ArrayPtr.hpp:20
Definition: DTGrid1D.hpp:13
Definition: DTGrid2D.hpp:17
Definition: DTGrid3D.hpp:65
Definition: DTGrid3Dex.hpp:73
Imprint/Privacy