-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathhelpdb.jl
6694 lines (3417 loc) · 143 KB
/
helpdb.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# automatically generated -- do not edit
{
("Getting Around","Base","exit","exit([code])
Quit (or control-D at the prompt). The default exit code is zero,
indicating that the processes completed successfully.
"),
("Getting Around","Base","whos","whos([Module,] [pattern::Regex])
Print information about global variables in a module, optionally
restricted to those matching \"pattern\".
"),
("Getting Around","Base","edit","edit(file::String[, line])
Edit a file optionally providing a line number to edit at. Returns
to the julia prompt when you quit the editor. If the file name ends
in \".jl\" it is reloaded when the editor closes the file.
"),
("Getting Around","Base","edit","edit(function[, types])
Edit the definition of a function, optionally specifying a tuple of
types to indicate which method to edit. When the editor exits, the
source file containing the definition is reloaded.
"),
("Getting Around","Base","require","require(file::String...)
Load source files once, in the context of the \"Main\" module, on
every active node, searching the system-wide \"LOAD_PATH\" for
files. \"require\" is considered a top-level operation, so it sets
the current \"include\" path but does not use it to search for
files (see help for \"include\"). This function is typically used
to load library code, and is implicitly called by \"using\" to load
packages.
"),
("Getting Around","Base","reload","reload(file::String)
Like \"require\", except forces loading of files regardless of
whether they have been loaded before. Typically used when
interactively developing libraries.
"),
("Getting Around","Base","include","include(path::String)
Evaluate the contents of a source file in the current context.
During including, a task-local include path is set to the directory
containing the file. Nested calls to \"include\" will search
relative to that path. All paths refer to files on node 1 when
running in parallel, and files will be fetched from node 1. This
function is typically used to load source interactively, or to
combine files in packages that are broken into multiple source
files.
"),
("Getting
Around","Base","include_string","include_string(code::String)
Like \"include\", except reads code from the given string rather
than from a file. Since there is no file path involved, no path
processing or fetching from node 1 is done.
"),
("Getting Around","Base","evalfile","evalfile(path::String)
Evaluate all expressions in the given file, and return the value of
the last one. No other processing (path searching, fetching from
node 1, etc.) is performed.
"),
("Getting Around","Base","help","help(name)
Get help for a function. \"name\" can be an object or a string.
"),
("Getting Around","Base","apropos","apropos(string)
Search documentation for functions related to \"string\".
"),
("Getting Around","Base","which","which(f, args...)
Show which method of \"f\" will be called for the given arguments.
"),
("Getting Around","Base","methods","methods(f)
Show all methods of \"f\" with their argument types.
"),
("Getting Around","Base","methodswith","methodswith(typ[,
showparents])
Show all methods with an argument of type \"typ\". If optional
\"showparents\" is \"true\", also show arguments with a parent type
of \"typ\", excluding type \"Any\".
"),
("All Objects","Base","is","is(x, y)
Determine whether \"x\" and \"y\" are identical, in the sense that
no program could distinguish them.
"),
("All Objects","Base","isa","isa(x, type)
Determine whether \"x\" is of the given type.
"),
("All Objects","Base","isequal","isequal(x, y)
True if and only if \"x\" and \"y\" have the same contents. Loosely
speaking, this means \"x\" and \"y\" would look the same when
printed.
"),
("All Objects","Base","isless","isless(x, y)
Test whether \"x\" is less than \"y\". Provides a total order
consistent with \"isequal\". Values that are normally unordered,
such as \"NaN\", are ordered in an arbitrary but consistent
fashion. This is the default comparison used by \"sort\". Non-
numeric types that can be ordered should implement this function.
"),
("All Objects","Base","typeof","typeof(x)
Get the concrete type of \"x\".
"),
("All Objects","Base","tuple","tuple(xs...)
Construct a tuple of the given objects.
"),
("All Objects","Base","ntuple","ntuple(n, f::Function)
Create a tuple of length \"n\", computing each element as \"f(i)\",
where \"i\" is the index of the element.
"),
("All Objects","Base","object_id","object_id(x)
Get a unique integer id for \"x\". \"object_id(x)==object_id(y)\"
if and only if \"is(x,y)\".
"),
("All Objects","Base","hash","hash(x)
Compute an integer hash code such that \"isequal(x,y)\" implies
\"hash(x)==hash(y)\".
"),
("All Objects","Base","finalizer","finalizer(x, function)
Register a function \"f(x)\" to be called when there are no
program-accessible references to \"x\". The behavior of this
function is unpredictable if \"x\" is of a bits type.
"),
("All Objects","Base","copy","copy(x)
Create a shallow copy of \"x\": the outer structure is copied, but
not all internal values. For example, copying an array produces a
new array with identically-same elements as the original.
"),
("All Objects","Base","deepcopy","deepcopy(x)
Create a deep copy of \"x\": everything is copied recursively,
resulting in a fully independent object. For example, deep-copying
an array produces a new array whose elements are deep-copies of the
original elements.
As a special case, functions can only be actually deep-copied if
they are anonymous, otherwise they are just copied. The difference
is only relevant in the case of closures, i.e. functions which may
contain hidden internal references.
While it isn't normally necessary, user-defined types can override
the default \"deepcopy\" behavior by defining a specialized version
of the function \"deepcopy_internal(x::T, dict::ObjectIdDict)\"
(which shouldn't otherwise be used), where \"T\" is the type to be
specialized for, and \"dict\" keeps track of objects copied so far
within the recursion. Within the definition, \"deepcopy_internal\"
should be used in place of \"deepcopy\", and the \"dict\" variable
should be updated as appropriate before returning.
"),
("All Objects","Base","convert","convert(type, x)
Try to convert \"x\" to the given type.
"),
("All Objects","Base","promote","promote(xs...)
Convert all arguments to their common promotion type (if any), and
return them all (as a tuple).
"),
("Types","Base","subtype","subtype(type1, type2)
True if and only if all values of \"type1\" are also of \"type2\".
Can also be written using the \"<:\" infix operator as \"type1 <:
type2\".
"),
("Types","Base","<:","<:(T1, T2)
Subtype operator, equivalent to \"subtype(T1,T2)\".
"),
("Types","Base","typemin","typemin(type)
The lowest value representable by the given (real) numeric type.
"),
("Types","Base","typemax","typemax(type)
The highest value representable by the given (real) numeric type.
"),
("Types","Base","realmin","realmin(type)
The smallest in absolute value non-denormal value representable by
the given floating-point type
"),
("Types","Base","realmax","realmax(type)
The highest finite value representable by the given floating-point
type
"),
("Types","Base","maxintfloat","maxintfloat(type)
The largest integer losslessly representable by the given floating-
point type
"),
("Types","Base","sizeof","sizeof(type)
Size, in bytes, of the canonical binary representation of the given
type, if any.
"),
("Types","Base","eps","eps([type])
The distance between 1.0 and the next larger representable
floating-point value of \"type\". The only types that are sensible
arguments are \"Float32\" and \"Float64\". If \"type\" is omitted,
then \"eps(Float64)\" is returned.
"),
("Types","Base","eps","eps(x)
The distance between \"x\" and the next larger representable
floating-point value of the same type as \"x\".
"),
("Types","Base","promote_type","promote_type(type1, type2)
Determine a type big enough to hold values of each argument type
without loss, whenever possible. In some cases, where no type
exists which to which both types can be promoted losslessly, some
loss is tolerated; for example, \"promote_type(Int64,Float64)\"
returns \"Float64\" even though strictly, not all \"Int64\" values
can be represented exactly as \"Float64\" values.
"),
("Types","Base","getfield","getfield(value, name::Symbol)
Extract a named field from a value of composite type. The syntax
\"a.b\" calls \"getfield(a, :b)\", and the syntax \"a.(b)\" calls
\"getfield(a, b)\".
"),
("Types","Base","setfield","setfield(value, name::Symbol, x)
Assign \"x\" to a named field in \"value\" of composite type. The
syntax \"a.b = c\" calls \"setfield(a, :b, c)\", and the syntax
\"a.(b) = c\" calls \"setfield(a, b, c)\".
"),
("Types","Base","fieldtype","fieldtype(value, name::Symbol)
Determine the declared type of a named field in a value of
composite type.
"),
("Generic Functions","Base","method_exists","method_exists(f, tuple)
-> Bool
Determine whether the given generic function has a method matching
the given tuple of argument types.
**Example**: \"method_exists(length, (Array,)) = true\"
"),
("Generic Functions","Base","applicable","applicable(f, args...)
Determine whether the given generic function has a method
applicable to the given arguments.
"),
("Generic Functions","Base","invoke","invoke(f, (types...), args...)
Invoke a method for the given generic function matching the
specified types (as a tuple), on the specified arguments. The
arguments must be compatible with the specified types. This allows
invoking a method other than the most specific matching method,
which is useful when the behavior of a more general definition is
explicitly needed (often as part of the implementation of a more
specific method of the same function).
"),
("Generic Functions","Base","|","|(x, f)
Applies a function to the preceding argument which allows for easy
function chaining.
**Example**: \"[1:5] | x->x.^2 | sum | inv\"
"),
("Iteration","Base","start","start(iter) -> state
Get initial iteration state for an iterable object
"),
("Iteration","Base","done","done(iter, state) -> Bool
Test whether we are done iterating
"),
("Iteration","Base","next","next(iter, state) -> item, state
For a given iterable object and iteration state, return the current
item and the next iteration state
"),
("Iteration","Base","zip","zip(iters...)
For a set of iterable objects, returns an iterable of tuples, where
the \"i\"th tuple contains the \"i\"th component of each input
iterable.
Note that \"zip\" is it's own inverse: \"[zip(zip(a...)...)...] ==
[a...]\".
"),
("Iteration","Base","enumerate","enumerate(iter)
Return an iterator that yields \"(i, x)\" where \"i\" is an index
starting at 1, and \"x\" is the \"ith\" value from the given
iterator.
"),
("General Collections","Base","isempty","isempty(collection) -> Bool
Determine whether a collection is empty (has no elements).
"),
("General Collections","Base","empty!","empty!(collection) ->
collection
Remove all elements from a collection.
"),
("General Collections","Base","length","length(collection) -> Integer
For ordered, indexable collections, the maximum index \"i\" for
which \"getindex(collection, i)\" is valid. For unordered
collections, the number of elements.
"),
("General Collections","Base","endof","endof(collection) -> Integer
Returns the last index of the collection.
**Example**: \"endof([1,2,4]) = 3\"
"),
("Iterable Collections","Base","contains","contains(itr, x) -> Bool
Determine whether a collection contains the given value, \"x\".
"),
("Iterable Collections","Base","findin","findin(a, b)
Returns the indices of elements in collection \"a\" that appear in
collection \"b\"
"),
("Iterable Collections","Base","unique","unique(itr)
Returns an array containing only the unique elements of the
iterable \"itr\".
"),
("Iterable Collections","Base","reduce","reduce(op, v0, itr)
Reduce the given collection with the given operator, i.e.
accumulate \"v = op(v,elt)\" for each element, where \"v\" starts
as \"v0\". Reductions for certain commonly-used operators are
available in a more convenient 1-argument form: \"max(itr)\",
\"min(itr)\", \"sum(itr)\", \"prod(itr)\", \"any(itr)\",
\"all(itr)\".
"),
("Iterable Collections","Base","max","max(itr)
Returns the largest element in a collection
"),
("Iterable Collections","Base","min","min(itr)
Returns the smallest element in a collection
"),
("Iterable Collections","Base","indmax","indmax(itr) -> Integer
Returns the index of the maximum element in a collection
"),
("Iterable Collections","Base","indmin","indmin(itr) -> Integer
Returns the index of the minimum element in a collection
"),
("Iterable Collections","Base","findmax","findmax(itr) -> (x, index)
Returns the maximum element and its index
"),
("Iterable Collections","Base","findmin","findmin(itr) -> (x, index)
Returns the minimum element and its index
"),
("Iterable Collections","Base","sum","sum(itr)
Returns the sum of all elements in a collection
"),
("Iterable Collections","Base","prod","prod(itr)
Returns the product of all elements of a collection
"),
("Iterable Collections","Base","any","any(itr) -> Bool
Test whether any elements of a boolean collection are true
"),
("Iterable Collections","Base","all","all(itr) -> Bool
Test whether all elements of a boolean collection are true
"),
("Iterable Collections","Base","count","count(itr) -> Integer
Count the number of boolean elements in \"itr\" which are true.
"),
("Iterable Collections","Base","countp","countp(p, itr) -> Integer
Count the number of elements in \"itr\" for which predicate \"p\"
is true.
"),
("Iterable Collections","Base","any","any(p, itr) -> Bool
Determine whether any element of \"itr\" satisfies the given
predicate.
"),
("Iterable Collections","Base","all","all(p, itr) -> Bool
Determine whether all elements of \"itr\" satisfy the given
predicate.
"),
("Iterable Collections","Base","map","map(f, c) -> collection
Transform collection \"c\" by applying \"f\" to each element.
**Example**: \"map((x) -> x * 2, [1, 2, 3]) = [2, 4, 6]\"
"),
("Iterable Collections","Base","map!","map!(function, collection)
In-place version of \"map()\".
"),
("Iterable Collections","Base","mapreduce","mapreduce(f, op, itr)
Applies function \"f\" to each element in \"itr\" and then reduces
the result using the binary function \"op\".
**Example**: \"mapreduce(x->x^2, +, [1:3]) == 1 + 4 + 9 == 14\"
"),
("Iterable Collections","Base","first","first(coll)
Get the first element of an ordered collection.
"),
("Iterable Collections","Base","last","last(coll)
Get the last element of an ordered collection.
"),
("Indexable Collections","Base","getindex","getindex(collection,
key...)
Retrieve the value(s) stored at the given key or index within a
collection. The syntax \"a[i,j,...]\" is converted by the compiler
to \"getindex(a, i, j, ...)\".
"),
("Indexable Collections","Base","setindex!","setindex!(collection,
value, key...)
Store the given value at the given key or index within a
collection. The syntax \"a[i,j,...] = x\" is converted by the
compiler to \"setindex!(a, x, i, j, ...)\".
"),
("Associative Collections","Base","Dict{K,V}","Dict{K,V}()
Construct a hashtable with keys of type K and values of type V
"),
("Associative Collections","Base","has","has(collection, key)
Determine whether a collection has a mapping for a given key.
"),
("Associative Collections","Base","get","get(collection, key, default)
Return the value stored for the given key, or the given default
value if no mapping for the key is present.
"),
("Associative Collections","Base","getkey","getkey(collection, key,
default)
Return the key matching argument \"key\" if one exists in
\"collection\", otherwise return \"default\".
"),
("Associative Collections","Base","delete!","delete!(collection, key)
Delete the mapping for the given key in a collection.
"),
("Associative Collections","Base","keys","keys(collection)
Return an array of all keys in a collection.
"),
("Associative Collections","Base","values","values(collection)
Return an array of all values in a collection.
"),
("Associative Collections","Base","collect","collect(collection)
Return an array of all items in a collection. For associative
collections, returns (key, value) tuples.
"),
("Associative Collections","Base","merge","merge(collection,
others...)
Construct a merged collection from the given collections.
"),
("Associative Collections","Base","merge!","merge!(collection,
others...)
Update collection with pairs from the other collections
"),
("Associative Collections","Base","filter","filter(function,
collection)
Return a copy of collection, removing (key, value) pairs for which
function is false.
"),
("Associative Collections","Base","filter!","filter!(function,
collection)
Update collection, removing (key, value) pairs for which function
is false.
"),
("Associative Collections","Base","eltype","eltype(collection)
Returns the type tuple of the (key,value) pairs contained in
collection.
"),
("Associative Collections","Base","sizehint","sizehint(s, n)
Suggest that collection \"s\" reserve capacity for at least \"n\"
elements. This can improve performance.
"),
("Set-Like Collections","Base","add!","add!(collection, key)
Add an element to a set-like collection.
"),
("Set-Like Collections","Base","add_each!","add_each!(collection,
iterable)
Adds each element in iterable to the collection.
"),
("Set-Like Collections","Base","Set","Set(x...)
Construct a \"Set\" with the given elements. Should be used instead
of \"IntSet\" for sparse integer sets.
"),
("Set-Like Collections","Base","IntSet","IntSet(i...)
Construct an \"IntSet\" of the given integers. Implemented as a bit
string, and therefore good for dense integer sets.
"),
("Set-Like Collections","Base","union","union(s1, s2...)
Construct the union of two or more sets. Maintains order with
arrays.
"),
("Set-Like Collections","Base","union!","union!(s1, s2)
Constructs the union of IntSets s1 and s2, stores the result in
\"s1\".
"),
("Set-Like Collections","Base","intersect","intersect(s1, s2...)
Construct the intersection of two or more sets. Maintains order
with arrays.
"),
("Set-Like Collections","Base","setdiff","setdiff(s1, s2)
Construct the set of elements in \"s1\" but not \"s2\". Maintains
order with arrays.
"),
("Set-Like Collections","Base","symdiff","symdiff(s1, s2...)
Construct the symmetric difference of elements in the passed in
sets or arrays. Maintains order with arrays.
"),
("Set-Like Collections","Base","symdiff!","symdiff!(s, n)
IntSet s is destructively modified to toggle the inclusion of
integer \"n\".
"),
("Set-Like Collections","Base","symdiff!","symdiff!(s, itr)
For each element in \"itr\", destructively toggle its inclusion in
set \"s\".
"),
("Set-Like Collections","Base","symdiff!","symdiff!(s1, s2)
Construct the symmetric difference of IntSets \"s1\" and \"s2\",
storing the result in \"s1\".
"),
("Set-Like Collections","Base","complement","complement(s)
Returns the set-complement of IntSet s.
"),
("Set-Like Collections","Base","complement!","complement!(s)
Mutates IntSet s into its set-complement.
"),
("Set-Like Collections","Base","del_each!","del_each!(s, itr)
Deletes each element of itr in set s in-place.
"),
("Set-Like Collections","Base","intersect!","intersect!(s1, s2)
Intersects IntSets s1 and s2 and overwrites the set s1 with the
result. If needed, s1 will be expanded to the size of s2.
"),
("Dequeues","Base","push!","push!(collection, item) -> collection
Insert an item at the end of a collection.
"),
("Dequeues","Base","pop!","pop!(collection) -> item
Remove the last item in a collection and return it.
"),
("Dequeues","Base","unshift!","unshift!(collection, item) ->
collection
Insert an item at the beginning of a collection.
"),
("Dequeues","Base","shift!","shift!(collection) -> item
Remove the first item in a collection.
"),
("Dequeues","Base","insert!","insert!(collection, index, item)
Insert an item at the given index.
"),
("Dequeues","Base","delete!","delete!(collection, index) -> item
Remove the item at the given index, and return the deleted item.
"),
("Dequeues","Base","delete!","delete!(collection, range) -> items
Remove items at specified range, and return a collection containing
the deleted items.
"),
("Dequeues","Base","resize!","resize!(collection, n) -> collection
Resize collection to contain \"n\" elements.
"),
("Dequeues","Base","append!","append!(collection, items) -> collection
Add the elements of \"items\" to the end of a collection.
"),
("Strings","Base","length","length(s)
The number of characters in string \"s\".
"),
("Strings","Base","*","*(s, t)