diff options
author | Björn Gustavsson <[email protected]> | 2016-06-13 12:33:50 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-06-13 12:33:50 +0200 |
commit | 1280c70da91b90592ae4be88f1f045956e716de7 (patch) | |
tree | 42a0b48e54a9b5c982ce606b8c7e7ff9c564ade6 /lib/stdlib/doc/src/sets.xml | |
parent | 3873cb650711342aced0036e3c2d640df8a73c4b (diff) | |
parent | 68d53c01b0b8e9a007a6a30158c19e34b2d2a34e (diff) | |
download | otp-1280c70da91b90592ae4be88f1f045956e716de7.tar.gz otp-1280c70da91b90592ae4be88f1f045956e716de7.tar.bz2 otp-1280c70da91b90592ae4be88f1f045956e716de7.zip |
Merge branch 'bjorn/stdlib/doc'
* bjorn/stdlib/doc:
Update STDLIB documentation
Diffstat (limited to 'lib/stdlib/doc/src/sets.xml')
-rw-r--r-- | lib/stdlib/doc/src/sets.xml | 161 |
1 files changed, 91 insertions, 70 deletions
diff --git a/lib/stdlib/doc/src/sets.xml b/lib/stdlib/doc/src/sets.xml index 531d18fbef..f7668af1ed 100644 --- a/lib/stdlib/doc/src/sets.xml +++ b/lib/stdlib/doc/src/sets.xml @@ -24,21 +24,23 @@ <title>sets</title> <prepared>Robert Virding</prepared> - <responsible>Bjarne Dacker</responsible> + <responsible>Bjarne Däcker</responsible> <docno>1</docno> <approved>Bjarne Däcker</approved> <checked></checked> - <date>99-07-27</date> + <date>1999-07-27</date> <rev>A</rev> - <file>sets.sgml</file> + <file>sets.xml</file> </header> <module>sets</module> - <modulesummary>Functions for Set Manipulation</modulesummary> + <modulesummary>Functions for set manipulation.</modulesummary> <description> <p>Sets are collections of elements with no duplicate elements. - The representation of a set is not defined.</p> - <p>This module provides exactly the same interface as the module - <c>ordsets</c> but with a defined representation. One difference is + The representation of a set is undefined.</p> + + <p>This module provides the same interface as the + <seealso marker="ordsets"><c>ordsets(3)</c></seealso> module + but with a defined representation. One difference is that while this module considers two elements as different if they do not match (<c>=:=</c>), <c>ordsets</c> considers two elements as different if and only if they do not compare equal (<c>==</c>).</p> @@ -47,151 +49,170 @@ <datatypes> <datatype> <name name="set" n_vars="1"/> - <desc><p>As returned by <c>new/0</c>.</p></desc> + <desc><p>As returned by + <seealso marker="#new/0"><c>new/0</c></seealso>.</p></desc> </datatype> <datatype> <name name="set" n_vars="0"/> </datatype> </datatypes> + <funcs> <func> - <name name="new" arity="0"/> - <fsummary>Return an empty set</fsummary> + <name name="add_element" arity="2"/> + <fsummary>Add an element to a <c>Set</c>.</fsummary> <desc> - <p>Returns a new empty set.</p> + <p>Returns a new set formed from <c><anno>Set1</anno></c> with + <c><anno>Element</anno></c> inserted.</p> </desc> </func> + <func> - <name name="is_set" arity="1"/> - <fsummary>Test for a <c>Set</c></fsummary> + <name name="del_element" arity="2"/> + <fsummary>Remove an element from a <c>Set</c>.</fsummary> <desc> - <p>Returns <c>true</c> if <c><anno>Set</anno></c> is a set of - elements, otherwise <c>false</c>.</p> + <p>Returns <c><anno>Set1</anno></c>, but with + <c><anno>Element</anno></c> removed.</p> </desc> </func> + <func> - <name name="size" arity="1"/> - <fsummary>Return the number of elements in a set</fsummary> + <name name="filter" arity="2"/> + <fsummary>Filter set elements.</fsummary> <desc> - <p>Returns the number of elements in <c><anno>Set</anno></c>.</p> + <p>Filters elements in <c><anno>Set1</anno></c> with boolean function + <c><anno>Pred</anno></c>.</p> </desc> </func> + <func> - <name name="to_list" arity="1"/> - <fsummary>Convert a <c>Set</c>into a list</fsummary> + <name name="fold" arity="3"/> + <fsummary>Fold over set elements.</fsummary> <desc> - <p>Returns the elements of <c><anno>Set</anno></c> as a list. - The order of the returned elements is undefined.</p> + <p>Folds <c><anno>Function</anno></c> over every element in + <c><anno>Set</anno></c> and returns the final value of the + accumulator. The evaluation order is undefined.</p> </desc> </func> + <func> <name name="from_list" arity="1"/> - <fsummary>Convert a list into a <c>Set</c></fsummary> + <fsummary>Convert a list into a <c>Set</c>.</fsummary> <desc> <p>Returns a set of the elements in <c><anno>List</anno></c>.</p> </desc> </func> + <func> - <name name="is_element" arity="2"/> - <fsummary>Test for membership of a <c>Set</c></fsummary> + <name name="intersection" arity="1"/> + <fsummary>Return the intersection of a list of <c>Sets</c>.</fsummary> <desc> - <p>Returns <c>true</c> if <c><anno>Element</anno></c> is an element of - <c><anno>Set</anno></c>, otherwise <c>false</c>.</p> + <p>Returns the intersection of the non-empty list of sets.</p> </desc> </func> + <func> - <name name="add_element" arity="2"/> - <fsummary>Add an element to a <c>Set</c></fsummary> + <name name="intersection" arity="2"/> + <fsummary>Return the intersection of two <c>Sets</c>.</fsummary> <desc> - <p>Returns a new set formed from <c><anno>Set1</anno></c> with - <c><anno>Element</anno></c> inserted.</p> + <p>Returns the intersection of <c><anno>Set1</anno></c> and + <c><anno>Set2</anno></c>.</p> </desc> </func> + <func> - <name name="del_element" arity="2"/> - <fsummary>Remove an element from a <c>Set</c></fsummary> + <name name="is_disjoint" arity="2"/> + <fsummary>Check whether two <c>Sets</c> are disjoint.</fsummary> <desc> - <p>Returns <c><anno>Set1</anno></c>, but with <c><anno>Element</anno></c> removed.</p> + <p>Returns <c>true</c> if <c><anno>Set1</anno></c> and + <c><anno>Set2</anno></c> are disjoint (have no elements in common), + otherwise <c>false</c>.</p> </desc> </func> + <func> - <name name="union" arity="2"/> - <fsummary>Return the union of two <c>Sets</c></fsummary> + <name name="is_element" arity="2"/> + <fsummary>Test for membership of a <c>Set</c>.</fsummary> <desc> - <p>Returns the merged (union) set of <c><anno>Set1</anno></c> and - <c><anno>Set2</anno></c>.</p> + <p>Returns <c>true</c> if <c><anno>Element</anno></c> is an element of + <c><anno>Set</anno></c>, otherwise <c>false</c>.</p> </desc> </func> + <func> - <name name="union" arity="1"/> - <fsummary>Return the union of a list of <c>Sets</c></fsummary> + <name name="is_set" arity="1"/> + <fsummary>Test for a <c>Set</c>.</fsummary> <desc> - <p>Returns the merged (union) set of the list of sets.</p> + <p>Returns <c>true</c> if <c><anno>Set</anno></c> is a set of + elements, otherwise <c>false</c>.</p> </desc> </func> + <func> - <name name="intersection" arity="2"/> - <fsummary>Return the intersection of two <c>Sets</c></fsummary> + <name name="is_subset" arity="2"/> + <fsummary>Test for subset.</fsummary> <desc> - <p>Returns the intersection of <c><anno>Set1</anno></c> and - <c><anno>Set2</anno></c>.</p> + <p>Returns <c>true</c> when every element of <c><anno>Set1</anno></c> is + also a member of <c><anno>Set2</anno></c>, otherwise <c>false</c>.</p> </desc> </func> + <func> - <name name="intersection" arity="1"/> - <fsummary>Return the intersection of a list of <c>Sets</c></fsummary> + <name name="new" arity="0"/> + <fsummary>Return an empty set.</fsummary> <desc> - <p>Returns the intersection of the non-empty list of sets.</p> + <p>Returns a new empty set.</p> </desc> </func> + <func> - <name name="is_disjoint" arity="2"/> - <fsummary>Check whether two <c>Sets</c> are disjoint</fsummary> + <name name="size" arity="1"/> + <fsummary>Return the number of elements in a set.</fsummary> <desc> - <p>Returns <c>true</c> if <c><anno>Set1</anno></c> and - <c><anno>Set2</anno></c> are disjoint (have no elements in common), - and <c>false</c> otherwise.</p> + <p>Returns the number of elements in <c><anno>Set</anno></c>.</p> </desc> </func> + <func> <name name="subtract" arity="2"/> - <fsummary>Return the difference of two <c>Sets</c></fsummary> + <fsummary>Return the difference of two <c>Sets</c>.</fsummary> <desc> - <p>Returns only the elements of <c><anno>Set1</anno></c> which are not + <p>Returns only the elements of <c><anno>Set1</anno></c> that are not also elements of <c><anno>Set2</anno></c>.</p> </desc> </func> + <func> - <name name="is_subset" arity="2"/> - <fsummary>Test for subset</fsummary> + <name name="to_list" arity="1"/> + <fsummary>Convert a <c>Set</c>into a list.</fsummary> <desc> - <p>Returns <c>true</c> when every element of <c><anno>Set1</anno></c>1 is - also a member of <c><anno>Set2</anno></c>, otherwise <c>false</c>.</p> + <p>Returns the elements of <c><anno>Set</anno></c> as a list. + The order of the returned elements is undefined.</p> </desc> </func> + <func> - <name name="fold" arity="3"/> - <fsummary>Fold over set elements</fsummary> + <name name="union" arity="1"/> + <fsummary>Return the union of a list of <c>Sets</c>.</fsummary> <desc> - <p>Fold <c><anno>Function</anno></c> over every element in <c><anno>Set</anno></c> - returning the final value of the accumulator. - The evaluation order is undefined.</p> + <p>Returns the merged (union) set of the list of sets.</p> </desc> </func> + <func> - <name name="filter" arity="2"/> - <fsummary>Filter set elements</fsummary> + <name name="union" arity="2"/> + <fsummary>Return the union of two <c>Sets</c>.</fsummary> <desc> - <p>Filter elements in <c><anno>Set1</anno></c> with boolean function - <c><anno>Pred</anno></c>.</p> + <p>Returns the merged (union) set of <c><anno>Set1</anno></c> and + <c><anno>Set2</anno></c>.</p> </desc> </func> </funcs> <section> <title>See Also</title> - <p><seealso marker="ordsets">ordsets(3)</seealso>, - <seealso marker="gb_sets">gb_sets(3)</seealso></p> + <p><seealso marker="gb_sets"><c>gb_sets(3)</c></seealso>, + <seealso marker="ordsets"><c>ordsets(3)</c></seealso></p> </section> </erlref> |