[gnumeric] Introspection: more docs for mathfunc



commit bcf08be0cc688037a522782514601c7dec780640
Author: Morten Welinder <terra gnome org>
Date:   Fri Mar 22 14:08:25 2013 -0400

    Introspection: more docs for mathfunc

 plugins/fn-r/generate |    2 -
 src/mathfunc.h        |    8 ++--
 src/outoflinedocs.c   |   99 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 103 insertions(+), 6 deletions(-)
---
diff --git a/plugins/fn-r/generate b/plugins/fn-r/generate
index 4fd9a7f..2f06350 100644
--- a/plugins/fn-r/generate
+++ b/plugins/fn-r/generate
@@ -124,8 +124,6 @@ my %argoverride = ();
         'geometric',
         ({ 'psuc' => "the probability of success in each trial",
            @common })];
-    $argoverride{"dgeom:p"} = $argoverride{"pgeom:p"} = $argoverride{"qgeom:prob"} =
-       "psuc";
 
     $funcs{'dsnorm'} =  $funcs{'psnorm'} =  
 #$funcs{'qsnorm'} =
diff --git a/src/mathfunc.h b/src/mathfunc.h
index 01bad21..16f29e9 100644
--- a/src/mathfunc.h
+++ b/src/mathfunc.h
@@ -116,10 +116,10 @@ gnm_float dhyper (gnm_float x, gnm_float r, gnm_float b, gnm_float n, gboolean g
 gnm_float phyper (gnm_float x, gnm_float NR, gnm_float NB, gnm_float n, gboolean lower_tail, gboolean log_p);
 gnm_float qhyper (gnm_float p, gnm_float NR, gnm_float NB, gnm_float n, gboolean lower_tail, gboolean log_p);
 
-/* Geometrical distribution.  */
-gnm_float dgeom (gnm_float x, gnm_float p, gboolean give_log);
-gnm_float pgeom (gnm_float x, gnm_float p, gboolean lower_tail, gboolean log_p);
-gnm_float qgeom (gnm_float p, gnm_float prob, gboolean lower_tail, gboolean log_p);
+/* Geometric distribution.  */
+gnm_float dgeom (gnm_float x, gnm_float psuc, gboolean give_log);
+gnm_float pgeom (gnm_float x, gnm_float psuc, gboolean lower_tail, gboolean log_p);
+gnm_float qgeom (gnm_float p, gnm_float psuc, gboolean lower_tail, gboolean log_p);
 
 /* Cauchy distribution.  */
 gnm_float dcauchy (gnm_float x, gnm_float location, gnm_float scale, gboolean give_log);
diff --git a/src/outoflinedocs.c b/src/outoflinedocs.c
index afb92fb..39167ff 100644
--- a/src/outoflinedocs.c
+++ b/src/outoflinedocs.c
@@ -290,3 +290,102 @@
  */
 
 /* ------------------------------------------------------------------------- */
+
+/**
+ * dgeom:
+ * @x: observation
+ * @psuc: the probability of success in each trial
+ * @give_log: if %TRUE, log of the result will be returned instead
+ *
+ * Returns: density of the geometric distribution.
+ */
+
+/**
+ * pgeom:
+ * @x: observation
+ * @psuc: the probability of success in each trial
+ * @lower_tail: if %TRUE, the lower tail of the distribution is considered.
+ * @log_p: if %TRUE, log of the result will be returned instead
+ *
+ * Returns: cumulative density of the geometric distribution.
+ */
+
+/**
+ * qgeom:
+ * @p: probability
+ * @psuc: the probability of success in each trial
+ * @lower_tail: if %TRUE, the lower tail of the distribution is considered.
+ * @log_p: if %TRUE, @p is given as log probability
+ *
+ * Returns: the observation with cumulative probability @p for the
+ * geometric distribution.
+ */
+
+/* ------------------------------------------------------------------------- */
+
+/**
+ * dchisq:
+ * @x: observation
+ * @df: the number of degrees of freedom of the distribution
+ * @give_log: if %TRUE, log of the result will be returned instead
+ *
+ * Returns: density of the &#x1D712;&#xb2; distribution.
+ */
+
+/**
+ * pchisq:
+ * @x: observation
+ * @df: the number of degrees of freedom of the distribution
+ * @lower_tail: if %TRUE, the lower tail of the distribution is considered.
+ * @log_p: if %TRUE, log of the result will be returned instead
+ *
+ * Returns: cumulative density of the &#x1D712;&#xb2; distribution.
+ */
+
+/**
+ * qchisq:
+ * @p: probability
+ * @df: the number of degrees of freedom of the distribution
+ * @lower_tail: if %TRUE, the lower tail of the distribution is considered.
+ * @log_p: if %TRUE, @p is given as log probability
+ *
+ * Returns: the observation with cumulative probability @p for the
+ * &#x1D712;&#xb2; distribution.
+ */
+
+/* ------------------------------------------------------------------------- */
+
+/**
+ * dweibull:
+ * @x: observation
+ * @shape: the shape parameter of the distribution
+ * @scale: the scale parameter of the distribution
+ * @give_log: if %TRUE, log of the result will be returned instead
+ *
+ * Returns: density of the Weibull distribution.
+ */
+
+/**
+ * pweibull:
+ * @x: observation
+ * @shape: the shape parameter of the distribution
+ * @scale: the scale parameter of the distribution
+ * @lower_tail: if %TRUE, the lower tail of the distribution is considered.
+ * @log_p: if %TRUE, log of the result will be returned instead
+ *
+ * Returns: cumulative density of the Weibull distribution.
+ */
+
+/**
+ * qweibull:
+ * @p: probability
+ * @shape: the shape parameter of the distribution
+ * @scale: the scale parameter of the distribution
+ * @lower_tail: if %TRUE, the lower tail of the distribution is considered.
+ * @log_p: if %TRUE, @p is given as log probability
+ *
+ * Returns: the observation with cumulative probability @p for the
+ * Weibull distribution.
+ */
+
+/* ------------------------------------------------------------------------- */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]