]> gitweb.factorcode.org Git - factor.git/blob - core/float-vectors/float-vectors-docs.factor
Fix regression
[factor.git] / core / float-vectors / float-vectors-docs.factor
1 USING: arrays float-arrays help.markup help.syntax kernel\r
2 float-vectors.private combinators ;\r
3 IN: float-vectors\r
4 \r
5 ARTICLE: "float-vectors" "Float vectors"\r
6 "A float vector is a resizable mutable sequence of unsigned floats. The literal syntax is covered in " { $link "syntax-float-vectors" } ". Float vector words are found in the " { $vocab-link "float-vectors" } " vocabulary."\r
7 $nl\r
8 "Float vectors form a class:"\r
9 { $subsection float-vector }\r
10 { $subsection float-vector? }\r
11 "Creating float vectors:"\r
12 { $subsection >float-vector }\r
13 { $subsection <float-vector> }\r
14 "If you don't care about initial capacity, a more elegant way to create a new float vector is to write:"\r
15 { $code "FV{ } clone" } ;\r
16 \r
17 ABOUT: "float-vectors"\r
18 \r
19 HELP: float-vector\r
20 { $description "The class of resizable float vectors. See " { $link "syntax-float-vectors" } " for syntax and " { $link "float-vectors" } " for general information." } ;\r
21 \r
22 HELP: <float-vector>\r
23 { $values { "n" "a positive integer specifying initial capacity" } { "float-vector" float-vector } }\r
24 { $description "Creates a new float vector that can hold " { $snippet "n" } " floats before resizing." } ;\r
25 \r
26 HELP: >float-vector\r
27 { $values { "seq" "a sequence" } { "float-vector" float-vector } }\r
28 { $description "Outputs a freshly-allocated float vector with the same elements as a given sequence." }\r
29 { $errors "Throws an error if the sequence contains elements other than real numbers." } ;\r
30 \r
31 HELP: float-array>vector\r
32 { $values { "float-array" "an array" } { "length" "a non-negative integer" } { "float-vector" float-vector } }\r
33 { $description "Creates a new float vector using the array for underlying storage with the specified initial length." }\r
34 { $warning "This word is in the " { $vocab-link "float-vectors.private" } " vocabulary because it does not perform type or bounds checks. User code should call " { $link >float-vector } " instead." } ;\r