Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Thing » Dictionary
next | previous | forward | backward | up | index | toc

Dictionary -- the class of all dictionaries

Description

A dictionary is a special sort of hash table whose keys are the strings, and whose values are the corresponding symbols.
i1 : Core.Dictionary # "sin"

o1 = sin

o1 : Symbol
i2 : Core.Dictionary #? "sin"

o2 = true

Menu

Types of dictionary:

Methods that use a dictionary:

  • # Dictionary -- see # List -- length or cardinality of a list, hash table, dictionary, set, or string
  • Dictionary #? String -- see #? -- check existence of value in a list, hash table, database, or string
  • applyPairs(Dictionary,Function) -- see applyPairs -- apply a function to each pair in a hash table
  • keys(Dictionary) -- see keys -- keys used in a hash table, dictionary, or database
  • length(Dictionary) -- length of a dictionary
  • Dictionary # String -- see List # ZZ -- get value from list, hash table, database, dictionary, or string
  • listSymbols(Dictionary) -- see listSymbols -- compact display of symbols and their values
  • localDictionaries(Dictionary) -- see localDictionaries -- get local dictionaries
  • package(Dictionary) -- see package -- get containing package
  • pairs(Dictionary) -- see pairs -- list the pairs in a hash table, dictionary, or basic list
  • values(Dictionary) -- see values -- values in a hash table

For the programmer

The object Dictionary is a type, with ancestor class Thing.


The source of this document is in Macaulay2Doc/ov_repl.m2:755:0.