Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit fa9a9f9

Browse files
committed
doc: update helpdb.jl
1 parent acfd2d7 commit fa9a9f9

File tree

1 file changed

+72
-29
lines changed

1 file changed

+72
-29
lines changed

doc/helpdb.jl

+72-29
Original file line numberDiff line numberDiff line change
@@ -189,29 +189,49 @@
189189

190190
("All Objects","Base","isequal","isequal(x, y)
191191
192-
True if and only if \"x\" and \"y\" have the same contents. Loosely
193-
speaking, this means \"x\" and \"y\" would look the same when
194-
printed. This is the default comparison function used by hash
195-
tables (\"Dict\"). New types with a notion of equality should
196-
implement this function, except for numbers, which should implement
197-
\"==\" instead. However, numeric types with special values might
198-
need to implement \"isequal\" as well. For example, floating point
199-
\"NaN\" values are not \"==\", but are all equivalent in the sense
200-
of \"isequal\". Numbers of different types are considered unequal.
192+
True if and only if \"x\" and \"y\" would cause a typical function
193+
to behave the same. A \"typical\" function is one that uses only
194+
intended interfaces, and does not unreasonably exploit
195+
implementation details of its arguments. For example, floating-
196+
point \"NaN\" values are \"isequal\" regardless of their sign bits,
197+
since the sign of a \"NaN\" has no meaning in the vast majority of
198+
cases (but can be discovered if you really want to).
199+
200+
One implication of this definition is that implementing \"isequal\"
201+
for a new type encapsulates, to a large extent, what the true
202+
abstraction presented by that type is. For example, a \"String\" is
203+
a sequence of characters, so two strings are \"isequal\" if they
204+
generate the same characters. Other concerns, such as encoding, are
205+
not considered.
206+
207+
When calling \"isequal\", be aware that it cannot be all things to
208+
all people. For example, if your use of strings *does* care about
209+
encoding, you will have to perform a check like
210+
\"typeof(x)==typeof(y) && isequal(x,y)\".
211+
212+
\"isequal\" is the default comparison function used by hash tables
213+
(\"Dict\"). \"isequal(x,y)\" must imply \"hash(x)==hash(y)\".
214+
215+
New types with a notion of equality should implement this function,
216+
except for numbers, which should implement \"==\" instead. However,
217+
numeric types with special values like \"NaN\" might need to
218+
implement \"isequal\" as well. Numbers of different types are
219+
considered unequal.
220+
201221
Mutable containers should generally implement \"isequal\" by
202222
calling \"isequal\" recursively on all contents.
203223
204224
"),
205225

206226
("All Objects","Base","isless","isless(x, y)
207227
208-
Test whether \"x\" is less than \"y\". Provides a total order
209-
consistent with \"isequal\". Values that are normally unordered,
210-
such as \"NaN\", are ordered in an arbitrary but consistent
211-
fashion. This is the default comparison used by \"sort\". Non-
212-
numeric types that can be ordered should implement this function.
213-
Numeric types only need to implement it if they have special values
214-
such as \"NaN\".
228+
Test whether \"x\" is less than \"y\", according to a canonical
229+
total order. Values that are normally unordered, such as \"NaN\",
230+
are ordered in an arbitrary but consistent fashion. This is the
231+
default comparison used by \"sort\". Non-numeric types with a
232+
canonical total order should implement this function. Numeric types
233+
only need to implement it if they have special values such as
234+
\"NaN\".
215235
216236
"),
217237

@@ -2551,10 +2571,17 @@
25512571
25522572
"),
25532573

2554-
("Text I/O","Base","writedlm","writedlm(filename, array, delim::Char)
2574+
("Text I/O","Base","writedlm","writedlm(f, A, delim='t')
2575+
2576+
Write \"A\" (either an array type or an iterable collection of
2577+
iterable rows) as text to \"f\" (either a filename string or an
2578+
\"IO\" stream) using the given delimeter \"delim\" (which defaults
2579+
to tab, but can be any printable Julia object, typically a \"Char\"
2580+
or \"String\").
25552581
2556-
Write an array to a text file using the given delimeter (defaults
2557-
to comma).
2582+
For example, two vectors \"x\" and \"y\" of the same length can be
2583+
written as two columns of tab-delimited text to \"f\" by either
2584+
\"writedlm(f, [x y])\" or by \"writedlm(f, zip(x, y))\".
25582585
25592586
"),
25602587

@@ -2564,7 +2591,7 @@
25642591
25652592
"),
25662593

2567-
("Text I/O","Base","writecsv","writecsv(filename, array)
2594+
("Text I/O","Base","writecsv","writecsv(filename, A)
25682595
25692596
Equivalent to \"writedlm\" with \"delim\" set to comma.
25702597
@@ -3093,7 +3120,10 @@ popdisplay(d::Display)
30933120
("Mathematical Operators","Base","<","<(x, y)
30943121
30953122
Less-than comparison operator. New numeric types should implement
3096-
this function for two arguments of the new type.
3123+
this function for two arguments of the new type. Because of the
3124+
behavior of floating-point NaN values, \"<\" implements a partial
3125+
order. Types with a canonical partial order should implement \"<\",
3126+
and types with a canonical total order should implement \"isless\".
30973127
30983128
"),
30993129

@@ -3155,8 +3185,9 @@ popdisplay(d::Display)
31553185

31563186
("Mathematical Operators","Base","cmp","cmp(x, y)
31573187
3158-
Return -1, 0, or 1 depending on whether \"x<y\", \"x==y\", or
3159-
\"x>y\", respectively.
3188+
Return -1, 0, or 1 depending on whether \"x\" is less than, equal
3189+
to, or greater than \"y\", respectively. Uses the total order
3190+
implemented by \"isless\".
31603191
31613192
"),
31623193

@@ -3647,9 +3678,9 @@ popdisplay(d::Display)
36473678
36483679
"),
36493680

3650-
("Mathematical Functions","Base","frexp","frexp(val, exp)
3681+
("Mathematical Functions","Base","frexp","frexp(val)
36513682
3652-
Return a number \"x\" such that it has a magnitude in the interval
3683+
Return \"(x,exp)\" such that \"x\" has a magnitude in the interval
36533684
\"[1/2, 1)\" or 0, and val = x \\times 2^{exp}.
36543685
36553686
"),
@@ -8157,7 +8188,8 @@ popdisplay(d::Display)
81578188

81588189
("Linear Algebra","Base","dot","dot(x, y)
81598190
8160-
Compute the dot product
8191+
Compute the dot product. For complex vectors the first vector is
8192+
conjugated.
81618193
81628194
"),
81638195

@@ -8917,12 +8949,23 @@ popdisplay(d::Display)
89178949
89188950
"),
89198951

8920-
("BLAS Functions","Base","dot","dot(n, X, incx, Y, incy)
8952+
("BLAS Functions","Base.LinAlg.BLAS","dot","dot(n, X, incx, Y, incy)
89218953
89228954
Dot product of two vectors consisting of \"n\" elements of array
89238955
\"X\" with stride \"incx\" and \"n\" elements of array \"Y\" with
8924-
stride \"incy\". There are no \"dot\" methods for \"Complex\"
8925-
arrays.
8956+
stride \"incy\".
8957+
8958+
"),
8959+
8960+
("BLAS Functions","Base.LinAlg.BLAS","dotu","dotu(n, X, incx, Y, incy)
8961+
8962+
Dot function for two complex vectors.
8963+
8964+
"),
8965+
8966+
("BLAS Functions","Base.LinAlg.BLAS","dotc","dotc(n, X, incx, U, incy)
8967+
8968+
Dot function for two complex vectors conjugating the first vector.
89268969
89278970
"),
89288971

0 commit comments

Comments
 (0)