Chapter 34. fastset
This library implements the fastset object. It uses red-black binary trees to provide a set implementation that can be used in place of the internal set type if the functionality required (string sorting of complex objects) is required.
fastset
Description
Type Tags
None
Object Value
Objects of type fastset have no value, and it is an error to try to get or set this value.
fastset.new()
Description
Prototype
fastset
.new
(
fastset
,
function me
)
compare
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
compare | None | function |
Properties
Property | Type | Description |
---|---|---|
_private | fastsetprivate | |
add | function | |
addelement | function | |
clear | function | |
compare | function | |
count | integer | |
delete | function | |
deleteelement | function | |
difference | function | |
distinct | boolean | |
find | function | |
findelementbykey | function | |
getcount | function | |
getfirst | function | |
getlast | function | |
getmaxdepth | function | |
insert | function | |
intersect | function | |
setdistinct | function | |
totalcount | integer | |
type | type | |
unite | function |
Methods
add()
Description
Prototype
fastsetvar
.add
(
fastset
,
anyvalue me
,
type(*) key
)
data
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
key | None | anyvalue | |
data | None | type(*) |
addelement()
Description
Prototype
fastsetvar
.addelement
(
fastset
,
anyvalue me
,
type(*) key
)
data
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
key | None | anyvalue | |
data | None | type(*) |
clear()
Description
Prototype
fastsetvar
.clear
(
fastset
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset |
delete()
Description
Prototype
fastsetvar
.delete
(
fastset
,
fastsetnode me
)
node
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
node | None | fastsetnode |
deleteelement()
Description
Prototype
fastsetvar
.deleteelement
(
fastset
,
fastsetnode me
)
node
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
node | None | fastsetnode |
difference()
Description
Prototype
fastsetvar
.difference
(
fastset
,
fastset me
)
t
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
t | None | fastset |
find()
Description
Prototype
fastsetvar
.find
(
fastset
,
anyvalue me
)
key
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
key | None | anyvalue |
findelementbykey()
Description
Prototype
fastsetvar
.findelementbykey
(
fastset
,
anyvalue me
)
key
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
key | None | anyvalue |
getcount()
Description
Prototype
fastsetvar
.getcount
(
fastset
,
anyvalue me
)
key
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
key | None | anyvalue |
getfirst()
Description
Prototype
fastsetvar
.getfirst
(
fastset
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset |
getlast()
Description
Prototype
fastsetvar
.getlast
(
fastset
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset |
getmaxdepth()
Description
Prototype
fastsetvar
.getmaxdepth
(
fastset
)
me
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset |
insert()
Description
Prototype
fastsetvar
.insert
(
fastset
,
anyvalue me
,
type(*) key
)
data
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
key | None | anyvalue | |
data | None | type(*) |
intersect()
Description
Prototype
fastsetvar
.intersect
(
fastset
,
fastset me
)
t
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
t | None | fastset |
setdistinct()
Description
Prototype
fastsetvar
.setdistinct
(
fastset
,
boolean me
)
distinct
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
distinct | None | boolean |
unite()
Description
Prototype
fastsetvar
.unite
(
fastset
,
fastset me
)
t
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
me | None | fastset | |
t | None | fastset |