Summary
###########################################################################
File: mset.icn
Subject: Procedures for multi-sets
Author: Jan P. de Ruiter
Date: January 3, 1994
###########################################################################
This file is in the public domain.
###########################################################################
The idea of the mset type is that no two identical data-structures can be
present in a set, where identity is defined as "containing the same
elements".
Definitions implicit in the procedure same_value(..,..):
TYPE IDENTITY TEST
all types === and if this test fails...
integer =
real =
cset, string ==
record all fields have same value
list all elements are the same, including ordering
table same keys, and every key has the same associated value
set contain the same elements
###########################################################################
Procedures:
delete2, insert2, member2, reduce2, same_elements, same_value
This file is part of the (main) package.
Source code.
delete2(S, el)
The new delete operation, that detects equal-valued elements.
Always succeeds
insert2(S, el)
The new insert operation. Insert2 always succeeds
member2(S, el)
The new member operation, that also detects equal-valued elements
reduce2(iset)
conversion of standard icon set into new mset.
same_elements(l1, l2)
same_value(d1, d2)
This is the core routine.
It succeeds if two things have the same value(s).
This page produced by UniDoc on 2021/04/15 @ 23:59:54.