Simple statistics

Name

Simple statistics -- 

Synopsis


#include <gfs.h>


struct      GfsNorm;

void        gfs_norm_init                   (GfsNorm *n);
void        gfs_norm_add                    (GfsNorm *n,
                                             gdouble val,
                                             gdouble weight);
void        gfs_norm_update                 (GfsNorm *n);
void        gfs_norm_reset                  (GfsNorm *n);

Description

Details

struct GfsNorm

struct GfsNorm {
  gdouble bias, first, second, infty, w;
};

Contains simple norm statistics.


gfs_norm_init ()

void        gfs_norm_init                   (GfsNorm *n);

Initializes a GfsNorm.

n : a GfsNorm.


gfs_norm_add ()

void        gfs_norm_add                    (GfsNorm *n,
                                             gdouble val,
                                             gdouble weight);

Adds val to n.

n : a GfsNorm.
val : a value to add to n.
weight : weight of val.


gfs_norm_update ()

void        gfs_norm_update                 (GfsNorm *n);

Updates the fields of n.

n : a GfsNorm.


gfs_norm_reset ()

void        gfs_norm_reset                  (GfsNorm *n);

Sets all the fields of n to 0.

n : a GfsNorm.