h->type = type;
h->flags = 0;
-
+
h->bsize = 0;
h->blockfp = NULL;
h->invbw = 0;
{
start -= binw;
}
- end += binw;
+ end += binw;
nbins = (int)((end - start) / binw + 0.5);
}
/* Create the histogram */
if (pos < h->start || pos > h->end)
{
- v = e = 0;
+ v = e = 0;
}
else
{
if (bin < 0 || bin >= h->nbins)
{
- v = e = 0;
+ v = e = 0;
}
else
{
ve = sqr(src->histerr[j]) + sqr(src->histerr[j+1]);
j += 2;
}
- ve = sqrt(ve);
+ ve = sqrt(ve);
dest->hist[i] = v;
dest->histerr[i] = ve;
}
gmx_histogram_scale_vec(gmx_histogram_t *h, real norm[])
{
int i;
-
+
for (i = 0; i < h->nbins; ++i)
{
h->hist[i] *= norm[i];
*/
void
gmx_histogram_write_cum_array(FILE *fp, int n, gmx_histogram_t *h[],
- gmx_bool bValue, gmx_bool bErrors)
+ gmx_bool bValue, gmx_bool bErrors)
{
int i, j, nbins;
double *sum;