Tcl Library Source Code

Documentation
Login
EuroTcl/OpenACS 11 - 12 JULY 2024, VIENNA


[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

NAME

struct::set - Procedures for manipulating sets

Table Of Contents

SYNOPSIS

package require Tcl 8.5 9
package require struct::set ?2.2.4?

::struct::set empty set
::struct::set size set
::struct::set contains set item
::struct::set union ?set1...?
::struct::set intersect ?set1...?
::struct::set difference set1 set2
::struct::set symdiff set1 set2
::struct::set intersect3 set1 set2
::struct::set equal set1 set2
::struct::set include svar item
::struct::set exclude svar item
::struct::set add svar set
::struct::set subtract svar set
::struct::set subsetof A B

DESCRIPTION

The ::struct::set namespace contains several useful commands for processing finite sets.

It exports only a single command, struct::set. All functionality provided here can be reached through a subcommand of this command.

Note: As of version 2.2 of this package a critcl based C implementation is available. This implementation however requires Tcl 8.4 to run.

COMMANDS

REFERENCES

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category struct :: set of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide unified diffs, i.e the output of diff -u.

Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.

KEYWORDS

cardinality, difference, emptiness, exclusion, inclusion, intersection, membership, set, symmetric difference, union

CATEGORY

Data structures

COPYRIGHT

Copyright © 2004-2008 Andreas Kupries