[gnumeric] Introspection: more function docs.



commit 926951b040a677205415e93a8ffa1ac9382d8c26
Author: Morten Welinder <terra gnome org>
Date:   Fri Mar 22 11:11:28 2013 -0400

    Introspection: more function docs.

 plugins/fn-r/generate |    5 ---
 src/mathfunc.h        |    4 +-
 src/outoflinedocs.c   |   83 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 85 insertions(+), 7 deletions(-)
---
diff --git a/plugins/fn-r/generate b/plugins/fn-r/generate
index e867ed1..ca9c294 100644
--- a/plugins/fn-r/generate
+++ b/plugins/fn-r/generate
@@ -51,11 +51,6 @@ my %argoverride = ();
         ({ 'a' => "the first shape parameter $of",
            'b' => "the second scale parameter $of",
            @common })];
-    $argoverride{"pbeta:pin"} = "a";
-    $argoverride{"pbeta:qin"} = "b";
-    $argoverride{"qbeta:alpha"} = "p";
-    $argoverride{"qbeta:p"} = "a";
-    $argoverride{"qbeta:q"} = "b";
 
     $funcs{'dt'} = $funcs{'pt'} = $funcs{'qt'} =
        [\&distribution,
diff --git a/src/mathfunc.h b/src/mathfunc.h
index d015f2a..fb258eb 100644
--- a/src/mathfunc.h
+++ b/src/mathfunc.h
@@ -67,8 +67,8 @@ gnm_float qgamma (gnm_float p, gnm_float shape, gnm_float scale, gboolean lower_
 
 /* The beta distribution.  */
 gnm_float dbeta (gnm_float x, gnm_float a, gnm_float b, gboolean give_log);
-gnm_float pbeta (gnm_float x, gnm_float pin, gnm_float qin, gboolean lower_tail, gboolean log_p);
-gnm_float qbeta (gnm_float alpha, gnm_float p, gnm_float q, gboolean lower_tail, gboolean log_p);
+gnm_float pbeta (gnm_float x, gnm_float a, gnm_float b, gboolean lower_tail, gboolean log_p);
+gnm_float qbeta (gnm_float p, gnm_float a, gnm_float b, gboolean lower_tail, gboolean log_p);
 
 /* The t distribution.  */
 gnm_float dt (gnm_float x, gnm_float n, gboolean give_log);
diff --git a/src/outoflinedocs.c b/src/outoflinedocs.c
index 0f545e6..8ca667e 100644
--- a/src/outoflinedocs.c
+++ b/src/outoflinedocs.c
@@ -34,6 +34,54 @@
  * naive formula.
  */
 
+/**
+ * gnm_cot:
+ * @x: an angle in radians
+ *
+ * Returns: The co-tangent of the given angle.
+ */
+
+/**
+ * gnm_acot:
+ * @x: a number
+ *
+ * Returns: The inverse co-tangent of the given number.
+ */
+
+/**
+ * gnm_coth:
+ * @x: a number.
+ *
+ * Returns: The hyperbolic co-tangent of the given number.
+ */
+
+/**
+ * gnm_acoth:
+ * @x: a number
+ *
+ * Returns: The inverse hyperbolic co-tangent of the given number.
+ */
+
+/**
+ * beta:
+ * @a: a number
+ * @b: a number
+ *
+ * Returns: the beta function evaluated at @a and @b.
+ */
+
+/**
+ * lbeta3:
+ * @a: a number
+ * @b: a number
+ * @sign: (out): the sign
+ *
+ * Returns: the logarithm of the absolute value of the beta function
+ * evaluated at @a and @b.  The sign will be stored in @sign as -1 or
+ * +1.  This function is useful because the result of the beta
+ * function can be too large for doubles.
+ */
+
 /* ------------------------------------------------------------------------- */
 
 /**
@@ -140,3 +188,38 @@
  */
 
 /* ------------------------------------------------------------------------- */
+
+/**
+ * dbeta:
+ * @x: observation
+ * @a: the first shape parameter of the distribution
+ * @b: the second scale parameter of the distribution
+ * @give_log: if %TRUE, log of the result will be returned instead
+ *
+ * Returns: density of the beta distribution.
+ */
+
+/**
+ * pbeta:
+ * @x: observation
+ * @a: the first shape parameter of the distribution
+ * @b: the second 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 beta distribution.
+ */
+
+/**
+ * qbeta:
+ * @p: probability
+ * @a: the first shape parameter of the distribution
+ * @b: the second 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
+ * beta distribution.
+ */
+
+/* ------------------------------------------------------------------------- */


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