File: options-doc.m2

package info (click to toggle)
macaulay2 1.24.11%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 171,648 kB
  • sloc: cpp: 107,850; ansic: 16,307; javascript: 4,188; makefile: 3,947; lisp: 682; yacc: 604; sh: 476; xml: 177; perl: 114; lex: 65; python: 33
file content (70 lines) | stat: -rw-r--r-- 1,521 bytes parent folder | download | duplicates (2)
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
--- status:
--- author(s):
--- notes:

doc ///
Node
  Key
    options
  Headline
    get options
  SeeAlso
    Option

Node
  Key
    Option
  Headline
    the class of all key-value pairs K => V
  Description
    Text
      Such pairs are used as optional arguments for functions.
    Example
      o = Limit => 5
      peek o
    Text
      There is also a way to make new @TO2{HashTable, "hash tables"}@ from lists of key-value pairs.
    Example
      ht = new HashTable from {a => 5, b => 7}
      keys ht
      values ht
      pairs ht
    Text
      These pairs are implemented as lists, so that if {\tt z} is {\tt x => y},
      then {\tt x} is {\tt z#0} and {\tt y} is {\tt z#1}.
    Example
      o#0
      o#1
  SeeAlso
    (NewFromMethod, HashTable, List)
    (symbol=>, Thing, Thing)
    options

Node
  Key
    (options, Command)
    (options, Function)
    (options, Sequence)
    (options, ZZ)
  Headline
    get optional arguments and default values of functions and methods
  Usage
    options f
  Inputs
    f:{Command,Function,Sequence,ZZ}
  Outputs
    :{OptionTable,Boolean}
  Description
    Text
      The keys of the output are the names of the optional arguments accepted by
      the function {\tt f} and the values are the corresponding default values;
      or @TO "true"@, if the function accepts arbitrary options and provides no default values.
    Example
      options res
      options codim
      options(codim, Ideal)
      methods intersect
      options 0
  SeeAlso
    methods
///