@@ -41,19 +41,27 @@ template
41
41
typename WalkTypePolicy,
42
42
typename PointType,
43
43
typename RNGType,
44
- typename PointList
44
+ typename MT
45
45
>
46
46
void uniform_correlation_sampling_MT ( const unsigned int &n,
47
- PointList &randPoints ,
47
+ std::list<MT> &randCorMatrices ,
48
48
const unsigned int &walkL,
49
49
const unsigned int &num_points,
50
50
unsigned int const & nburns){
51
+ using PointList = std::vector<PointType>;
52
+ PointList randPoints;
53
+
51
54
CorrelationSpectrahedron_MT<PointType> P (n);
52
55
const unsigned int d = P.dimension ();
53
56
PointType startingPoint (n);
54
57
RNGType rng (d);
55
58
56
59
uniform_sampling<WalkTypePolicy>(randPoints, P, rng, walkL, num_points, startingPoint, nburns);
60
+
61
+ for (const auto &p : randPoints){
62
+ MT final_cor_mat = p.mat + p.mat .transpose () - MT::Identity (n, n);
63
+ randCorMatrices.push_back (final_cor_mat);
64
+ }
57
65
}
58
66
59
67
template
@@ -83,21 +91,29 @@ template
83
91
typename WalkTypePolicy,
84
92
typename PointType,
85
93
typename RNGType,
86
- typename PointList ,
94
+ typename MT ,
87
95
typename NT
88
96
>
89
97
void gaussian_correlation_sampling_MT ( const unsigned int &n,
90
- PointList &randPoints ,
98
+ std::list<MT> &randCorMatrices ,
91
99
const unsigned int &walkL,
92
100
const unsigned int &num_points,
93
101
const NT &a,
94
102
unsigned int const & nburns = 0 ){
103
+ using PointList = std::vector<PointType>;
104
+ PointList randPoints;
105
+
95
106
CorrelationSpectrahedron_MT<PointType> P (n);
96
107
const unsigned int d = P.dimension ();
97
108
PointType startingPoint (n);
98
109
RNGType rng (d);
99
110
100
111
gaussian_sampling<WalkTypePolicy>(randPoints, P, rng, walkL, num_points, a, startingPoint, nburns);
112
+
113
+ for (const auto &p : randPoints){
114
+ MT final_cor_mat = p.mat + p.mat .transpose () - MT::Identity (n, n);
115
+ randCorMatrices.push_back (final_cor_mat);
116
+ }
101
117
}
102
118
103
119
template
@@ -130,24 +146,32 @@ template
130
146
typename WalkTypePolicy,
131
147
typename PointType,
132
148
typename RNGType,
133
- typename PointList ,
149
+ typename MT ,
134
150
typename NT,
135
151
typename VT
136
152
>
137
153
void exponential_correlation_sampling_MT ( const unsigned int &n,
138
- PointList &randPoints ,
154
+ std::list<MT> &randCorMatrices ,
139
155
const unsigned int &walkL,
140
156
const unsigned int &num_points,
141
157
const VT &c,
142
158
const NT &T,
143
159
unsigned int const & nburns = 0 ){
160
+ using PointList = std::vector<PointType>;
161
+ PointList randPoints;
162
+
144
163
CorrelationSpectrahedron_MT<PointType> P (n);
145
164
const unsigned int d = P.dimension ();
146
165
PointType startingPoint (n);
147
166
RNGType rng (d);
148
167
PointType _c (c);
149
168
150
169
exponential_sampling<WalkTypePolicy>(randPoints, P, rng, walkL, num_points, _c, T, startingPoint, nburns);
170
+
171
+ for (const auto &p : randPoints){
172
+ MT final_cor_mat = p.mat + p.mat .transpose () - MT::Identity (n, n);
173
+ randCorMatrices.push_back (final_cor_mat);
174
+ }
151
175
}
152
176
153
177
#endif // VOLESTI_SAMPLING_SAMPLE_CORRELATION_MATRICES_HPP
0 commit comments