SIMPOL Documentation

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 me, function compare )

Parameters

ParameterDefault valueType nameDescription
meNonefastset
compareNonefunction

Properties

PropertyTypeDescription
_privatefastsetprivate
addfunction
addelementfunction
clearfunction
comparefunction
countinteger
deletefunction
deleteelementfunction
differencefunction
distinctboolean
findfunction
findelementbykeyfunction
getcountfunction
getfirstfunction
getlastfunction
getmaxdepthfunction
insertfunction
intersectfunction
setdistinctfunction
totalcountinteger
typetype
unitefunction

Methods

add()

Description

Prototype

fastsetvar.add ( fastset me, anyvalue key, type(*) data )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
keyNoneanyvalue
dataNonetype(*)

addelement()

Description

Prototype

fastsetvar.addelement ( fastset me, anyvalue key, type(*) data )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
keyNoneanyvalue
dataNonetype(*)

clear()

Description

Prototype

fastsetvar.clear ( fastset me )

Parameters
ParameterDefault valueType nameDescription
meNonefastset

delete()

Description

Prototype

fastsetvar.delete ( fastset me, fastsetnode node )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
nodeNonefastsetnode

deleteelement()

Description

Prototype

fastsetvar.deleteelement ( fastset me, fastsetnode node )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
nodeNonefastsetnode

difference()

Description

Prototype

fastsetvar.difference ( fastset me, fastset t )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
tNonefastset

find()

Description

Prototype

fastsetvar.find ( fastset me, anyvalue key )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
keyNoneanyvalue

findelementbykey()

Description

Prototype

fastsetvar.findelementbykey ( fastset me, anyvalue key )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
keyNoneanyvalue

getcount()

Description

Prototype

fastsetvar.getcount ( fastset me, anyvalue key )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
keyNoneanyvalue

getfirst()

Description

Prototype

fastsetvar.getfirst ( fastset me )

Parameters
ParameterDefault valueType nameDescription
meNonefastset

getlast()

Description

Prototype

fastsetvar.getlast ( fastset me )

Parameters
ParameterDefault valueType nameDescription
meNonefastset

getmaxdepth()

Description

Prototype

fastsetvar.getmaxdepth ( fastset me )

Parameters
ParameterDefault valueType nameDescription
meNonefastset

insert()

Description

Prototype

fastsetvar.insert ( fastset me, anyvalue key, type(*) data )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
keyNoneanyvalue
dataNonetype(*)

intersect()

Description

Prototype

fastsetvar.intersect ( fastset me, fastset t )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
tNonefastset

setdistinct()

Description

Prototype

fastsetvar.setdistinct ( fastset me, boolean distinct )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
distinctNoneboolean

unite()

Description

Prototype

fastsetvar.unite ( fastset me, fastset t )

Parameters
ParameterDefault valueType nameDescription
meNonefastset
tNonefastset