From 82fd581e9fdd8fdf214bca1fd671e686e0494b10 Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Sun, 13 Jan 2008 10:41:35 -0500 Subject: [PATCH] Fix circular doc errors --- extra/editors/vim/vim-docs.factor | 4 ++-- extra/math/statistics/statistics-docs.factor | 21 ++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/extra/editors/vim/vim-docs.factor b/extra/editors/vim/vim-docs.factor index 9f141f524f..020117564d 100644 --- a/extra/editors/vim/vim-docs.factor +++ b/extra/editors/vim/vim-docs.factor @@ -1,5 +1,5 @@ -USING: definitions editors.vim help help.markup help.syntax io io.files -editors words ; +USING: definitions help help.markup help.syntax io io.files editors words ; +IN: editors.vim ARTICLE: { "vim" "vim" } "Vim support" "This module makes the " { $link edit } " word work with Vim by setting the " { $link edit-hook } " global variable to call " { $link vim-location } ". The " { $link vim-path } " variable contains the name of the vim executable. The default " { $link vim-path } " is " { $snippet "\"gvim\"" } "." diff --git a/extra/math/statistics/statistics-docs.factor b/extra/math/statistics/statistics-docs.factor index bb92178e6d..4787a85aed 100644 --- a/extra/math/statistics/statistics-docs.factor +++ b/extra/math/statistics/statistics-docs.factor @@ -1,49 +1,50 @@ -USING: math.statistics help.markup help.syntax debugger ; +USING: help.markup help.syntax debugger ; +IN: math.statistics HELP: geometric-mean { $values { "seq" "a sequence of numbers" } { "n" "a non-negative real number"} } { $description "Computes the geometric mean of all elements in " { $snippet "seq" } ". The geometric mean measures the central tendency of a data set that minimizes the effects of extreme values." } -{ $examples { $example "USE: math.statistics" "{ 1 2 3 } geometric-mean ." "1.81712059283214" } } +{ $examples { $example "USE: math.statistics" "{ 1 2 3 } geometric-mean ." "1.81712059283214" } } { $errors "Throws a " { $link signal-error. } " (square-root of 0) if the sequence is empty." } ; HELP: harmonic-mean { $values { "seq" "a sequence of numbers" } { "n" "a non-negative real number"} } { $description "Computes the harmonic mean of the elements in " { $snippet "seq" } ". The harmonic mean is appropriate when the average of rates is desired." } -{ $examples { $example "USE: math.statistics" "{ 1 2 3 } harmonic-mean ." "6/11" } } +{ $examples { $example "USE: math.statistics" "{ 1 2 3 } harmonic-mean ." "6/11" } } { $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ; HELP: mean { $values { "seq" "a sequence of numbers" } { "n" "a non-negative real number"} } { $description "Computes the arithmetic mean of all elements in " { $snippet "seq" } "." } -{ $examples { $example "USE: math.statistics" "{ 1 2 3 } mean ." "2" } } +{ $examples { $example "USE: math.statistics" "{ 1 2 3 } mean ." "2" } } { $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ; HELP: median { $values { "seq" "a sequence of numbers" } { "n" "a non-negative real number"} } { $description "Computes the median of " { $snippet "seq" } " by sorting the sequence from lowest value to highest and outputting the middle one. If there is an even number of elements in the sequence, the median is not unique, so the mean of the two middle values is outputted." } -{ $examples +{ $examples { $example "USE: math.statistics" "{ 1 2 3 } median ." "2" } - { $example "USE: math.statistics" "{ 1 2 3 4 } median ." "5/2" } } + { $example "USE: math.statistics" "{ 1 2 3 4 } median ." "5/2" } } { $errors "Throws a " { $link signal-error. } " (divide by zero) if the sequence is empty." } ; HELP: range { $values { "seq" "a sequence of numbers" } { "n" "a non-negative real number"} } { $description "Computes the distance of the maximum and minimum values in " { $snippet "seq" } "." } -{ $examples +{ $examples { $example "USE: math.statistics" "{ 1 2 3 } range ." "2" } { $example "USE: math.statistics" "{ 1 2 3 4 } range ." "3" } } ; HELP: std { $values { "seq" "a sequence of numbers" } { "x" "a non-negative real number"} } { $description "Computes the standard deviation of " { $snippet "seq" } " by squaring the variance of the sequence. It measures how widely spread the values in a sequence are about the mean." } -{ $examples +{ $examples { $example "USE: math.statistics" "{ 1 2 3 } std ." "1.0" } { $example "USE: math.statistics" "{ 1 2 3 4 } std ." "1.290994448735806" } } ; HELP: ste { $values { "seq" "a sequence of numbers" } { "x" "a non-negative real number"} } { $description "Computes the standard error of the mean for " { $snippet "seq" } ". It's defined as the standard deviation divided by the square root of the length of the sequence, and measures uncertainty associated with the estimate of the mean." } - { $examples + { $examples { $example "USE: math.statistics" "{ -2 2 } ste ." "2.0" } { $example "USE: math.statistics" "{ -2 2 2 } ste ." "1.333333333333333" } } ; @@ -51,7 +52,7 @@ HELP: var { $values { "seq" "a sequence of numbers" } { "x" "a non-negative real number"} } { $description "Computes the variance of " { $snippet "seq" } ". It's a measurement of the spread of values in a sequence. The larger the variance, the larger the distance of values from the mean." } { $notes "If the number of elements in " { $snippet "seq" } " is 1 or less, it outputs 0." } -{ $examples +{ $examples { $example "USE: math.statistics" "{ 1 } var ." "0" } { $example "USE: math.statistics" "{ 1 2 3 } var ." "1" } { $example "USE: math.statistics" "{ 1 2 3 4 } var ." "5/3" } } ;