20#define ITER_BIGSTEP 10000
22#define FRAC_PHASEOUT 10
35 namespace Tractography {
71 Stats(
const double T0,
const double T1,
const uint64_t maxiter)
75 for (
int k = 0; k != 5; k++)
85 void open_stream(
const std::string& file) {
87 out.open(file.c_str(), std::ofstream::out);
92 std::lock_guard<std::mutex> lock (
mutex);
98 out << *
this << std::endl;
106 double getText()
const {
110 double getTint()
const {
114 void setTint(
double temp) {
115 std::lock_guard<std::mutex> lock (
mutex);
120 double getEextTotal()
const {
124 double getEintTotal()
const {
128 void incEextTotal(
double d) {
129 std::lock_guard<std::mutex> lock (
mutex);
133 void incEintTotal(
double d) {
134 std::lock_guard<std::mutex> lock (
mutex);
139 unsigned int getN(
const char p)
const {
141 case 'b':
return n_gen[0];
142 case 'd':
return n_gen[1];
143 case 'r':
return n_gen[2];
144 case 'o':
return n_gen[3];
145 case 'c':
return n_gen[4];
150 unsigned int getNa(
const char p)
const {
152 case 'b':
return n_acc[0];
153 case 'd':
return n_acc[1];
154 case 'r':
return n_acc[2];
155 case 'o':
return n_acc[3];
156 case 'c':
return n_acc[4];
161 void incN(
const char p,
unsigned int i = 1) {
162 std::lock_guard<std::mutex> lock (
mutex);
164 case 'b':
n_gen[0] += i;
break;
165 case 'd':
n_gen[1] += i;
break;
166 case 'r':
n_gen[2] += i;
break;
167 case 'o':
n_gen[3] += i;
break;
168 case 'c':
n_gen[4] += i;
break;
173 void incNa(
const char p,
unsigned int i = 1) {
174 std::lock_guard<std::mutex> lock (
mutex);
176 case 'b':
n_acc[0] += i;
break;
177 case 'd':
n_acc[1] += i;
break;
178 case 'r':
n_acc[2] += i;
break;
179 case 'o':
n_acc[3] += i;
break;
180 case 'c':
n_acc[4] += i;
break;
184 double getAcceptanceRate(
const char p)
const {
186 case 'b':
return double(
n_acc[0]) / double(
n_gen[0]);
187 case 'd':
return double(
n_acc[1]) / double(
n_gen[1]);
188 case 'r':
return double(
n_acc[2]) / double(
n_gen[2]);
189 case 'o':
return double(
n_acc[3]) / double(
n_gen[3]);
190 case 'c':
return double(
n_acc[4]) / double(
n_gen[4]);
friend std::ostream & operator<<(std::ostream &o, Stats const &stats)
implements a progress meter to provide feedback to the user
vector< Eigen::VectorXf > resp_ISO
MEMALIGN(Properties) float p_birth