Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/smlnj-lib/Doc/mldoc/atom.mldoc
ViewVC logotype

View of /sml/trunk/src/smlnj-lib/Doc/mldoc/atom.mldoc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (download) (annotate)
Sat Oct 4 23:33:09 1997 UTC (21 years, 11 months ago) by monnier
File size: 1900 byte(s)
Initial revision
<!-- atom.mldoc -->

<!DOCTYPE ML-DOC SYSTEM>

<COPYRIGHT OWNER="AT&AMP;T Bell Laboratories" YEAR=1996>
<VERSION VERID="1.0" YEAR=1996 MONTH=5 DAY=29>
<TITLE>The ATOM signature</TITLE>

<SECT>
<HEAD>The <CD/ATOM/ signature</HEAD>

<PP>
The <STRREF TOPID NOLINK/Atom/ structure provides hashed strings with
fast equality testing.

<STRUCTURE STRID="Atom">
  <SIGBODY SIGID="ATOM" FILE=ATOM-SIG>
    <SPEC>
      <TYPE><ID>atom
      <COMMENT>
	Atoms are hashed strings that support fast equality testing.
    <SPEC>
      <VAL>atom<TY>string -> atom
        <COMMENT>
          <PROTOTY>
          atom <ARG/s/
          </PROTOTY>
          creates an atom out of the string <ARG/s/.
	  Two calls to <VALREF NOLINK/atom/ with the same argument will
	  return the same atom.
    <SPEC>
      <VAL>toString<TY>atom -> string
        <COMMENT>
          <PROTOTY>
          toString <ARG/at/
          </PROTOTY>
          returns the string that the atom <ARG/at/ was created from.
    <SPEC>
      <VAL>sameAtom<TY>(atom * atom) -> bool
        <COMMENT>
          <PROTOTY>
          sameAtom (<ARG/at1/, <ARG/at2/)
          </PROTOTY>
          returns <CD/true/, if the two atoms are the same.
	  This is a constant-time equality test.
    <SPEC>
      <VAL>compare<TY>(atom * atom) -> order
        <COMMENT>
          <PROTOTY>
          compare (<ARG/at/, <ARG/at2/)
          </PROTOTY>
          returns the relative order of the two atoms according to some
	  internal ordering.
	  Note that this is <EM/not/ the lexical ordering of the string
	  representations of the atoms.
    <SPEC>
      <VAL>hash<TY>atom -> word
        <COMMENT>
          <PROTOTY>
          hash <ARG/at/
          </PROTOTY>
          returns a hash value for the atom <ARG/at/.
  </SIGBODY>
  <SEEALSO>
    <STRREF TOPID/AtomMap/
    <STRREF TOPID/AtomSet/
    <STRREF TOPID/AtomTable/
  </SEEALSO>
</STRUCTURE>

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0