The fset Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The fset Reference Manual

This is the fset Reference Manual, version 1.3.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:35:09 2022 GMT+0.

Table of Contents


1 Introduction

Introduction

FSet is a functional set-theoretic collections library. Functional means that all update operations return a new collection rather than modifying an existing one in place. Set-theoretic means that collections may be nested arbitrarily with no additional programmer effort; for instance, sets may contain sets, maps may be keyed by sets, etc.

The FSet home page explains why I chose functional semantics for FSet.

To get started using FSet, check out the FSet Tutorial. Once you've gone through that, I recommend the FSet/CL page, which explains how FSet is integrated into Common Lisp.

For more details, see the FSet project page.

There might be some useful information on the FSet CLiki page.


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 fset

A functional set-theoretic collections library. See: http://www.ergy.com/FSet.html

Author

Scott L. Burson <Scott@ergy.com>

License

LLGPL

Version

1.3.2

Dependencies
  • misc-extensions (system).
  • mt19937 (system).
  • named-readtables (system).
Source

fset.asd.

Child Component

code (module).


Next: , Previous: , Up: The fset Reference Manual   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 fset/Code

Source

fset.asd.

Parent Component

fset (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

4.1.1 fset/fset.asd

Source

fset.asd.

Parent Component

fset (system).

ASDF Systems

fset.


Next: , Previous: , Up: Lisp   [Contents][Index]

4.1.2 fset/Code/defs.lisp

Source

fset.asd.

Parent Component

code (module).

Packages

4.1.3 fset/Code/port.lisp

Dependency

defs.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Internals

4.1.4 fset/Code/macros.lisp

Dependency

port.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.5 fset/Code/order-macros.lisp

Dependency

macros.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

+master-type-ordering+ (symbol macro).


4.1.6 fset/Code/order.lisp

Dependency

order-macros.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.7 fset/Code/wb-trees.lisp

Dependency

order.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.8 fset/Code/reader.lisp

Dependency

wb-trees.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.9 fset/Code/fset-macros.lisp

Dependency

reader.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.10 fset/Code/fset.lisp

Dependency

fset-macros.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.11 fset/Code/tuples.lisp

Dependency

fset.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.12 fset/Code/testing.lisp

Dependency

tuples.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.13 fset/Code/interval.lisp

Dependency

testing.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.14 fset/Code/relations.lisp

Dependency

interval.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.15 fset/Code/complement-sets.lisp

Dependency

relations.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

4.1.16 fset/Code/bounded-sets.lisp

Dependency

complement-sets.lisp (file).

Source

fset.asd.

Parent Component

code (module).

Public Interface
Internals

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 fset-user

Source

defs.lisp.

Use List
  • common-lisp.
  • fset.
  • gmap.
  • lexical-contexts.
  • new-let.

Previous: , Up: Packages   [Contents][Index]

5.2 fset

Source

defs.lisp.

Use List
  • common-lisp.
  • gmap.
  • lexical-contexts.
  • new-let.
Used By List

fset-user.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

6.1.1 Special variables

Special Variable: *fset-readtable*

A copy of the standard readtable with FSet reader macros installed.

Package

fset.

Source

reader.lisp.


6.1.2 Macros

Macro: 2-relation (&rest args)

Constructs a 2-relation of the default implementation according to the supplied argument subforms. Each argument subform can be a list of the form (‘key-expr’ ‘value-expr’), denoting a mapping from the value of ‘key-expr’ to the value of ‘value-expr’; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a 2-relation, all of whose mappings will be included in the result. Also, each of ’key-expr’ and ’value-expr’ can be of the form ($ ‘expression’), in which case the expression must evaluate to a set, and the elements of the set are used individually to form pairs; for example, the result of

(2-relation (($ (set 1 2)) ($ (set ’a ’b))))

contains the pairs <1, a>, <1, b>, <2, a>, and <2, b>.

Package

fset.

Source

relations.lisp.

Macro: @ (fn-or-collection &rest args)

A little hack with two purposes: (1) to make it easy to make FSet maps behave like Lisp functions in certain contexts; and (2) to somewhat lessen the pain of writing higher-order code in a two-namespace Lisp like Common Lisp. The idea is that you can write ‘(@ fn arg)’, and if ‘fn’ is a Lisp function, it will be funcalled on the argument; otherwise ‘lookup’ (q.v.) will be called on ‘fn’ and ‘arg’. To allow for ‘@’ to be used in more contexts, it actually can take any number of ‘args’, though ‘lookup’ always takes exactly two. Thus you can write ‘(@ fn arg1 arg2 ...)’ when you just want a shorter name for ‘funcall’. As a matter of style, it is suggested that ‘@’ be used only for side-effect-free functions. Also, though this doc string has spoken only of FSet maps, ‘@’ can be used with any type that ‘lookup’ works on. Can be used with ‘setf’, but only on collections, not functions, of course.

Package

fset.

Source

fset-macros.lisp.

Setf expander for this macro

(setf @).

Macro: adjoinf (place &rest item-or-tuple)

(adjoinf coll . args) –> (setf coll (with coll . args))

Package

fset.

Source

macros.lisp.

Macro: appendf (place seq)
Package

fset.

Source

macros.lisp.

Macro: bag (&rest args)

Constructs a bag of the default implementation according to the supplied argument subforms. Each argument subform can be an expression, whose value will be added to the bag with multiplicity 1; or a list of the form
($ ‘expression’), in which case the expression must evaluate to a bag (or a set), which is bag-summed into the result; or a list of the form
(% ‘expression1’ ‘expression2’) (called a "multi-arg"), which indicates that the value of ‘expression1’ is bag-summed into the result with multiplicity given by the value of ‘expression2’. That is, the multiplicity of each member of the result bag is the sum of its multiplicities as supplied by each of the argument subforms.

Package

fset.

Source

reader.lisp.

Macro: compare-slots (obj1 obj2 &rest accessors)

A handy macro for writing the bodies of ‘compare’ methods for user classes. Returns the result of comparing the two objects by comparing the results of calling each of ‘accessors’, in order, on the objects. Despite the name, an accessor can actually be any function on the class in question; it can also be a symbol, which will be used to access the slot via ‘slot-value’. For example, if class ‘frob’ has accessor ‘frob-foo’ and slot ‘bar’:

(defmethod compare ((f1 frob) (f2 frob))
(compare-slots f1 f2 #’frob-foo ’bar))

If the symbol ‘:eql’ is supplied as the last accessor, then if the comparisons by the other supplied accessors all return ‘:equal’ but ‘obj1’ and ‘obj2’ are not eql, this returns ‘:unequal’.

Package

fset.

Source

order-macros.lisp.

Macro: composef (place fn)
Package

fset.

Source

macros.lisp.

Macro: def-tuple-key (name &optional default-fn)

Deprecated; use ‘define-tuple-key’.

Package

fset.

Source

tuples.lisp.

Macro: define-cross-type-compare-methods (type)

Generates cross-type comparison methods for ‘type’ against the types on which the macro has previously been invoked. This macro is intended to be invoked at the top level of a source file. You should make sure that calls to this macro are always compiled in the same order; if you don’t, you could possibly get a "master type ordering out of sync" error, at which point you should delete all your fasls, restart your Lisp session, and recompile. However, the implementation tries very hard to prevent this.

Package

fset.

Source

order-macros.lisp.

Macro: define-tuple-key (name &optional default-fn)

Defines a tuple key named ‘name’ as a global lexical variable (see ‘deflex’). If ‘default-fn’ is supplied, it is used to compute a value for lookups where the tuple has no explicit pair with this key; it is called with one argument, the tuple.

Package

fset.

Source

tuples.lisp.

Macro: do-2-relation ((key val br &optional value) &body body)

Enumerates all pairs of the relation ‘br’, binding them successively to ‘key’ and ‘val’ and executing ‘body’.

Package

fset.

Source

relations.lisp.

Macro: do-bag ((value-var bag &optional value) &body body)

For each member of ‘bag’, binds ‘value-var’ to it and and executes ‘body’ a number of times equal to the member’s multiplicity. When done, returns ‘value’.

Package

fset.

Source

fset-macros.lisp.

Macro: do-bag-pairs ((value-var mult-var bag &optional value) &body body)

For each member of ‘bag’, binds ‘value-var’ and ‘mult-var’ to the member and its multiplicity respectively, and executes ‘body’. When done, returns ‘value’.

Package

fset.

Source

fset-macros.lisp.

Macro: do-list-relation ((tuple rel &optional value) &body body)
Package

fset.

Source

relations.lisp.

Macro: do-map ((key-var value-var map &optional value) &body body)

For each pair of ‘map’, binds ‘key-var’ and ‘value-var’ and executes ‘body’. When done, returns ‘value’.

Package

fset.

Source

fset-macros.lisp.

Macro: do-map-domain ((key-var map &optional value) &body body)

For each pair of ‘map’, binds ‘key-var’ and executes ‘body’. When done, returns ‘value’.

Package

fset.

Source

fset-macros.lisp.

Macro: do-seq ((var seq &key start end from-end? index value) &body body)

For each element of ‘seq’, possibly restricted by ‘start’ and ‘end’, and in reverse order if ‘from-end?’ is true, binds ‘var’ to it and executes ‘body’. If ‘index’ is supplied, it names a variable that will be bound at each iteration to the index of the current element of ‘seq’. When done, returns ‘value’.

Package

fset.

Source

fset-macros.lisp.

Macro: do-set ((var set &optional value) &body body)

For each member of ‘set’, binds ‘var’ to it and executes ‘body’. When done, returns ‘value’.

Package

fset.

Source

fset-macros.lisp.

Macro: do-tuple ((key-var value-var tuple &optional value) &body body)

For each pair of ‘tuple’, binds ‘key-var’ and ‘value-var’ and executes ‘body’. When done, returns ‘value’.

Package

fset.

Source

tuples.lisp.

Macro: dyn-tuple (&rest args)

Constructs a dyn-tuple according to the supplied argument subforms. Each argument subform can be a list of the form (‘key-expr’ ‘value-expr’), denoting a mapping from the value of ‘key-expr’ to the value of ‘value-expr’; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a tuple, denoting all its mappings. The result is constructed from the denoted mappings in left-to-right order; so if a given key is supplied by more than one argument subform, its associated value will be given by the rightmost such subform.

Package

fset.

Source

reader.lisp.

Macro: excludef (place &rest item-or-tuple)

(excludef coll . args) –> (setf coll (less coll . args))

Package

fset.

Source

macros.lisp.

Macro: imagef (place fn)
Package

fset.

Source

macros.lisp.

Macro: includef (place &rest item-or-tuple)

(includef coll . args) –> (setf coll (with coll . args))

Package

fset.

Source

macros.lisp.

Macro: intersectf (place set)
Package

fset.

Source

macros.lisp.

Macro: map (&rest args)

Constructs a map of the default implementation according to the supplied argument subforms. Each argument subform can be a list of the form (‘key-expr’ ‘value-expr’), denoting a mapping from the value of ‘key-expr’ to the value of ‘value-expr’; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a map, denoting all its mappings; or the symbol ‘:default’, in which case the next argument subform is a form whose value will become the map’s default. The result is constructed from the denoted mappings in left-to-right order; so if a given key is supplied by more than one argument subform, its associated value will be given by the rightmost such subform.

Package

fset.

Source

reader.lisp.

Macro: pop-first (seq)

Removes the first element from ‘seq’ and returns it.

Package

fset.

Source

macros.lisp.

Macro: pop-last (seq)

Removes the last element from ‘seq’ and returns it.

Package

fset.

Source

macros.lisp.

Macro: prependf (place seq)
Package

fset.

Source

macros.lisp.

Macro: push-first (place val)

(push-first seq val) –> (setf seq (with-first seq val))

Package

fset.

Source

macros.lisp.

Macro: push-last (place val)

(push-last seq val) –> (setf seq (with-last seq val))

Package

fset.

Source

macros.lisp.

Macro: removef (place &rest item-or-tuple)

(removef coll . args) –> (setf coll (less coll . args))

Package

fset.

Source

macros.lisp.

Macro: seq (&rest args)

Constructs a seq of the default implementation according to the supplied argument subforms. Each argument subform can be an expression whose value is to appear in the sequence; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a sequence, all of whose values appear in the result sequence. The order of the result sequence reflects the order of the argument subforms.

Package

fset.

Source

reader.lisp.

Macro: set (&rest args)

Constructs a set of the default implementation according to the supplied argument subforms. Each argument subform can be an expression, whose value will be a member of the result set; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a set, all of whose members become members of the result set.

Package

fset.

Source

reader.lisp.

Macro: tuple (&rest args)

Constructs a tuple of the default implementation according to the supplied argument subforms. Each argument subform can be a list of the form (‘key-expr’ ‘value-expr’), denoting a mapping from the value of ‘key-expr’ to the value of ‘value-expr’; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a tuple, denoting all its mappings. The result is constructed from the denoted mappings in left-to-right order; so if a given key is supplied by more than one argument subform, its associated value will be given by the rightmost such subform.

Package

fset.

Source

reader.lisp.

Macro: unionf (place set)
Package

fset.

Source

macros.lisp.

Macro: wb-2-relation (&rest args)

Constructs a wb-2-relation according to the supplied argument subforms. Each argument subform can be a list of the form (‘key-expr’ ‘value-expr’), denoting a mapping from the value of ‘key-expr’ to the value of ‘value-expr’; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a 2-relation, all of whose mappings will be included in the result. Also, each of ’key-expr’ and ’value-expr’ can be of the
form ($ ‘expression’), in which case the expression must evaluate to a set, and the elements of the set are used individually to form pairs; for example, the result of

(wb-2-relation (($ (set 1 2)) ($ (set ’a ’b))))

contains the pairs <1, a>, <1, b>, <2, a>, and <2, b>.

Package

fset.

Source

relations.lisp.

Macro: wb-bag (&rest args)

Constructs a wb-bag according to the supplied argument subforms. Each argument subform can be an expression, whose value will be added to the bag with multiplicity 1; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a bag (or a set), which is bag-summed into the result; or a list of the form (% ‘expression1’ ‘expression2’) (called a "multi-arg"), which indicates that the value of ‘expression1’ is bag-summed into the result with multiplicity given by the value of ‘expression2’. That is, the multiplicity of each member of the result bag is the sum of its multiplicities as supplied by each of the argument subforms.

Package

fset.

Source

reader.lisp.

Macro: wb-map (&rest args)

Constructs a wb-map according to the supplied argument subforms. Each argument subform can be a list of the form (‘key-expr’ ‘value-expr’), denoting a mapping from the value of ‘key-expr’ to the value of ‘value-expr’; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a map, denoting all its mappings; or the symbol ‘:default’, in which case the next argument subform is a form whose value will become the map’s default. The result is constructed from the denoted mappings in left-to-right order; so if a given key is supplied by more than one argument subform, its associated value will be given by the rightmost such subform.

Package

fset.

Source

reader.lisp.

Macro: wb-seq (&rest args)

Constructs a wb-seq according to the supplied argument subforms. Each argument subform can be an expression whose value is to appear in the sequence; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a sequence, all of whose values appear in the result sequence. The order of the result sequence reflects the order of the argument subforms.

Package

fset.

Source

reader.lisp.

Macro: wb-set (&rest args)

Constructs a wb-set according to the supplied argument subforms. Each argument subform can be an expression, whose value will be a member of the result set; or a list of the form ($ ‘expression’), in which case the expression must evaluate to a set, all of whose members become members of the result set.

Package

fset.

Source

reader.lisp.


6.1.3 Setf expanders

Setf Expander: (setf @) (collection key)

Adds a pair to a map or updates an existing pair, or adds an element to a sequence or updates an existing element. This does NOT modify the map or sequence; it modifies the place (generalized variable) HOLDING the map or sequence (just like ‘(setf (ldb ...) ...)’). That is, the ‘collection’ subform must be ‘setf’able itself.

Package

fset.

Source

fset.lisp.

Reader

@ (macro).

Setf Expander: (setf lookup) (collection key)

Adds a pair to a map or updates an existing pair, or adds an element to a sequence or updates an existing element. This does NOT modify the map or sequence; it modifies the place (generalized variable) HOLDING the map or sequence (just like ‘(setf (ldb ...) ...)’). That is, the ‘collection’ subform must be ‘setf’able itself.

Package

fset.

Source

fset.lisp.

Reader

lookup (generic function).


6.1.4 Ordinary functions

Function: bag? (object)
Package

fset.

Source

order.lisp.

Function: bounded-set-contents (bs)
Package

fset.

Source

bounded-sets.lisp.

Function: collection? (object)
Package

fset.

Source

order.lisp.

Function: empty-2-relation ()
Package

fset.

Source

relations.lisp.

Function: empty-bag ()

Returns an empty bag of the default implementation.

Package

fset.

Source

fset.lisp.

Function: empty-dyn-tuple ()

Returns an empty dyn-tuple.

Package

fset.

Source

tuples.lisp.

Function: empty-list-relation (&optional arity)

We allow the arity to be temporarily unspecified; it will be taken from the first tuple added, or the first query.

Package

fset.

Source

relations.lisp.

Function: empty-map (&optional default)

Returns an empty map of the default implementation.

Package

fset.

Source

fset.lisp.

Function: empty-query-registry (&optional arity)
Package

fset.

Source

relations.lisp.

Function: empty-seq (&optional default)

Returns an empty seq of the default implementation.

Package

fset.

Source

fset.lisp.

Function: empty-set ()

Returns an empty set of the default implementation.

Package

fset.

Source

fset.lisp.

Function: empty-tuple ()

Returns an empty tuple of the default implementation.

Package

fset.

Source

tuples.lisp.

Function: empty-wb-2-relation ()
Package

fset.

Source

relations.lisp.

Function: empty-wb-bag ()

Returns an empty wb-bag.

Package

fset.

Source

fset.lisp.

Function: empty-wb-list-relation (arity)

We allow the arity to be temporarily unspecified; it will be taken from the first tuple added, or the first query.

Package

fset.

Source

relations.lisp.

Function: empty-wb-map (&optional default)

Returns an empty wb-map.

Package

fset.

Source

fset.lisp.

Function: empty-wb-seq ()

Returns an empty wb-seq.

Package

fset.

Source

fset.lisp.

Function: empty-wb-set ()

Returns an empty wb-set.

Package

fset.

Source

fset.lisp.

Function: equal? (a b)
Package

fset.

Source

order.lisp.

Function: fset-setup-readtable (readtable)

Adds FSet reader macros to ‘readtable’. Returns ‘readtable’.

Package

fset.

Source

reader.lisp.

Function: get-tuple-key (name &optional default-fn)

Finds or creates a tuple key named ‘name’. If the key did not already exist, and ‘default-fn’ is supplied, it is used to compute a value for lookups where the tuple has no explicit pair with this key; it is called with one argument, the tuple.

Package

fset.

Source

tuples.lisp.

Function: head (list)

Another name for the ‘car’ operation on lists.

Package

fset.

Source

fset.lisp.

Function: lastcons (list)

Returns the last cons of ‘list’. This is a renaming of the CL function ‘last’.

Package

fset.

Source

fset.lisp.

Function: make-bounded-set (universe set &optional complement?)
Package

fset.

Source

bounded-sets.lisp.

Reader: map-default (instance)
Writer: (setf map-default) (instance)
Package

fset.

Source

order.lisp.

Target Slot

default.

Function: map? (object)
Package

fset.

Source

order.lisp.

Function: member? (x collection)

Returns true iff ‘x’ is a member of the set or bag. Stylistically, ‘contains?’ is preferred over ‘member?’.

Package

fset.

Source

fset.lisp.

Function: nonempty? (collection)

Returns true iff the collection is not empty.

Package

fset.

Source

fset.lisp.

Function: seq? (object)
Package

fset.

Source

order.lisp.

Function: set? (object)
Package

fset.

Source

order.lisp.

Function: tail (list)

Another name for the ‘cdr’ operation on lists.

Package

fset.

Source

fset.lisp.

Reader: tuple-key-name (instance)
Writer: (setf tuple-key-name) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

name.

Function: tuple-key? (object)
Package

fset.

Source

tuples.lisp.

Function: tuple? (object)
Package

fset.

Source

order.lisp.


6.1.5 Generic functions

Generic Function: all-queries (reg)
Package

fset.

Methods
Method: all-queries ((reg query-registry))
Source

relations.lisp.

Generic Function: arb (collection)

Returns an arbitrary member or pair of a set, bag, or map. Specifically, on a nonempty set, returns two values, an arbitrary member of the set and true; on a nonempty bag, returns an arbitrary member, its multiplicity, and true; on a nonempty map, returns an arbitrary domain member, its associated value, and true. On an empty set, bag, or map, returns false for all values. Please note that "arbitrary" does not mean "randomly selected"; it simply means that the sole postcondition is that the returned value or pair is a member of the collection.

Package

fset.

Source

fset.lisp.

Methods
Method: arb ((bs bounded-set))
Source

bounded-sets.lisp.

Method: arb ((cs complement-set))
Source

complement-sets.lisp.

Method: arb ((rel wb-list-relation))
Source

relations.lisp.

Method: arb ((br wb-2-relation))
Source

relations.lisp.

Method: arb ((m wb-map))
Method: arb ((m wb-bag))
Method: arb ((s wb-set))
Generic Function: arity (rel)

Returns the arity of the relation ‘rel’.

Package

fset.

Source

relations.lisp.

Methods
Method: arity ((reg query-registry))
Method: arity ((rel wb-list-relation))

Will return ‘nil’ if the arity is not yet specified; see ‘empty-list-relation’.

Method: arity ((br 2-relation))
Generic Function: at-rank (collection rank)

On a set, returns the element with rank ‘rank’; on a bag, returns
that element with its multiplicity as a second value; on a map, returns the pair with that rank as two values. Note that if there are values/keys that are unequal but equivalent in the collection, an arbitrary order will be imposed on them for this purpose; but another collection that is ‘equal?’ but not ‘eq’ to this one will in general order them differently.

Package

fset.

Source

fset.lisp.

Methods
Method: at-rank ((s wb-map) rank)
Method: at-rank ((s wb-bag) rank)
Method: at-rank ((s wb-set) rank)
Generic Function: bag-difference (bag1 bag2)

Returns a bag whose multiplicity, for any value, is its multiplicity in ‘bag1’ less that in ‘bag2’, but of course not less than zero.

Package

fset.

Source

fset.lisp.

Methods
Method: bag-difference ((b wb-bag) (s wb-set))
Method: bag-difference ((s wb-set) (b wb-bag))
Method: bag-difference ((b1 wb-bag) (b2 wb-bag))
Generic Function: bag-product (bag1 bag2)

Returns a bag whose multiplicity, for any value, is the product of its multiplicities in the two argument bags.

Package

fset.

Source

fset.lisp.

Methods
Method: bag-product ((b wb-bag) (s wb-set))
Method: bag-product ((s wb-set) (b wb-bag))
Method: bag-product ((b1 wb-bag) (b2 wb-bag))
Generic Function: bag-sum (bag1 bag2)

Returns a bag whose multiplicity, for any value, is the sum of its multiplicities in the two argument bags.

Package

fset.

Source

fset.lisp.

Methods
Method: bag-sum ((b wb-bag) (s wb-set))
Method: bag-sum ((s wb-set) (b wb-bag))
Method: bag-sum ((b1 wb-bag) (b2 wb-bag))
Generic Function: compare (x y)

Returns one of ‘:less’, ‘:greater’, ‘:equal’, or ‘:unequal’ according as ‘x’ is less than, greater than, or equal to ‘y’, or none of these. While the ordering does not have to be total, it must be consistent: for two values A and B that compare ‘:unequal’ to each other, for any third value C, if A compares ‘:less’ or ‘:greater’ to C, then B must compare to C the same way; and no more than one of A and B can compare ‘:equal’ to C.

Package

fset.

Source

order.lisp.

Methods
Method: compare ((s set) (bs bounded-set))
Source

bounded-sets.lisp.

Method: compare ((bs bounded-set) (s set))
Source

bounded-sets.lisp.

Method: compare ((bs1 bounded-set) (bs2 bounded-set))
Source

bounded-sets.lisp.

Method: compare ((s set) (cs complement-set))
Source

complement-sets.lisp.

Method: compare ((cs complement-set) (s set))
Source

complement-sets.lisp.

Method: compare ((cs1 complement-set) (cs2 complement-set))
Source

complement-sets.lisp.

Method: compare ((a wb-2-relation) (b wb-2-relation))
Source

relations.lisp.

Method: compare ((a relation) (b null))
Source

relations.lisp.

Method: compare ((a null) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b real))
Source

relations.lisp.

Method: compare ((a real) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b complex))
Source

relations.lisp.

Method: compare ((a complex) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b character))
Source

relations.lisp.

Method: compare ((a character) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b symbol))
Source

relations.lisp.

Method: compare ((a symbol) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b string))
Source

relations.lisp.

Method: compare ((a string) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b vector))
Source

relations.lisp.

Method: compare ((a vector) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b list))
Source

relations.lisp.

Method: compare ((a list) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b package))
Source

relations.lisp.

Method: compare ((a package) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b pathname))
Source

relations.lisp.

Method: compare ((a pathname) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b set))
Source

relations.lisp.

Method: compare ((a set) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b bag))
Source

relations.lisp.

Method: compare ((a bag) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b map))
Source

relations.lisp.

Method: compare ((a map) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b seq))
Source

relations.lisp.

Method: compare ((a seq) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b tuple))
Source

relations.lisp.

Method: compare ((a tuple) (b relation))
Source

relations.lisp.

Method: compare ((a relation) (b identity-ordering-mixin))
Source

relations.lisp.

Method: compare ((a identity-ordering-mixin) (b relation))
Source

relations.lisp.

Method: compare ((iv0 interval) (iv1 interval))
Source

interval.lisp.

Method: compare ((iv interval) x)
Source

interval.lisp.

Method: compare (x (iv interval))
Source

interval.lisp.

Method: compare ((x my-integer) (y my-integer))
Source

testing.lisp.

Method: compare ((tup1 tuple) (tup2 tuple))
Source

tuples.lisp.

Method: compare ((x tuple-desc) (y tuple-desc))
Source

tuples.lisp.

Method: compare ((key1 tuple-key) (key2 tuple-key))
Source

tuples.lisp.

Method: compare ((s1 wb-seq) (s2 wb-seq))
Source

fset.lisp.

Method: compare ((map1 wb-map) (map2 wb-map))
Source

fset.lisp.

Method: compare ((b1 wb-bag) (b2 wb-bag))
Source

fset.lisp.

Method: compare ((s1 wb-set) (s2 wb-set))
Source

fset.lisp.

Method: compare ((eqvm1 equivalent-map) (eqvm2 equivalent-map))

Returns ‘:less’ or ‘:greater’ if the domain values in ‘eqvm1’ are less than resp. greater than those in ‘eqvm2’; or EITHER ‘:equal’ or ‘:unequal’ if those in ‘eqvm1’ are equivalent to those in ‘eqvm2’.

Source

wb-trees.lisp.

Method: compare ((eqvm equivalent-map) key)

Returns ‘:less’ or ‘:greater’ if the domain values in ‘eqvm’ are less than resp. greater than ‘key’; or EITHER ‘:equal’ or ‘:unequal’ if ‘key’ is equivalent to any domain value in ‘eqvm’.

Source

wb-trees.lisp.

Method: compare (key (eqvm equivalent-map))

Returns ‘:less’ or ‘:greater’ if ‘key’ is less than resp. greater than the domain values in ‘eqvm’; or EITHER ‘:equal’ or ‘:unequal’ if ‘x’ is equivalent to any domain value in ‘eqvm’.

Source

wb-trees.lisp.

Method: compare ((eqvs1 equivalent-bag) (eqvs2 equivalent-bag))

Returns ‘:less’ or ‘:greater’ if the values in ‘eqvs1’ are less than resp. greater than those in ‘eqvs2’; returns EITHER ‘:equal’ or ‘:unequal’ if those in ‘eqvs1’ are equivalent to those in ‘eqvs2’.

Source

wb-trees.lisp.

Method: compare ((eqvs equivalent-bag) x)

Returns ‘:less’ or ‘:greater’ if the values in ‘eqvs’ are less than resp. greater than ‘x’; or EITHER ‘:equal’ or ‘:unequal’ if ‘x’ is equivalent to any value in ‘eqvs’.

Source

wb-trees.lisp.

Method: compare (x (eqvs equivalent-bag))

Returns ‘:less’ or ‘:greater’ if ‘x’ is less than resp. greater than the values in ‘eqvs’; or EITHER ‘:equal’ or ‘:unequal’ if ‘x’ is equivalent to any value in ‘eqvs’.

Source

wb-trees.lisp.

Method: compare ((eqvs1 equivalent-set) (eqvs2 equivalent-set))

Returns ‘:less’ or ‘:greater’ if the values in ‘eqvs1’ are less than resp. greater than those in ‘eqvs2’; returns EITHER ‘:equal’ or ‘:unequal’ if those in ‘eqvs1’ are equivalent to those in ‘eqvs2’.

Source

wb-trees.lisp.

Method: compare ((eqvs equivalent-set) x)

Returns ‘:less’ or ‘:greater’ if the values in ‘eqvs’ are less than resp. greater than ‘x’; or EITHER ‘:equal’ or ‘:unequal’ if ‘x’ is equivalent to any value in ‘eqvs’.

Source

wb-trees.lisp.

Method: compare (x (eqvs equivalent-set))

Returns ‘:less’ or ‘:greater’ if ‘x’ is less than resp. greater than the values in ‘eqvs’; or EITHER ‘:equal’ or ‘:unequal’ if ‘x’ is equivalent to any value in ‘eqvs’.

Source

wb-trees.lisp.

Method: compare ((a pathname) (b pathname))
Method: compare ((a package) (b package))
Method: compare ((a list) (b list))
Method: compare ((a vector) (b vector))
Method: compare ((a string) (b string))
Method: compare ((a symbol) (b symbol))
Method: compare ((a character) (b character))
Method: compare ((a complex) (b complex))
Method: compare ((a real) (b real))
Method: compare ((a null) (b null))
Method: compare ((a identity-ordering-mixin) (b null))
Method: compare ((a null) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b real))
Method: compare ((a real) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b complex))
Method: compare ((a complex) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b character))
Method: compare ((a character) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b symbol))
Method: compare ((a symbol) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b string))
Method: compare ((a string) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b vector))
Method: compare ((a vector) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b list))
Method: compare ((a list) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b package))
Method: compare ((a package) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b pathname))
Method: compare ((a pathname) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b set))
Method: compare ((a set) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b bag))
Method: compare ((a bag) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b map))
Method: compare ((a map) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b seq))
Method: compare ((a seq) (b identity-ordering-mixin))
Method: compare ((a identity-ordering-mixin) (b tuple))
Method: compare ((a tuple) (b identity-ordering-mixin))
Method: compare ((a tuple) (b null))
Method: compare ((a null) (b tuple))
Method: compare ((a tuple) (b real))
Method: compare ((a real) (b tuple))
Method: compare ((a tuple) (b complex))
Method: compare ((a complex) (b tuple))
Method: compare ((a tuple) (b character))
Method: compare ((a character) (b tuple))
Method: compare ((a tuple) (b symbol))
Method: compare ((a symbol) (b tuple))
Method: compare ((a tuple) (b string))
Method: compare ((a string) (b tuple))
Method: compare ((a tuple) (b vector))
Method: compare ((a vector) (b tuple))
Method: compare ((a tuple) (b list))
Method: compare ((a list) (b tuple))
Method: compare ((a tuple) (b package))
Method: compare ((a package) (b tuple))
Method: compare ((a tuple) (b pathname))
Method: compare ((a pathname) (b tuple))
Method: compare ((a tuple) (b set))
Method: compare ((a set) (b tuple))
Method: compare ((a tuple) (b bag))
Method: compare ((a bag) (b tuple))
Method: compare ((a tuple) (b map))
Method: compare ((a map) (b tuple))
Method: compare ((a tuple) (b seq))
Method: compare ((a seq) (b tuple))
Method: compare ((a seq) (b null))
Method: compare ((a null) (b seq))
Method: compare ((a seq) (b real))
Method: compare ((a real) (b seq))
Method: compare ((a seq) (b complex))
Method: compare ((a complex) (b seq))
Method: compare ((a seq) (b character))
Method: compare ((a character) (b seq))
Method: compare ((a seq) (b symbol))
Method: compare ((a symbol) (b seq))
Method: compare ((a seq) (b string))
Method: compare ((a string) (b seq))
Method: compare ((a seq) (b vector))
Method: compare ((a vector) (b seq))
Method: compare ((a seq) (b list))
Method: compare ((a list) (b seq))
Method: compare ((a seq) (b package))
Method: compare ((a package) (b seq))
Method: compare ((a seq) (b pathname))
Method: compare ((a pathname) (b seq))
Method: compare ((a seq) (b set))
Method: compare ((a set) (b seq))
Method: compare ((a seq) (b bag))
Method: compare ((a bag) (b seq))
Method: compare ((a seq) (b map))
Method: compare ((a map) (b seq))
Method: compare ((a map) (b null))
Method: compare ((a null) (b map))
Method: compare ((a map) (b real))
Method: compare ((a real) (b map))
Method: compare ((a map) (b complex))
Method: compare ((a complex) (b map))
Method: compare ((a map) (b character))
Method: compare ((a character) (b map))
Method: compare ((a map) (b symbol))
Method: compare ((a symbol) (b map))
Method: compare ((a map) (b string))
Method: compare ((a string) (b map))
Method: compare ((a map) (b vector))
Method: compare ((a vector) (b map))
Method: compare ((a map) (b list))
Method: compare ((a list) (b map))
Method: compare ((a map) (b package))
Method: compare ((a package) (b map))
Method: compare ((a map) (b pathname))
Method: compare ((a pathname) (b map))
Method: compare ((a map) (b set))
Method: compare ((a set) (b map))
Method: compare ((a map) (b bag))
Method: compare ((a bag) (b map))
Method: compare ((a bag) (b null))
Method: compare ((a null) (b bag))
Method: compare ((a bag) (b real))
Method: compare ((a real) (b bag))
Method: compare ((a bag) (b complex))
Method: compare ((a complex) (b bag))
Method: compare ((a bag) (b character))
Method: compare ((a character) (b bag))
Method: compare ((a bag) (b symbol))
Method: compare ((a symbol) (b bag))
Method: compare ((a bag) (b string))
Method: compare ((a string) (b bag))
Method: compare ((a bag) (b vector))
Method: compare ((a vector) (b bag))
Method: compare ((a bag) (b list))
Method: compare ((a list) (b bag))
Method: compare ((a bag) (b package))
Method: compare ((a package) (b bag))
Method: compare ((a bag) (b pathname))
Method: compare ((a pathname) (b bag))
Method: compare ((a bag) (b set))
Method: compare ((a set) (b bag))
Method: compare ((a set) (b null))
Method: compare ((a null) (b set))
Method: compare ((a set) (b real))
Method: compare ((a real) (b set))
Method: compare ((a set) (b complex))
Method: compare ((a complex) (b set))
Method: compare ((a set) (b character))
Method: compare ((a character) (b set))
Method: compare ((a set) (b symbol))
Method: compare ((a symbol) (b set))
Method: compare ((a set) (b string))
Method: compare ((a string) (b set))
Method: compare ((a set) (b vector))
Method: compare ((a vector) (b set))
Method: compare ((a set) (b list))
Method: compare ((a list) (b set))
Method: compare ((a set) (b package))
Method: compare ((a package) (b set))
Method: compare ((a set) (b pathname))
Method: compare ((a pathname) (b set))
Method: compare ((a pathname) (b null))
Method: compare ((a null) (b pathname))
Method: compare ((a pathname) (b real))
Method: compare ((a real) (b pathname))
Method: compare ((a pathname) (b complex))
Method: compare ((a complex) (b pathname))
Method: compare ((a pathname) (b character))
Method: compare ((a character) (b pathname))
Method: compare ((a pathname) (b symbol))
Method: compare ((a symbol) (b pathname))
Method: compare ((a pathname) (b string))
Method: compare ((a string) (b pathname))
Method: compare ((a pathname) (b vector))
Method: compare ((a vector) (b pathname))
Method: compare ((a pathname) (b list))
Method: compare ((a list) (b pathname))
Method: compare ((a pathname) (b package))
Method: compare ((a package) (b pathname))
Method: compare ((a package) (b null))
Method: compare ((a null) (b package))
Method: compare ((a package) (b real))
Method: compare ((a real) (b package))
Method: compare ((a package) (b complex))
Method: compare ((a complex) (b package))
Method: compare ((a package) (b character))
Method: compare ((a character) (b package))
Method: compare ((a package) (b symbol))
Method: compare ((a symbol) (b package))
Method: compare ((a package) (b string))
Method: compare ((a string) (b package))
Method: compare ((a package) (b vector))
Method: compare ((a vector) (b package))
Method: compare ((a package) (b list))
Method: compare ((a list) (b package))
Method: compare ((a list) (b null))
Method: compare ((a null) (b list))
Method: compare ((a list) (b real))
Method: compare ((a real) (b list))
Method: compare ((a list) (b complex))
Method: compare ((a complex) (b list))
Method: compare ((a list) (b character))
Method: compare ((a character) (b list))
Method: compare ((a list) (b symbol))
Method: compare ((a symbol) (b list))
Method: compare ((a list) (b string))
Method: compare ((a string) (b list))
Method: compare ((a list) (b vector))
Method: compare ((a vector) (b list))
Method: compare ((a vector) (b null))
Method: compare ((a null) (b vector))
Method: compare ((a vector) (b real))
Method: compare ((a real) (b vector))
Method: compare ((a vector) (b complex))
Method: compare ((a complex) (b vector))
Method: compare ((a vector) (b character))
Method: compare ((a character) (b vector))
Method: compare ((a vector) (b symbol))
Method: compare ((a symbol) (b vector))
Method: compare ((a vector) (b string))
Method: compare ((a string) (b vector))
Method: compare ((a string) (b null))
Method: compare ((a null) (b string))
Method: compare ((a string) (b real))
Method: compare ((a real) (b string))
Method: compare ((a string) (b complex))
Method: compare ((a complex) (b string))
Method: compare ((a string) (b character))
Method: compare ((a character) (b string))
Method: compare ((a string) (b symbol))
Method: compare ((a symbol) (b string))
Method: compare ((a symbol) (b null))
Method: compare ((a null) (b symbol))
Method: compare ((a symbol) (b real))
Method: compare ((a real) (b symbol))
Method: compare ((a symbol) (b complex))
Method: compare ((a complex) (b symbol))
Method: compare ((a symbol) (b character))
Method: compare ((a character) (b symbol))
Method: compare ((a character) (b null))
Method: compare ((a null) (b character))
Method: compare ((a character) (b real))
Method: compare ((a real) (b character))
Method: compare ((a character) (b complex))
Method: compare ((a complex) (b character))
Method: compare ((a complex) (b null))
Method: compare ((a null) (b complex))
Method: compare ((a complex) (b real))
Method: compare ((a real) (b complex))
Method: compare ((a real) (b null))
Method: compare ((a null) (b real))
Method: compare (a b)
Method: compare ((obj1 identity-ordering-mixin) (obj2 identity-ordering-mixin))
Generic Function: compare-lexicographically (a b)

Returns the result of a lexicographic comparison of ‘a’ and ‘b’, which can be strings, vectors, lists, or seqs.

Package

fset.

Source

order.lisp.

Methods
Method: compare-lexicographically ((s1 wb-seq) (s2 wb-seq))
Source

fset.lisp.

Method: compare-lexicographically ((a vector) (b vector))
Method: compare-lexicographically ((a list) (b list))
Method: compare-lexicographically ((a string) (b string))
Generic Function: complement (set)

Returns the complement of the set.

Package

fset.

Source

complement-sets.lisp.

Methods
Method: complement ((bs bounded-set))
Source

bounded-sets.lisp.

Method: complement ((cs complement-set))
Method: complement ((s set))
Method: complement ((x function))
Generic Function: compose (map1 map2-or-fn)

Returns a new map with the same domain as ‘map1’, which maps each member of that domain to the result of applying first ‘map1’ to it, then applying ‘map2-or-fn’ to the result. ‘map2-or-fn’ can also be a sequence, which is treated as a map from indices to members.

Package

fset.

Source

fset.lisp.

Methods
Method: compose ((rel1 wb-2-relation) (rel2 wb-2-relation))
Source

relations.lisp.

Method: compose ((rel wb-2-relation) (fn seq))
Source

relations.lisp.

Method: compose ((rel wb-2-relation) (fn map))
Source

relations.lisp.

Method: compose ((rel wb-2-relation) (fn symbol))
Source

relations.lisp.

Method: compose ((rel wb-2-relation) (fn function))
Source

relations.lisp.

Method: compose ((m wb-map) (s seq))
Method: compose ((m wb-map) (fn symbol))
Method: compose ((m wb-map) (fn function))
Method: compose ((map1 map) (map2 wb-map))
Generic Function: concat (seq1 &rest seqs)

Returns the concatenation of ‘seq1’ with each of ‘seqs’.

Package

fset.

Source

fset.lisp.

Methods
Method: concat ((s1 seq) &rest seqs)
Method: concat ((a list) &rest seqs)
Generic Function: conflicts (2-relation)

Returns a 2-relation containing only those pairs of ‘2-relation’ whose domain value is mapped to multiple range values.

Package

fset.

Source

relations.lisp.

Methods
Method: conflicts ((br wb-2-relation))
Generic Function: contains? (collection x &optional y)

Returns true iff the set or bag contains ‘x’, or the map or relation contains the pair <x, y>.

Package

fset.

Source

fset.lisp.

Methods
Method: contains? ((bs bounded-set) x &optional arg2)
Source

bounded-sets.lisp.

Method: contains? ((cs complement-set) x &optional y)
Source

complement-sets.lisp.

Method: contains? ((rel wb-list-relation) tuple &optional arg2)
Source

relations.lisp.

Method: contains? ((br wb-2-relation) x &optional y)
Source

relations.lisp.

Method: contains? ((m wb-map) x &optional y)
Method: contains? ((b wb-bag) x &optional y)
Method: contains? ((s wb-set) x &optional y)
Generic Function: convert (to-type collection &key key-fn value-fn from-type pair-fn &allow-other-keys)

Converts the collection to the specified type. Some methods may
take additional keyword arguments to further specify the kind of conversion.

Package

fset.

Source

fset.lisp.

Methods
Method: convert ((to-type (eql fset:wb-set)) (bs bounded-set) &key)
Source

bounded-sets.lisp.

Method: convert ((to-type (eql fset:map-to-sets)) (br wb-2-relation) &key)

This conversion returns a map mapping each domain value to the set of corresponding range values.

Source

relations.lisp.

Method: convert ((to-type (eql fset:wb-map)) (br wb-2-relation) &key)

This conversion requires the relation to be functional, and returns a map representing the function; that is, the relation must map each domain value to a single range value, and the returned map maps that domain value to that range value.

Source

relations.lisp.

Method: convert ((to-type (eql fset:map)) (br wb-2-relation) &key)

This conversion requires the relation to be functional, and returns a map representing the function; that is, the relation must map each domain value to a single range value, and the returned map maps that domain value to that range value.

Source

relations.lisp.

Method: convert ((to-type (eql fset:wb-2-relation)) (s seq) &key key-fn value-fn)
Source

relations.lisp.

Method: convert ((to-type (eql fset:2-relation)) (s seq) &key key-fn value-fn)
Source

relations.lisp.

Method: convert ((to-type (eql fset:wb-2-relation)) (alist list) &key key-fn value-fn)
Source

relations.lisp.

Method: convert ((to-type (eql fset:2-relation)) (alist list) &key key-fn value-fn)
Source

relations.lisp.

Method: convert ((to-type (eql fset:wb-2-relation)) (m map) &key from-type)

If ‘from-type’ is the symbol ‘map-to-sets’, the range elements must all be sets, and the result pairs each domain element with each member of the corresponding range set. Otherwise, the result pairs each domain element with the corresponding range element directly.

Source

relations.lisp.

Method: convert ((to-type (eql fset:2-relation)) (m map) &key from-type)

If ‘from-type’ is the symbol ‘map-to-sets’, the range elements must all be sets, and the result pairs each domain element with each member of the corresponding range set. Otherwise, the result pairs each domain element with the corresponding range element directly.

Source

relations.lisp.

Method: convert ((to-type (eql fset:set)) (br 2-relation) &key pair-fn)
Source

relations.lisp.

Method: convert ((to-type (eql fset:wb-2-relation)) (br wb-2-relation) &key)
Source

relations.lisp.

Method: convert ((to-type (eql fset:2-relation)) (br 2-relation) &key)
Source

relations.lisp.

Method: convert ((to-type (eql list)) (tup tuple) &key pair-fn)
Source

tuples.lisp.

Method: convert ((to-type (eql fset:map)) (tup tuple) &key)
Source

tuples.lisp.

Method: convert ((to-type (eql fset:wb-seq)) (m map) &key pair-fn)
Method: convert ((to-type (eql fset:wb-seq)) (b bag) &key)
Method: convert ((to-type (eql fset:wb-set)) (s wb-seq) &key)
Method: convert ((to-type (eql fset:set)) (s wb-seq) &key)
Method: convert ((to-type (eql fset:wb-seq)) (s set) &key)
Method: convert ((to-type (eql fset:seq)) (s set) &key)
Method: convert ((to-type (eql list)) (s wb-seq) &key)
Method: convert ((to-type (eql fset:wb-seq)) (l list) &key)
Method: convert ((to-type (eql fset:seq)) (l list) &key)
Method: convert ((to-type (eql string)) (s wb-seq) &key)
Method: convert ((to-type (eql vector)) (s wb-seq) &key)
Method: convert ((to-type (eql fset:wb-seq)) (vec vector) &key)
Method: convert ((to-type (eql fset:seq)) (vec vector) &key)
Method: convert ((to-type (eql fset:wb-seq)) (s wb-seq) &key)
Method: convert ((to-type (eql fset:seq)) (s seq) &key)
Method: convert ((to-type (eql hash-table)) (m map) &rest make-hash-table-args &key &allow-other-keys)
Method: convert ((to-type (eql fset:wb-map)) (ht hash-table) &key)
Method: convert ((to-type (eql fset:map)) (ht hash-table) &key)
Method: convert ((to-type (eql fset:wb-map)) (b bag) &key)
Method: convert ((to-type (eql fset:map)) (b bag) &key)
Method: convert ((to-type (eql fset:wb-map)) (s sequence) &key key-fn value-fn)
Method: convert ((to-type (eql fset:map)) (s sequence) &key key-fn value-fn)
Method: convert ((to-type (eql fset:wb-map)) (list list) &key key-fn value-fn)
Method: convert ((to-type (eql fset:map)) (list list) &key key-fn value-fn)
Method: convert ((to-type (eql fset:set)) (m map) &key pair-fn)
Method: convert ((to-type (eql vector)) (m map) &key pair-fn)
Method: convert ((to-type (eql fset:seq)) (m map) &key pair-fn)
Method: convert ((to-type (eql list)) (m map) &key pair-fn)
Method: convert ((to-type (eql fset:wb-map)) (m wb-map) &key)
Method: convert ((to-type (eql fset:map)) (m map) &key)
Method: convert ((to-type (eql fset:wb-bag)) (s sequence) &key)
Method: convert ((to-type (eql fset:bag)) (s sequence) &key)
Method: convert ((to-type (eql fset:wb-bag)) (l list) &key from-type)

If ‘from-type’ is the symbol ‘alist’, treats the operand as an alist where the cdr of each pair (which must be a positive integer) is the member count for the car. Otherwise the operand is treated as a simple list of members, some of which may be repeated.

Method: convert ((to-type (eql fset:bag)) (l list) &key from-type)

If ‘from-type’ is the symbol ‘alist’, treats the operand as an alist where the cdr of each pair (which must be a positive integer) is the member count for the car. Otherwise the operand is treated as a simple list of members, some of which may be repeated.

Method: convert ((to-type (eql fset:alist)) (b bag) &key)
Method: convert ((to-type (eql vector)) (b bag) &key)
Method: convert ((to-type (eql fset:seq)) (b bag) &key)
Method: convert ((to-type (eql list)) (b bag) &key)
Method: convert ((to-type (eql fset:wb-set)) (b wb-bag) &key)
Method: convert ((to-type (eql fset:set)) (b wb-bag) &key)
Method: convert ((to-type (eql fset:wb-bag)) (b wb-bag) &key)
Method: convert ((to-type (eql fset:bag)) (b bag) &key)
Method: convert ((to-type (eql fset:wb-set)) (s sequence) &key)
Method: convert ((to-type (eql fset:set)) (s sequence) &key)
Method: convert ((to-type (eql fset:wb-set)) (l list) &key)
Method: convert ((to-type (eql fset:set)) (l list) &key)
Method: convert ((to-type (eql vector)) (s set) &key)
Method: convert ((to-type (eql list)) (s set) &key)
Method: convert ((to-type (eql fset:wb-bag)) (s wb-set) &key)
Method: convert ((to-type (eql fset:bag)) (s wb-set) &key)
Method: convert ((to-type (eql fset:wb-set)) (s wb-set) &key)
Method: convert ((to-type (eql fset:set)) (s set) &key)
Method: convert ((to-type (eql vector)) (v vector) &key)
Method: convert ((to-type (eql list)) (ls list) &key)
Generic Function: count (item collection &key key test start end from-end test-not)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:count’. On an FSet collection, the default for ‘test’ is ‘equal?’; the ‘:test-not’ keyword is not accepted; and the ‘:start’, ‘:end’, and ‘:from-end’ keywords are accepted only if ‘collection’ is a seq. Also, on a map, this scans the domain.

Package

fset.

Source

fset.lisp.

Methods
Method: count (item (s seq) &key key test start end from-end)
Method: count (item (m map) &key key test)
Method: count (item (b bag) &key key test)
Method: count (item (s set) &key key test)
Method: count (item (s sequence) &rest keyword-args &key key test test-not start end from-end)
Generic Function: count-if (pred collection &key key start end from-end)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:count-if’. On an FSet collection, the ‘:start’, ‘:end’, and ‘:from-end’ keywords are accepted only if ‘collection’ is a seq. Also, on a map, this scans the domain.

Package

fset.

Source

fset.lisp.

Methods
Method: count-if (pred (s seq) &key key start end from-end)
Method: count-if (pred (m map) &key key)
Method: count-if (pred (b bag) &key key)
Method: count-if (pred (s set) &key key)
Method: count-if (pred (s sequence) &rest keyword-args &key key start end from-end)
Generic Function: count-if-not (pred collection &key key start end from-end)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:count-if-not’.
On an FSet collection, the ‘:start’, ‘:end’, and ‘:from-end’ keywords are accepted only if ‘collection’ is a seq. Also, on a map, this scans the domain.

Package

fset.

Source

fset.lisp.

Methods
Method: count-if-not (pred (s seq) &key key start end from-end)
Method: count-if-not (pred (m map) &key key)
Method: count-if-not (pred (s bag) &key key)
Method: count-if-not (pred (s set) &key key)
Method: count-if-not (pred (s sequence) &rest keyword-args &key key start end from-end)
Generic Function: disjoint? (set1 set2)

Returns true iff ‘set1’ and ‘set2’ have a null intersection (without actually constructing said intersection).

Package

fset.

Source

fset.lisp.

Methods
Method: disjoint? ((bs1 bounded-set) (bs2 bounded-set))
Source

bounded-sets.lisp.

Method: disjoint? ((s set) (cs complement-set))
Source

complement-sets.lisp.

Method: disjoint? ((cs complement-set) (s set))
Source

complement-sets.lisp.

Method: disjoint? ((cs1 complement-set) (cs2 complement-set))
Source

complement-sets.lisp.

Method: disjoint? ((s1 wb-set) (s2 wb-set))
Generic Function: domain (map)

Returns the domain of the map, that is, the set of keys mapped by the map.

Package

fset.

Source

fset.lisp.

Methods
Method: domain ((br wb-2-relation))
Source

relations.lisp.

Method: domain ((tup dyn-tuple))
Source

tuples.lisp.

Method: domain ((s wb-seq))
Method: domain ((m wb-map))
Generic Function: domain-contains? (collection x)

Returns true iff the domain of the map or seq contains ‘x’. (The domain of a seq is the set of valid indices.)

Package

fset.

Source

fset.lisp.

Methods
Method: domain-contains? ((s seq) x)
Method: domain-contains? ((m wb-map) x)
Generic Function: empty? (collection)

Returns true iff the collection is empty.

Package

fset.

Source

fset.lisp.

Methods
Method: empty? ((bs bounded-set))
Source

bounded-sets.lisp.

Method: empty? ((rel wb-list-relation))
Source

relations.lisp.

Method: empty? ((br wb-2-relation))
Source

relations.lisp.

Method: empty? ((s interval-set))
Source

interval.lisp.

Method: empty? ((s sequence))
Method: empty? ((l list))
Method: empty? ((s wb-seq))
Method: empty? ((m wb-map))
Method: empty? ((b wb-bag))
Method: empty? ((s wb-set))
Generic Function: filter (fn collection)

Returns a new collection containing those members or pairs of ‘collection’ for which ‘fn’ returns true. If ‘collection’ is a set, bag, or seq, ‘fn’ is called with one argument; if a map, ‘fn’ is called with two arguments, the key and the value (the map-default of the result is that of ‘collection’). As well as a Lisp function, ‘fn’ can be a map, or a set (which is treated as mapping its members to true and everything else to false).

Package

fset.

Source

fset.lisp.

Methods
Method: filter ((fn bag) (s seq))
Method: filter ((fn set) (s seq))
Method: filter ((fn map) (s seq))
Method: filter ((fn symbol) (s seq))
Method: filter ((fn function) (s seq))
Method: filter ((pred symbol) (m map))
Method: filter ((pred function) (m map))
Method: filter ((pred bag) (b bag))
Method: filter ((pred set) (b bag))
Method: filter ((pred map) (b bag))
Method: filter ((pred symbol) (b bag))
Method: filter ((pred function) (b bag))
Method: filter ((pred bag) (s set))
Method: filter ((pred set) (s set))
Method: filter ((pred map) (s set))
Method: filter ((pred symbol) (s set))
Method: filter ((pred function) (s set))
Method: filter (fn (s sequence))
Generic Function: filter-pairs (fn collection)

Just like ‘filter’ except that if invoked on a bag, ‘fn’ (which must be a Lisp function) is called with two arguments for each pair, the member and the multiplicity.

Package

fset.

Source

fset.lisp.

Methods
Method: filter-pairs ((pred symbol) (b bag))
Method: filter-pairs ((pred function) (b bag))
Method: filter-pairs (fn collection)
Generic Function: find (item collection &key key test start end from-end test-not)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:find’. On an FSet collection, the default for ‘test’ is ‘equal?’; the ‘:test-not’ keyword is not accepted; and the ‘:start’, ‘:end’, and ‘:from-end’ keywords are accepted only if ‘collection’ is a seq. Also, on a map, this scans the domain; on success, it returns the corresponding range element as the second value.

Package

fset.

Source

fset.lisp.

Methods
Method: find (item (s seq) &key key test start end from-end)
Method: find (item (m map) &key key test)
Method: find (item (b bag) &key key test)
Method: find (item (s set) &key key test)
Method: find (item (s sequence) &rest keyword-args &key key test test-not start end from-end)
Generic Function: find-if (pred collection &key key start end from-end)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:find-if’. On an FSet collection, the ‘:start’, ‘:end’, and ‘:from-end’ keywords are accepted only if ‘collection’ is a seq. Also, on a map, this scans the domain; on success, it returns the corresponding range element as the second value.

Package

fset.

Source

fset.lisp.

Methods
Method: find-if (pred (s seq) &key key start end from-end)
Method: find-if (pred (m map) &key key)
Method: find-if (pred (b bag) &key key)
Method: find-if (pred (s set) &key key)
Method: find-if (pred (s sequence) &rest keyword-args &key key start end from-end)
Generic Function: find-if-not (pred collection &key key start end from-end)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:find-if-not’.
On an FSet collection, the ‘:start’, ‘:end’, and ‘:from-end’ keywords are accepted only if ‘collection’ is a seq. Also, on a map, this scans the domain; on success, it returns the corresponding range element as the second value.

Package

fset.

Source

fset.lisp.

Methods
Method: find-if-not (pred (s seq) &key key start end from-end)
Method: find-if-not (pred (m map) &key key)
Method: find-if-not (pred (b bag) &key key)
Method: find-if-not (pred (s set) &key key)
Method: find-if-not (pred (s sequence) &rest keyword-args &key key start end from-end)
Generic Function: first (seq)

Returns the first element of ‘seq’, i.e., element 0. This has a back- compatibility method for lists, and adds one for CL sequences generally.

Package

fset.

Source

fset.lisp.

Methods
Method: first ((s wb-seq))
Method: first ((s sequence))
Method: first ((s list))
Generic Function: forward-key (reg from-key to-key)
Package

fset.

Methods
Method: forward-key ((reg query-registry) from-key to-key)

Returns a new query-registry in which all queries whose patterns used ‘from-key’ (in an instantiated position) now use ‘to-key’ in that position instead.

Source

relations.lisp.

Generic Function: greatest (collection)

On a set, returns two values: the greatest member of the set and
true; on a bag, returns three values: the greatest member of the bag, its multiplicity, and true; on a map, also returns three values: the greatest key of the map, its value, and true. If there is not a unique greatest member, chooses one of the greatest members arbitrarily. Returns ‘nil’ if the collection is empty.

Package

fset.

Source

fset.lisp.

Methods
Method: greatest ((br wb-2-relation))
Source

relations.lisp.

Method: greatest ((m wb-map))
Method: greatest ((m wb-bag))
Method: greatest ((s wb-set))
Generic Function: image (fn collection)

Returns a new collection containing the result of applying ‘fn’ to each member of ‘collection’, which may be a set, bag, or seq. In the bag case, the multiplicity of each member of the result is the sum of the multiplicities of the values that ‘fn’ maps to it. As well as a Lisp function, ‘fn’ can be a map, or a set (which is treated as mapping its members to true and everything else to false). ‘collection’ can also be a map, in which case ‘fn’ must be a Lisp function of two arguments that returns two values (the map-default of the result is that of ‘collection’); also see ‘compose’.

Package

fset.

Source

fset.lisp.

Methods
Method: image ((key tuple-key) (s seq))
Source

tuples.lisp.

Method: image ((key tuple-key) (s set))
Source

tuples.lisp.

Method: image ((fn bag) (s seq))
Method: image ((fn set) (s seq))
Method: image ((fn map) (s seq))
Method: image ((fn symbol) (s seq))
Method: image ((fn function) (s seq))
Method: image ((fn symbol) (m map))
Method: image ((fn function) (m map))
Method: image ((fn bag) (b bag))
Method: image ((fn set) (b bag))
Method: image ((fn map) (b bag))
Method: image ((fn symbol) (b bag))
Method: image ((fn function) (b bag))
Method: image ((fn bag) (s set))
Method: image ((fn set) (s set))
Method: image ((fn map) (s set))
Method: image ((fn symbol) (s set))
Method: image ((fn function) (s set))
Method: image ((fn set) (l list))
Method: image ((fn map) (l list))
Method: image ((fn symbol) (l list))
Method: image ((fn function) (l list))
Generic Function: insert (seq idx val)

Returns a new sequence like ‘seq’ but with ‘val’ inserted at ‘idx’ (the seq is extended in either direction if needed prior to the insertion; previously uninitialized indices are filled with the seq’s default).

Package

fset.

Source

fset.lisp.

Methods
Method: insert ((s wb-seq) idx val)
Generic Function: intersection (set-or-bag1 set-or-bag2 &key test test-not)

Returns the intersection of the two sets/bags. The result is a bag
if both arguments are bags; otherwise a set. The intersection of two bags is the bag whose multiplicity, for any value, is the minimum of its multiplicities in the two argument bags.

Package

fset.

Source

fset.lisp.

Methods
Method: intersection ((bs1 bounded-set) (bs2 bounded-set) &key)
Source

bounded-sets.lisp.

Method: intersection ((s set) (cs complement-set) &key)
Source

complement-sets.lisp.

Method: intersection ((cs complement-set) (s set) &key)
Source

complement-sets.lisp.

Method: intersection ((cs1 complement-set) (cs2 complement-set) &key)
Source

complement-sets.lisp.

Method: intersection ((br1 wb-2-relation) (br2 wb-2-relation) &key)
Source

relations.lisp.

Method: intersection ((s0 interval-set) (s1 interval-set) &key)
Source

interval.lisp.

Method: intersection ((b wb-bag) (s wb-set) &key)
Method: intersection ((s wb-set) (b wb-bag) &key)
Method: intersection ((s1 wb-bag) (s2 wb-bag) &key)
Method: intersection ((s1 wb-set) (s2 wb-set) &key)
Method: intersection ((ls1 list) (ls2 list) &rest keyword-args &key test test-not)
Generic Function: inverse (2-relation)

The inverse of a binary relation.

Package

fset.

Source

relations.lisp.

Methods
Method: inverse ((br wb-2-relation))
Generic Function: iterator (collection &key pairs?)

Returns an iterator for the collection. (These are stateful iterators and
are not thread-safe; if you want a pure iterator, your best bet is to ‘convert’ the collection to a list.) The iterator is a closure of one argument; given ‘:done?’, it returns true iff the iterator is exhausted; given ‘:more?’, it returns true iff the iterator is _not_ exhausted. Given ‘:get’, if the iterator is not exhausted, it returns the next element (or pair, for a map, as two values), with the second value (third, for a map) being true, and advances one element; if it is exhausted, it returns two ‘nil’ values (three, for a map).

Package

fset.

Source

fset.lisp.

Methods
Method: iterator ((rel wb-2-relation) &key)
Source

relations.lisp.

Method: iterator ((s wb-seq) &key)
Method: iterator ((m wb-map) &key)
Method: iterator ((b wb-bag) &key pairs?)
Method: iterator ((s wb-set) &key)
Method: iterator ((seq sequence) &key)
Method: iterator ((str string) &key)
Method: iterator ((vec vector) &key)
Method: iterator ((ls list) &key)
Generic Function: join (relation-a column-a relation-b column-b)

A relational equijoin, matching up ‘column-a’ of ‘relation-a’ with ‘column-b’ of ‘relation-b’. For a binary relation, the columns are named 0 (domain) and 1 (range).

Package

fset.

Source

relations.lisp.

Methods
Method: join ((bra wb-2-relation) cola (brb wb-2-relation) colb)
Generic Function: last (seq)

Returns the last element of ‘seq’, i.e., element ‘(1- (size seq))’. This has methods for CL lists and sequences that are NOT COMPATIBLE with ‘cl:last’. FSet exports ‘lastcons’ as an arguably better name for the functionality of ‘cl:last’.

Package

fset.

Source

fset.lisp.

Methods
Method: last ((s wb-seq))
Method: last ((s sequence))
Method: last ((s list))
Generic Function: least (collection)

On a set, returns two values: the smallest member of the set and
true; on a bag, returns three values: the smallest member of the bag, its multiplicity, and true; on a map, also returns three values: the smallest key of the map, its value, and true. If there is not a unique smallest member, chooses one of the smallest members arbitrarily. Returns ‘nil’ if the collection is empty.

Package

fset.

Source

fset.lisp.

Methods
Method: least ((br wb-2-relation))
Source

relations.lisp.

Method: least ((m wb-map))
Method: least ((b wb-bag))
Method: least ((s wb-set))
Generic Function: less (collection value1 &optional value2)

On a set, removes ‘value1’ from it if present, returning the updated set. On a bag, removes ‘value2’ occurrences of ‘value1’ if present, returning the updated bag; ‘value2’ defaults to 1. On a map, removes the pair whose key is ‘value1’, if present, returning the updated map. On a seq, removes the element at index ‘value1’, if that index is in bounds, and shifts subsequent elements down, returning the updated seq.

Package

fset.

Source

fset.lisp.

Methods
Method: less ((bs1 bounded-set) x &optional arg2)
Source

bounded-sets.lisp.

Method: less ((cs complement-set) x &optional arg2)
Source

complement-sets.lisp.

Method: less ((rel wb-list-relation) tuple &optional arg2)
Source

relations.lisp.

Method: less ((br wb-2-relation) x &optional y)
Source

relations.lisp.

Method: less ((s interval-set) (iv interval) &optional arg2)
Source

interval.lisp.

Method: less ((s wb-seq) idx &optional arg2)
Method: less ((m wb-map) key &optional arg2)
Method: less ((b wb-bag) value &optional multiplicity)
Method: less ((s wb-set) value &optional arg2)
Generic Function: less-first (seq)

Returns the subsequence of ‘seq’ from element 1 through the end.

Package

fset.

Source

fset.lisp.

Methods
Method: less-first ((s wb-seq))
Generic Function: less-last (seq)

Returns the subsequence of ‘seq’ from element 0 through the next-to-last element.

Package

fset.

Source

fset.lisp.

Methods
Method: less-last ((s wb-seq))
Generic Function: less-query (reg pattern metapattern query)
Package

fset.

Methods
Method: less-query ((reg query-registry) (pattern list) (metapattern list) query)
Source

relations.lisp.

Generic Function: lookup (collection key)

If ‘collection’ is a map, returns the value to which ‘key’ is mapped. If ‘collection’ is a seq, takes ‘key’ as an index and returns the corresponding member (0-origin, of course). If ‘collection’ is a set or bag that contains a member equal to ‘key’, returns true and the member as two values, else false and ‘nil’; this is useful for canonicalization.

Package

fset.

Source

fset.lisp.

Setf expander for this generic function

(setf lookup).

Methods
Method: lookup ((reg query-registry) tuple)

Returns all queries in ‘reg’ whose patterns match ‘tuple’.

Source

relations.lisp.

Method: lookup ((br wb-2-relation) x)

Returns the set of values that the relation pairs ‘x’ with.

Source

relations.lisp.

Method: lookup ((tuple tuple) (key tuple-key))
Source

tuples.lisp.

Method: lookup ((s sequence) (idx integer))
Method: lookup ((s wb-seq) key)
Method: lookup ((m wb-map) key)
Method: lookup ((b wb-bag) x)
Method: lookup ((s wb-set) key)
Generic Function: lookup-inv (2-relation y)

Does an inverse lookup on a binary relation.

Package

fset.

Source

relations.lisp.

Methods
Method: lookup-inv ((br wb-2-relation) y)
Generic Function: lookup-multi (reg set-tuple)
Package

fset.

Methods
Method: lookup-multi ((reg query-registry) set-tuple)

Here ‘set-tuple’ contains a set of values in each position. Returns all queries in ‘reg’ whose patterns match any member of the cartesian product of the sets.

Source

relations.lisp.

Generic Function: lookup-multi-restricted (reg set-tuple keys)
Package

fset.

Methods
Method: lookup-multi-restricted ((reg query-registry) set-tuple keys)

Here ‘set-tuple’ contains a set of values in each position. Returns all queries in ‘reg’ whose patterns match any member of the cartesian product of the sets and which use a member of ‘keys’ in their patterns.

Source

relations.lisp.

Generic Function: lookup-restricted (reg tuple key)
Package

fset.

Methods
Method: lookup-restricted ((reg query-registry) tuple key)

Returns all queries in ‘reg’ whose patterns match ‘tuple’ and which use ‘key’ (in an instantiated position) in their patterns.

Source

relations.lisp.

Generic Function: map-difference-2 (map1 map2)

Returns, as two values: a map containing all the pairs that are in ‘map1’ but not ‘map2’, with the same default as ‘map1’; and one containing all the pairs that are in ‘map2’ but not ‘map1’, with the same default as ‘map2’.

Package

fset.

Source

fset.lisp.

Methods
Method: map-difference-2 ((map1 wb-map) (map2 wb-map))
Generic Function: map-intersection (map1 map2 &optional val-fn)

Returns a map containing all the keys that are in the domains of both ‘map1’ and ‘map2’, where the value for each key is the result of calling ‘val-fn’ on the value from ‘map1’ and the value from ‘map2’. ‘val-fn’ defaults to simply returning its second argument, so the entries in ‘map2’ simply shadow those in ‘map1’. The default for the new map is the result of calling ‘val-fn’ on the defaults for the two maps (so be sure it can take these values).

Package

fset.

Source

fset.lisp.

Methods
Method: map-intersection ((map1 wb-map) (map2 wb-map) &optional val-fn)
Generic Function: map-union (map1 map2 &optional val-fn)

Returns a map containing all the keys of ‘map1’ and ‘map2’, where the value for each key contained in only one map is the value from that map, and the value for each key contained in both maps is the result of calling ‘val-fn’ on the value from ‘map1’ and the value from ‘map2’. ‘val-fn’ defaults to simply returning its second argument, so the entries in ‘map2’ simply shadow those in ‘map1’. The default for the new map is the result of calling ‘val-fn’ on the defaults for the two maps (so be sure it can take these values).

Package

fset.

Source

fset.lisp.

Methods
Method: map-union ((map1 wb-map) (map2 wb-map) &optional val-fn)
Generic Function: multiplicity (bag x)

Returns the multiplicity of ‘x’ in the bag.

Package

fset.

Source

fset.lisp.

Methods
Method: multiplicity ((s set) x)
Method: multiplicity ((b wb-bag) x)
Generic Function: partition (pred collection)

Returns two values, (filter fn collection) and (filter (cl:complement fn) collection).

Package

fset.

Source

fset.lisp.

Methods
Method: partition ((fn bag) (s seq))
Method: partition ((fn set) (s seq))
Method: partition ((fn map) (s seq))
Method: partition ((fn symbol) (s seq))
Method: partition ((fn function) (s seq))
Method: partition ((pred map) (s set))
Method: partition ((pred symbol) (s set))
Method: partition ((pred function) (s set))
Method: partition ((pred function) (ls list))
Method: partition ((pred symbol) (ls list))
Generic Function: position (item collection &key key test start end from-end test-not)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:position’. On an FSet seq, the default for ‘test’ is ‘equal?’, and the ‘:test-not’ keyword is not accepted.

Package

fset.

Source

fset.lisp.

Methods
Method: position (item (s seq) &key key test start end from-end)
Method: position (item (s sequence) &rest keyword-args &key key test test-not start end from-end)
Generic Function: position-if (pred collection &key key start end from-end)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:position-if’. Also works on an FSet seq.

Package

fset.

Source

fset.lisp.

Methods
Method: position-if (pred (s seq) &key key start end from-end)
Method: position-if (pred (s sequence) &rest keyword-args &key key start end from-end)
Generic Function: position-if-not (pred collection &key key start end from-end)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:position-if-not’. Also works on an FSet seq.

Package

fset.

Source

fset.lisp.

Methods
Method: position-if-not (pred (s seq) &key key start end from-end)
Method: position-if-not (pred (s sequence) &rest keyword-args &key key start end from-end)
Generic Function: query (relation pattern metapattern)

Along with the relation, takes two lists, of equal length less than
or equal to the arity, called the ‘pattern’ and ‘metapattern’; returns a set of tuples satisfying the query. For each position, if the metapattern contains ‘nil’, the query is not constrained by that position (the corresponding position in the pattern is ignored); if the metapattern contains ‘t’ or ‘:single’, then the result set contains only those tuples with the same value in that position as the pattern has. The difference between ‘t’ and ‘:single’ has to do with indexing. For each metapattern that is actually used, an index is constructed if not previously present, and then is maintained incrementally. If the metapattern has ‘t’ in a location, the resulting index will contain all values for that location; if it has ‘:single’, the resulting index will contain only those values that have actually appeared in a query pattern with this metapattern.

Package

fset.

Source

relations.lisp.

Methods
Method: query ((rel wb-list-relation) (pattern list) (metapattern list))
Generic Function: query-multi (rel pattern metapattern)

Like ‘query’ (q.v.), except that ‘pattern’ is a list of sets of values rather than a list of values. Returns all tuples in the relation for which each value is a member of the corresponding set in the pattern. ‘:single’ in the metapattern is not accepted.

Package

fset.

Source

relations.lisp.

Methods
Method: query-multi ((rel wb-list-relation) (pattern list) (metapattern list))
Generic Function: range (map)

Returns the range of the map, that is, the set of all values to which keys are mapped by the map.

Package

fset.

Source

fset.lisp.

Methods
Method: range ((br wb-2-relation))
Source

relations.lisp.

Method: range ((s wb-seq))
Method: range ((m map))
Generic Function: range-contains? (collection x)

Returns true iff the range of the map or seq contains ‘x’. (The range of a seq is the set of members.) Note that this requires a linear search.

Package

fset.

Source

fset.lisp.

Methods
Method: range-contains? ((s seq) x)
Method: range-contains? ((m wb-map) x)
Generic Function: rank (collection value)

If ‘collection’ is a set or bag that contains ‘value’, returns the rank of ‘value’ in the ordering defined by ‘compare’, and a true second value. If ‘collection’ is a map whose domain contains ‘value’, returns the rank of ‘value’ in the domain of the map, and a true second value. If ‘value’ is not in the collection, the second value is false, and the first value is the rank of the greatest member of the collection less than ‘value’ (if any; otherwise -1). Note that if there are values/keys that are unequal but equivalent to ‘value’, an arbitrary order will be imposed on them for this purpose; but another collection that is ‘equal?’ but not ‘eq’ to this one will in general order them differently. Also, on a bag, multiplicities are ignored for this purpose.

Package

fset.

Source

fset.lisp.

Methods
Method: rank ((s wb-map) x)
Method: rank ((s wb-bag) x)
Method: rank ((s wb-set) x)
Generic Function: reduce (fn collection &key key initial-value start end from-end)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:reduce’ (q.v.). On an FSet collection, the ‘:start’, ‘:end’, and ‘:from-end’ keywords are accepted only if ‘collection’ is a seq.

Package

fset.

Source

fset.lisp.

Methods
Method: reduce ((fn symbol) (s seq) &key key initial-value start end from-end)
Method: reduce ((fn function) (s seq) &key key initial-value start end from-end)
Method: reduce ((fn symbol) (m map) &key key initial-value)
Method: reduce ((fn function) (m map) &key key initial-value)
Method: reduce ((fn symbol) (b bag) &key key initial-value)
Method: reduce ((fn function) (b bag) &key key initial-value)
Method: reduce ((fn symbol) (s set) &key key initial-value)
Method: reduce ((fn function) (s set) &key key initial-value)
Method: reduce (fn (s sequence) &rest keyword-args &key key initial-value start end from-end)
Generic Function: remove (item collection &key key test start end from-end count)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:remove’. On an FSet seq, the default for ‘test’ is ‘equal?’, and the ‘:test-not’ keyword is not accepted.

Package

fset.

Source

fset.lisp.

Methods
Method: remove (item (s seq) &key key test start end from-end count)
Method: remove (item (s sequence) &rest keyword-args &key key test start end from-end count)
Generic Function: remove-if (pred collection &key key start end from-end count)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:remove-if’. Also works on an FSet seq; but see ‘filter’.

Package

fset.

Source

fset.lisp.

Methods
Method: remove-if (pred (s seq) &key key start end from-end count)
Method: remove-if (pred (s sequence) &rest keyword-args &key key start end from-end count)
Generic Function: remove-if-not (pred collection &key key start end from-end count)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:remove-if-not’. Also works on an FSet seq; but see ‘filter’.

Package

fset.

Source

fset.lisp.

Methods
Method: remove-if-not (pred (s seq) &key key start end from-end count)
Method: remove-if-not (pred (s sequence) &rest keyword-args &key key start end from-end count)
Generic Function: restrict (map set)

Returns a map containing only those pairs of ‘map’ whose keys are also in ‘set’.

Package

fset.

Source

fset.lisp.

Methods
Method: restrict ((tup tuple) (s set))
Source

tuples.lisp.

Method: restrict ((m wb-map) (s wb-set))
Generic Function: restrict-not (map set)

Returns a map containing only those pairs of ‘map’ whose keys are not in ‘set’.

Package

fset.

Source

fset.lisp.

Methods
Method: restrict-not ((tup tuple) (s set))
Source

tuples.lisp.

Method: restrict-not ((m wb-map) (s wb-set))
Generic Function: reverse (seq)

Returns ‘seq’ in reverse order.

Package

fset.

Source

fset.lisp.

Methods
Method: reverse ((s wb-seq))
Method: reverse ((s sequence))
Generic Function: set-difference (set1 set2 &key test test-not)

Returns the set difference of set1 and set2, i.e., the set containing every member of ‘set1’ that is not in ‘set2’.

Package

fset.

Source

fset.lisp.

Methods
Method: set-difference ((bs1 bounded-set) (bs2 bounded-set) &key)
Source

bounded-sets.lisp.

Method: set-difference ((s set) (cs complement-set) &key)
Source

complement-sets.lisp.

Method: set-difference ((cs complement-set) (s set) &key)
Source

complement-sets.lisp.

Method: set-difference ((cs1 complement-set) (cs2 complement-set) &key)
Source

complement-sets.lisp.

Method: set-difference ((s0 interval-set) (s1 interval-set) &key)
Source

interval.lisp.

Method: set-difference ((s1 wb-set) (s2 wb-set) &key)
Method: set-difference ((ls1 list) (ls2 list) &rest keyword-args &key test test-not)
Generic Function: set-difference-2 (set1 set2)

Returns ‘set1 - set2’ and ‘set2 - set1’ as two values.

Package

fset.

Source

fset.lisp.

Methods
Method: set-difference-2 ((s1 wb-set) (s2 wb-set))
Generic Function: set-size (bag)

Returns the number of unique members in the bag.

Package

fset.

Source

fset.lisp.

Methods
Method: set-size ((b wb-bag))
Method: set-size ((s wb-set))
Generic Function: size (collection)

Returns the number of members in a set, seq, or bag, or the number of pairs in a map. The size of a bag is the sum of the multiplicities.

Package

fset.

Source

fset.lisp.

Methods
Method: size ((bs bounded-set))
Source

bounded-sets.lisp.

Method: size ((cs complement-set))
Source

complement-sets.lisp.

Method: size ((rel wb-list-relation))
Source

relations.lisp.

Method: size ((br wb-2-relation))
Source

relations.lisp.

Method: size ((s interval-set))

The number of intervals in the set.

Source

interval.lisp.

Method: size ((s sequence))
Method: size ((s wb-seq))
Method: size ((m wb-map))
Method: size ((b wb-bag))
Method: size ((s wb-set))
Generic Function: sort (seq pred &key key)

Returns ‘seq’ sorted by ‘pred’, a function of two arguments; if ‘key’ is supplied, it is a function of one argument that is applied to the elements of ‘seq’ before they are passed to ‘pred’. The sort is not guaranteed to be stable. The method for CL sequences copies the sequence first, unlike ‘cl:sort’.

Package

fset.

Source

fset.lisp.

Methods
Method: sort ((s wb-seq) pred &key key)
Method: sort ((s set) pred &key key)
Method: sort ((s sequence) pred &key key)
Generic Function: splice (seq idx subseq)

Returns a new sequence like ‘seq’ but with the elements of ‘subseq’ inserted
at ‘idx’ (the seq is extended in either direction if needed prior to the insertion; previously uninitialized indices are filled with the seq’s default).

Package

fset.

Source

fset.lisp.

Methods
Method: splice ((s wb-seq) idx subseq)
Generic Function: split-above (s value)
Package

fset.

Methods
Method: split-above ((s wb-set) value)
Source

fset.lisp.

Generic Function: split-below (s value)
Package

fset.

Methods
Method: split-below ((s wb-set) value)
Source

fset.lisp.

Generic Function: split-from (s value)
Package

fset.

Methods
Method: split-from ((s wb-set) value)
Source

fset.lisp.

Generic Function: split-through (s value)
Package

fset.

Methods
Method: split-through ((s wb-set) value)
Source

fset.lisp.

Generic Function: stable-sort (seq pred &key key)

Returns ‘seq’ sorted by ‘pred’, a function of two arguments; if ‘key’ is supplied, it is a function of one argument that is applied to the elements of ‘seq’ before they are passed to ‘pred’. The sort is guaranteed to be stable. The method for CL sequences copies the sequence first, unlike ‘cl:stable-sort’.

Package

fset.

Source

fset.lisp.

Methods
Method: stable-sort ((s wb-seq) pred &key key)
Method: stable-sort ((s set) pred &key key)
Method: stable-sort ((s sequence) pred &key key)
Generic Function: subbag? (sub super)

Returns true iff ‘sub’ is a subbag of ‘super’, that is, for every member of ‘sub’, ‘super’ contains the same value with at least the same multiplicity.

Package

fset.

Source

fset.lisp.

Methods
Method: subbag? ((b wb-bag) (s wb-set))
Method: subbag? ((s wb-set) (b wb-bag))
Method: subbag? ((b1 wb-bag) (b2 wb-bag))
Generic Function: subseq (seq start &optional end)

Returns the subsequence of ‘seq’ from ‘start’ (inclusive) to ‘end’ (exclusive), where ‘end’ defaults to ‘(size seq)’.

Package

fset.

Source

fset.lisp.

Methods
Method: subseq ((s wb-seq) start &optional end)
Method: subseq ((s sequence) start &optional end)
Generic Function: subset? (sub super)

Returns true iff ‘sub’ is a subset of ‘super’.

Package

fset.

Source

fset.lisp.

Methods
Method: subset? ((bs1 bounded-set) (bs2 bounded-set))
Source

bounded-sets.lisp.

Method: subset? ((s set) (cs complement-set))
Source

complement-sets.lisp.

Method: subset? ((cs complement-set) (s set))
Source

complement-sets.lisp.

Method: subset? ((cs1 complement-set) (cs2 complement-set))
Source

complement-sets.lisp.

Method: subset? ((s1 wb-set) (s2 wb-set))
Generic Function: substitute (newitem olditem collection &key key test start end from-end count)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:substitute’. On an FSet seq, the default for ‘test’ is ‘equal?’, and the ‘:test-not’ keyword is not accepted.

Package

fset.

Source

fset.lisp.

Methods
Method: substitute (newitem olditem (s seq) &key key test start end from-end count)
Method: substitute (newitem olditem (s sequence) &rest keyword-args &key key test start end from-end count)
Generic Function: substitute-if (newitem pred collection &key key start end from-end count)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:substitute-if’. Also works on an FSet seq.

Package

fset.

Source

fset.lisp.

Methods
Method: substitute-if (newitem pred (s seq) &key key start end from-end count)
Method: substitute-if (newitem pred (s sequence) &rest keyword-args &key key start end from-end count)
Generic Function: substitute-if-not (newitem pred collection &key key start end from-end count)

If ‘collection’ is a Lisp sequence, this simply calls ‘cl:substitute-if-not’. Also works on an FSet seq.

Package

fset.

Source

fset.lisp.

Methods
Method: substitute-if-not (newitem pred (s seq) &key key start end from-end count)
Method: substitute-if-not (newitem pred (s sequence) &rest keyword-args &key key start end from-end count)
Generic Function: tuple-merge (tuple1 tuple2 &optional val-fn)

Returns a new tuple containing all the keys of ‘tuple1’ and ‘tuple2’, where the value for each key contained in only one tuple is the value from that tuple, and the value for each key contained in both tuples is the result of calling ‘val-fn’ on the value from ‘tuple1’ and the value from ‘tuple2’. ‘val-fn’ defaults to simply returning its third argument, so the entries in ‘tuple2’ simply shadow those in ‘tuple1’.

Package

fset.

Source

tuples.lisp.

Methods
Method: tuple-merge ((tup1 tuple) (tup2 tuple) &optional val-fn)
Generic Function: union (set-or-bag1 set-or-bag2 &key test test-not)

Returns the union of the two sets/bags. The result is a set if both arguments are sets; otherwise a bag. The union of two bags is a bag whose multiplicity, for any value, is the maximum of its multiplicities in the two argument bags.

Package

fset.

Source

fset.lisp.

Methods
Method: union ((bs1 bounded-set) (bs2 bounded-set) &key)
Source

bounded-sets.lisp.

Method: union ((s set) (cs complement-set) &key)
Source

complement-sets.lisp.

Method: union ((cs complement-set) (s set) &key)
Source

complement-sets.lisp.

Method: union ((cs1 complement-set) (cs2 complement-set) &key)
Source

complement-sets.lisp.

Method: union ((br1 wb-2-relation) (br2 wb-2-relation) &key)
Source

relations.lisp.

Method: union ((s0 interval-set) (s1 interval-set) &key)
Source

interval.lisp.

Method: union ((b wb-bag) (s wb-set) &key)
Method: union ((s wb-set) (b wb-bag) &key)
Method: union ((b1 wb-bag) (b2 wb-bag) &key)
Method: union ((s1 wb-set) (s2 wb-set) &key)
Method: union ((ls1 list) (ls2 list) &rest keyword-args &key test test-not)
Generic Function: with (collection value1 &optional value2)

On a set, adds ‘value1’ to it, returning the updated set. On a bag, adds ‘value2’ occurrences of ‘value1’, returning the updated bag; ‘value2’ defaults to 1. On a map, adds a mapping from ‘value1’ (the key) to ‘value2’, returning the updated map. On a seq, replaces the element at index ‘value1’ with ‘value2’, returning the updated seq (the seq is extended in either direction if needed; previously uninitialized indices are filled with the seq’s default).

Package

fset.

Source

fset.lisp.

Methods
Method: with ((bs1 bounded-set) x &optional arg2)
Source

bounded-sets.lisp.

Method: with ((cs complement-set) x &optional arg2)
Source

complement-sets.lisp.

Method: with ((rel wb-list-relation) tuple &optional arg2)
Source

relations.lisp.

Method: with ((br wb-2-relation) x &optional y)
Source

relations.lisp.

Method: with ((s interval-set) (iv interval) &optional arg2)
Source

interval.lisp.

Method: with ((tuple tuple) (key tuple-key) &optional value)
Source

tuples.lisp.

Method: with ((s wb-seq) idx &optional val)
Method: with ((m wb-map) key &optional value)
Method: with ((b wb-bag) value &optional multiplicity)
Method: with ((s wb-set) value &optional arg2)
Generic Function: with-default (collection new-default)

Returns a new map or seq with the same contents as ‘collection’ but whose default is now ‘new-default’.

Package

fset.

Source

fset.lisp.

Methods
Method: with-default ((s wb-seq) new-default)
Method: with-default ((m wb-map) new-default)
Generic Function: with-first (seq val)

Returns ‘seq’ with ‘val’ prepended, that is, ‘val’ is element 0 of the result, and the elements of ‘seq’ appear starting at index 1.

Package

fset.

Source

fset.lisp.

Methods
Method: with-first ((s wb-seq) val)
Generic Function: with-last (seq val)

Returns ‘seq’ with ‘val’ appended, that is, ‘val’ is element ‘(size seq)’ of the result.

Package

fset.

Source

fset.lisp.

Methods
Method: with-last ((s wb-seq) val)
Generic Function: with-query (reg pattern metapattern query &optional arity)
Package

fset.

Methods
Method: with-query ((reg query-registry) (pattern list) (metapattern list) query &optional arity)
Source

relations.lisp.


6.1.6 Standalone methods

Method: adjust-sequence ((obj my-sequence) len &rest args)
Package

sb-sequence.

Source

testing.lisp.

Method: (setf elt) ((obj my-sequence) index)
Package

sb-sequence.

Source

testing.lisp.

Method: elt ((obj my-sequence) index)
Package

sb-sequence.

Source

testing.lisp.

Method: length ((obj my-sequence))
Package

sb-sequence.

Source

testing.lisp.

Method: make-sequence-like ((obj my-sequence) len &rest args)
Package

sb-sequence.

Source

testing.lisp.

Method: print-object ((object wb-list-relation) stream)
Source

relations.lisp.

Method: print-object ((object wb-bag) stream)
Source

fset.lisp.

Method: print-object ((object wb-map) stream)
Source

fset.lisp.

Method: print-object ((object wb-2-relation) stream)
Source

relations.lisp.

Method: print-object ((object bounded-set) stream)
Source

bounded-sets.lisp.

Method: print-object ((object wb-seq) stream)
Source

fset.lisp.

Method: print-object ((object dyn-tuple) stream)
Source

tuples.lisp.

Method: print-object ((object wb-set) stream)
Source

fset.lisp.

Method: print-object ((object complement-set) stream)
Source

complement-sets.lisp.

Method: print-object ((object tuple-key) stream)
Source

tuples.lisp.

Method: print-object ((object wb-bag-tree-node) stream)
Source

wb-trees.lisp.

Method: print-object ((object wb-set-tree-node) stream)
Source

wb-trees.lisp.

Method: print-object ((object interval-set) stream)
Source

interval.lisp.

Method: print-object ((object interval) stream)
Source

interval.lisp.

Method: print-object ((object wb-seq-tree-node) stream)
Source

wb-trees.lisp.

Method: print-object ((object wb-map-tree-node) stream)
Source

wb-trees.lisp.


6.1.7 Structures

Structure: 2-relation

The abstract class for FSet binary relations. It is a structure class.

Package

fset.

Source

relations.lisp.

Direct superclasses

relation.

Direct subclasses

wb-2-relation.

Direct methods
Structure: bag

The abstract class for FSet functional bags (multisets). It is a structure class.

Package

fset.

Source

order.lisp.

Direct superclasses

collection.

Direct subclasses

wb-bag.

Direct methods
Structure: bounded-set

A "bounded set" is a subset (not necessarily proper) of a specified set, called the "universe". (Topologically, it is a set in the discrete topology on the universe.)

Package

fset.

Source

bounded-sets.lisp.

Direct superclasses

set.

Direct methods
Direct slots
Slot: universe
Readers

bounded-set-universe.

Writers

(setf bounded-set-universe).

Slot: set
Readers

bounded-set-set.

Writers

(setf bounded-set-set).

Slot: complement?
Readers

bounded-set-complement?.

Writers

(setf bounded-set-complement?).

Structure: collection

The root class of the FSet functional collections hierarchy. It is a structure class.

Package

fset.

Source

order.lisp.

Direct superclasses

structure-object.

Direct subclasses
Structure: dyn-tuple

A class of functional tuples represented as vectors with dynamically- reordered key vectors. This is the default implementation of tuples in FSet.

Package

fset.

Source

tuples.lisp.

Direct superclasses

tuple.

Direct methods
Direct slots
Slot: descriptor
Readers

dyn-tuple-descriptor.

Writers

(setf dyn-tuple-descriptor).

Slot: contents
Readers

dyn-tuple-contents.

Writers

(setf dyn-tuple-contents).

Structure: list-relation

The abstract class for FSet list relations. It is a structure class. A list relation is a general relation (i.e. of arbitrary arity >= 2) whose tuples are in list form.

Package

fset.

Source

relations.lisp.

Direct superclasses

relation.

Direct subclasses

wb-list-relation.

Structure: map

The abstract class for FSet functional maps. It is a structure class.

Package

fset.

Source

order.lisp.

Direct superclasses

collection.

Direct subclasses

wb-map.

Direct methods
Direct slots
Slot: default
Readers

map-default.

Writers

(setf map-default).

Structure: query-registry
Package

fset.

Source

relations.lisp.

Direct superclasses

structure-object.

Direct methods
Direct slots
Slot: arity
Readers

query-registry-arity.

Writers

(setf query-registry-arity).

Slot: indices
Readers

query-registry-indices.

Writers

(setf query-registry-indices).

Slot: key-index
Readers

query-registry-key-index.

Writers

(setf query-registry-key-index).

Structure: relation

The abstract class for FSet relations. It is a structure class.

Package

fset.

Source

relations.lisp.

Direct superclasses

collection.

Direct subclasses
Direct methods
Structure: seq

The abstract class for FSet functional seqs (sequences, but we use the short name to avoid confusion with ‘cl:sequence’). It is a structure class.

Package

fset.

Source

order.lisp.

Direct superclasses

collection.

Direct subclasses

wb-seq.

Direct methods
Direct slots
Slot: default
Readers

seq-default.

Writers

(setf seq-default).

Structure: set

The abstract class for FSet functional sets. It is a structure class.

Package

fset.

Source

order.lisp.

Direct superclasses

collection.

Direct subclasses
Direct methods
Structure: tuple

The abstract class for FSet functional tuples. It is a structure class.

Package

fset.

Source

order.lisp.

Direct superclasses

collection.

Direct subclasses

dyn-tuple.

Direct methods
Structure: wb-2-relation

A class of functional binary relations represented as pairs of weight- balanced binary trees. This is the default implementation of binary relations in FSet. The inverse is constructed lazily, and maintained incrementally once constructed.

Package

fset.

Source

relations.lisp.

Direct superclasses

2-relation.

Direct methods
Direct slots
Slot: size
Readers

wb-2-relation-size.

Writers

(setf wb-2-relation-size).

Slot: map0
Readers

wb-2-relation-map0.

Writers

(setf wb-2-relation-map0).

Slot: map1
Readers

wb-2-relation-map1.

Writers

(setf wb-2-relation-map1).

Structure: wb-bag

A class of functional bags (multisets) represented as weight-balanced binary trees. This is the default implementation of bags in FSet.

Package

fset.

Source

fset.lisp.

Direct superclasses

bag.

Direct methods
Direct slots
Slot: contents
Readers

wb-bag-contents.

Writers

(setf wb-bag-contents).

Structure: wb-list-relation

A class of functional relations of arbitrary arity >= 2, whose tuples are in list form.

Package

fset.

Source

relations.lisp.

Direct superclasses

list-relation.

Direct methods
Direct slots
Slot: arity
Readers

wb-list-relation-arity.

Writers

(setf wb-list-relation-arity).

Slot: tuples
Readers

wb-list-relation-tuples.

Writers

(setf wb-list-relation-tuples).

Slot: indices
Readers

wb-list-relation-indices.

Writers

(setf wb-list-relation-indices).

Structure: wb-map

A class of functional maps represented as weight-balanced binary trees. This is the default implementation of maps in FSet.

Package

fset.

Source

fset.lisp.

Direct superclasses

map.

Direct methods
Direct slots
Slot: contents
Readers

wb-map-contents.

Writers

(setf wb-map-contents).

Structure: wb-seq

A class of functional seqs (sequences, but we use the short name to avoid confusion with ‘cl:sequence’) represented as weight-balanced binary trees. This is the default implementation of seqs in FSet.

Package

fset.

Source

fset.lisp.

Direct superclasses

seq.

Direct methods
Direct slots
Slot: contents
Readers

wb-seq-contents.

Writers

(setf wb-seq-contents).

Structure: wb-set

A class of functional sets represented as weight-balanced binary trees. This is the default implementation of sets in FSet.

Package

fset.

Source

fset.lisp.

Direct superclasses

set.

Direct methods
Direct slots
Slot: contents
Readers

wb-set-contents.

Writers

(setf wb-set-contents).


Previous: , Up: Public Interface   [Contents][Index]

6.1.8 Classes

Class: identity-ordering-mixin

A mixin class for classes whose instances will be used in FSet collections, and for which the appropriate equivalence relation is identity (‘eq’). This is the right choice for the vast majority of mutable classes.

Package

fset.

Source

order.lisp.

Direct subclasses

my-identity-ordered-obj.

Direct methods
Direct slots
Slot: serial-number
Initform

(atomic-incf fset::*sbcl-next-serial-number*)

Readers

serial-number.

Writers

(setf serial-number).


6.2 Internals


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.1 Constants

Constant: hedge-negative-infinity
Package

fset.

Source

wb-trees.lisp.

Constant: hedge-positive-infinity
Package

fset.

Source

wb-trees.lisp.

Constant: tuple-key-number-mask
Package

fset.

Source

port.lisp.

Constant: tuple-key-number-size

This limits the number of tuple-keys that can exist in a session.

Package

fset.

Source

port.lisp.

Constant: tuple-reorder-frequency

Controls how often we do tuple reordering. Must be 2^n - 1 for some n.

Package

fset.

Source

tuples.lisp.

Constant: tuple-value-chunk-bits
Package

fset.

Source

tuples.lisp.

Constant: tuple-value-chunk-size
Package

fset.

Source

tuples.lisp.

Constant: tuple-value-index-size

This limits the number of key/value pairs in any tuple.

Package

fset.

Source

port.lisp.

Constant: wb-tree-balance-factor
Package

fset.

Source

wb-trees.lisp.

Constant: wb-tree-precomputed-max-depths
Package

fset.

Source

wb-trees.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.2 Special variables

Special Variable: *empty-wb-2-relation*
Package

fset.

Source

relations.lisp.

Special Variable: *empty-wb-bag*
Package

fset.

Source

fset.lisp.

Special Variable: *empty-wb-map*
Package

fset.

Source

fset.lisp.

Special Variable: *empty-wb-seq*
Package

fset.

Source

fset.lisp.

Special Variable: *empty-wb-set*
Package

fset.

Source

fset.lisp.

Special Variable: *fset-rereading-readtable*

A copy of the standard readtable with the rereading FSet reader macros installed. This readtable can be used to read structure printed by the FSet print functions.

Package

fset.

Source

reader.lisp.

Special Variable: *wb-tree-max-string-length*
Package

fset.

Source

wb-trees.lisp.

Special Variable: *wb-tree-max-vector-length*
Package

fset.

Source

wb-trees.lisp.

Special Variable: tuple-reorder-score-threshold

The reorder score that triggers a major reordering.

Package

fset.

Source

tuples.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.3 Symbol macros

Symbol Macro: *memory-barrier-lock*
Package

fset.

Source

port.lisp.

Symbol Macro: +k0+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k1+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k2+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k3+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k4+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k5+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k6+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k7+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k8+
Package

fset.

Source

testing.lisp.

Symbol Macro: +k9+
Package

fset.

Source

testing.lisp.

Symbol Macro: +master-type-ordering+
Package

fset.

Source

order-macros.lisp.

Symbol Macro: +package-original-name+
Package

fset.

Source

order.lisp.

Symbol Macro: +tuple-desc-next-serial-number+
Package

fset.

Source

tuples.lisp.

Symbol Macro: +tuple-desc-next-serial-number-lock+
Package

fset.

Source

tuples.lisp.

Symbol Macro: +tuple-descriptor-map+
Package

fset.

Source

tuples.lisp.

Symbol Macro: +tuple-key-lock+
Package

fset.

Source

tuples.lisp.

Symbol Macro: +tuple-key-name-map+
Package

fset.

Source

tuples.lisp.

Symbol Macro: +tuple-key-seq+
Package

fset.

Source

tuples.lisp.

Symbol Macro: +tuple-random-value+
Package

fset.

Source

tuples.lisp.

Symbol Macro: +wb-tree-max-depths-with-values+
Package

fset.

Source

wb-trees.lisp.

Symbol Macro: +wb-tree-max-depths-without-values+
Package

fset.

Source

wb-trees.lisp.

Symbol Macro: tuple-keys
Package

fset.

Source

testing.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.4 Macros

Macro: check-three-arguments (arg2? op type)
Package

fset.

Source

fset-macros.lisp.

Macro: check-two-arguments (arg2? op type)
Package

fset.

Source

fset-macros.lisp.

Macro: do-tuple-internal ((key-var value-var tuple-form &optional value-form) &body body)
Package

fset.

Source

tuples.lisp.

Macro: do-wb-bag-tree-pairs ((val-var count-var tree-form &optional value-form) &body body)

Iterates over the pairs of the bag, for each one binding ‘val-var’ to the value and ‘count-var’ to its member count.

Package

fset.

Source

wb-trees.lisp.

Macro: do-wb-map-tree-pairs ((key-var value-var tree-form &optional value-form) &body body)
Package

fset.

Source

wb-trees.lisp.

Macro: do-wb-seq-tree-members ((var tree-form &optional value-form) &body body)
Package

fset.

Source

wb-trees.lisp.

Macro: do-wb-seq-tree-members-gen ((var tree-form start-form end-form from-end-form &optional value-form) &body body)
Package

fset.

Source

wb-trees.lisp.

Macro: do-wb-set-tree-members ((var tree-form &optional value-form) &body body)
Package

fset.

Source

wb-trees.lisp.

Macro: gen (op &rest args)
Package

fset.

Source

port.lisp.

Macro: length-nv (x)
Package

fset.

Source

port.lisp.

Macro: read-memory-barrier ()
Package

fset.

Source

port.lisp.

Macro: tuple-window-size (nkeys*2)
Package

fset.

Source

tuples.lisp.

Macro: while (pred &body body)
Package

fset.

Source

port.lisp.

Macro: with-lock ((lock &key wait?) &body body)
Package

fset.

Source

port.lisp.

Macro: write-memory-barrier ()
Package

fset.

Source

port.lisp.


Next: , Previous: , Up: Internals   [Contents][Index]

6.2.5 Compiler macros

Compiler Macro: update (fn coll &rest keys)
Package

fset.

Source

fset.lisp.


6.2.6 Ordinary functions

Function: #$-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: #%-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: #[-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: #{-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: #~-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: 2-relation-fn-compose (rel fn)
Package

fset.

Source

relations.lisp.

Function: 2-relation-to-wb-map (br)
Package

fset.

Source

relations.lisp.

Function: 2-relation? (object)
Package

fset.

Source

relations.lisp.

Function: add-to-front (list &rest vals)
Package

fset.

Source

testing.lisp.

Function: alist-assign (al r v)
Package

fset.

Source

testing.lisp.

Function: alist-bag-combine (al1 al2 fn)
Package

fset.

Source

testing.lisp.

Function: alist-bag-difference (al1 al2)
Package

fset.

Source

testing.lisp.

Function: alist-bag-intersection (al1 al2)
Package

fset.

Source

testing.lisp.

Function: alist-bag-product (al1 al2)
Package

fset.

Source

testing.lisp.

Function: alist-bag-remove (al r)
Package

fset.

Source

testing.lisp.

Function: alist-bag-size (al)
Package

fset.

Source

testing.lisp.

Function: alist-bag-sum (al1 al2)
Package

fset.

Source

testing.lisp.

Function: alist-bag-union (al1 al2)
Package

fset.

Source

testing.lisp.

Function: alist-remove (al r)
Package

fset.

Source

testing.lisp.

Function: augmented-mp (pattern metapattern)

Returns a list, of the same length as the pattern, which is like the metapattern except that each ‘:single’ has been replaced by a cons of ‘:single’ and the corresponding pattern element.

Package

fset.

Source

relations.lisp.

Function: augmented-mp-matches? (augmented-mp tuple)
Package

fset.

Source

relations.lisp.

Function: bag-filter (pred b)
Package

fset.

Source

fset.lisp.

Function: bag-filter-pairs (pred b)
Package

fset.

Source

fset.lisp.

Function: bag-from-list (l from-type)
Package

fset.

Source

fset.lisp.

Function: bag-image (fn b)
Package

fset.

Source

fset.lisp.

Function: bag-reduce (fn b initial-value key init?)
Package

fset.

Source

fset.lisp.

Function: bag-value-size (value)

The number of values represented by ‘value’, which can be more than 1 if ‘key’ is an ‘Equivalent-Bag’.

Package

fset.

Source

wb-trees.lisp.

Function: base-char-p (x)
Package

fset.

Source

port.lisp.

Reader: bounded-set-complement? (instance)
Writer: (setf bounded-set-complement?) (instance)
Package

fset.

Source

bounded-sets.lisp.

Target Slot

complement?.

Reader: bounded-set-set (instance)
Writer: (setf bounded-set-set) (instance)
Package

fset.

Source

bounded-sets.lisp.

Target Slot

set.

Reader: bounded-set-universe (instance)
Writer: (setf bounded-set-universe) (instance)
Package

fset.

Source

bounded-sets.lisp.

Target Slot

universe.

Function: bounded-set? (object)
Package

fset.

Source

bounded-sets.lisp.

Function: coerce-to-function (s)
Package

fset.

Source

fset.lisp.

Function: coerce-to-function-or-equal? (s)
Package

fset.

Source

fset.lisp.

Function: compare-intervals (iv0 iv1)

Second value is true if the two abut. ‘:equal’ means they overlap.

Package

fset.

Source

interval.lisp.

Function: compare-lists-lexicographically (a b)
Package

fset.

Source

order.lisp.

Function: compare-strings (a b)
Package

fset.

Source

order.lisp.

Reader: complement-set-complement (instance)
Writer: (setf complement-set-complement) (instance)
Package

fset.

Source

complement-sets.lisp.

Target Slot

complement.

Function: complement-set? (object)
Package

fset.

Source

complement-sets.lisp.

Function: copy-equivalent-bag (instance)
Package

fset.

Source

wb-trees.lisp.

Function: copy-equivalent-map (instance)
Package

fset.

Source

wb-trees.lisp.

Function: copy-equivalent-set (instance)
Package

fset.

Source

wb-trees.lisp.

Function: copy-my-integer (instance)
Package

fset.

Source

testing.lisp.

Function: copy-query-registry (instance)
Package

fset.

Source

relations.lisp.

Function: copy-tuple-desc (instance)
Package

fset.

Source

tuples.lisp.

Function: copy-tuple-key (instance)
Package

fset.

Source

tuples.lisp.

Function: copy-wb-bag-tree-node (instance)
Package

fset.

Source

wb-trees.lisp.

Function: copy-wb-map-tree-node (instance)
Package

fset.

Source

wb-trees.lisp.

Function: copy-wb-seq-tree-node (instance)
Package

fset.

Source

wb-trees.lisp.

Function: copy-wb-set-tree-node (instance)
Package

fset.

Source

wb-trees.lisp.

Reader: dyn-tuple-contents (instance)
Writer: (setf dyn-tuple-contents) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

contents.

Reader: dyn-tuple-descriptor (instance)
Writer: (setf dyn-tuple-descriptor) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

descriptor.

Function: dyn-tuple? (object)
Package

fset.

Source

tuples.lisp.

Function: empty-interval-set ()
Package

fset.

Source

interval.lisp.

Reader: equivalent-bag-alist (instance)
Writer: (setf equivalent-bag-alist) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

alist.

Function: equivalent-bag-compare (val1 count1 val2 count2)

Compares two pairs where the key of either or both may be an ‘Equivalent-Bag’.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-bag-difference (val1 count1 val2 count2)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-bag-intersect (val1 count1 val2 count2)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-bag-product (val1 count1 val2 count2)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-bag-subbag? (val1 count1 val2 count2)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-bag-sum (val1 count1 val2 count2)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-bag-union (val1 count1 val2 count2)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-bag? (object)
Package

fset.

Source

wb-trees.lisp.

Reader: equivalent-map-alist (instance)
Writer: (setf equivalent-map-alist) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

alist.

Function: equivalent-map-compare (key1 val1 key2 val2 val-fn)

Compares two pairs where the key of either or both may be an ‘Equivalent-Map’.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-map-difference (key1 val1 key2 val2)

Both ‘key1’ and ‘key2’ may be single values (representing a single key/value pair) or ‘Equivalent-Map’s of key/value pairs. That is, if ‘key1’ is a ‘Equivalent-Map’, ‘val1’ is ignored, and similarly for ‘key2’ and ‘val2’. If the difference is nonnull, returns two or three values: if it is a single pair, returns true, the key, and the value; if it is more than one pair, returns true and an ‘Equivalent-Map’ of the pairs. If the difference is empty, returns false.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-map-intersect (key1 val1 key2 val2 val-fn)

Both ‘key1’ and ‘key2’ may be single values (representing a single key/value pair) or ‘Equivalent-Map’s of key/value pairs. That is, if ‘key1’ is a ‘Equivalent-Map’, ‘val1’ is ignored, and similarly for ‘key2’ and ‘val2’. If the intersection is nonnull, returns two or three values: if it is a single pair, returns true, the key, and the value; if it is more than one pair, returns true and an ‘Equivalent-Map’ of the pairs. If the intersection is null, returns false.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-map-less (eqvm key)

Removes the pair associated with ‘key’ from ‘eqvm’, an ‘Equivalent-Map’. If the result is a single pair, it’s returned as two values; otherwise one value is returned, which is an ‘Equivalent-Map’.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-map-restrict (key val set-elt)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-map-restrict-not (key val set-elt)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-map-union (key1 val1 key2 val2 &optional val-fn)

Both ‘key1’ and ‘key2’ may be single values (representing a single key/value pair) or ‘Equivalent-Map’s of key/value pairs. That is, if ‘key1’ is a ‘Equivalent-Map’, ‘val1’ is ignored, and similarly for ‘key2’ and ‘val2’. Returns one or more new key/value pairs in which the "2" pairs override the "1" pairs. If the result is a single pair, it’s returned as two values; otherwise one value is returned, which is an ‘Equivalent-Map’.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-map? (object)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-set-compare (val1 val2)
Package

fset.

Source

wb-trees.lisp.

Function: equivalent-set-difference (val1 val2)

Both ‘val1’ and ‘val2’ may be single values (representing singleton sets) or ‘Equivalent-Set’s of values. If their difference is nonnull, returns two values: true, and the difference, represented as a single value if a singleton, else as an ‘Equivalent-Set’. If the difference is null, returns ‘nil’.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-set-disjoint? (val1 val2)

Both ‘val1’ and ‘val2’ may be single values (representing singleton sets) or ‘Equivalent-Set’s of values. If their intersection is null, returns true, else false.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-set-intersect (val1 val2)

Both ‘val1’ and ‘val2’ may be single values (representing singleton sets) or ‘Equivalent-Set’s of values. If their intersection is nonnull, returns two values: true, and the intersection, represented as a single value if a singleton, else as an ‘Equivalent-Set’. If the intersection is null, returns ‘nil’.

Package

fset.

Source

wb-trees.lisp.

Reader: equivalent-set-members (instance)
Writer: (setf equivalent-set-members) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

members.

Function: equivalent-set-subset? (val1 val2)

Both ‘val1’ and ‘val2’ may be single values (representing singleton sets) or ‘Equivalent-Set’s of values. Returns true iff ‘val2’ contains all members of ‘val1’.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-set-union (val1 val2)

Both ‘val1’ and ‘val2’ may be single values (representing singleton sets) or ‘Equivalent-Set’s of values. Returns their union represented as a single value if a singleton, else as an ‘Equivalent-Set’.

Package

fset.

Source

wb-trees.lisp.

Function: equivalent-set? (object)
Package

fset.

Source

wb-trees.lisp.

Function: eqv (a b &rest more)
Package

fset.

Source

testing.lisp.

Function: every (pred sequence0 &rest more-sequences)

FSet generic version of ‘cl:every’.

Package

fset.

Source

fset.lisp.

Function: expand-2-relation-constructor-form (type-name subforms)
Package

fset.

Source

relations.lisp.

Function: expand-bag-constructor-form (type-name args)
Package

fset.

Source

reader.lisp.

Function: expand-map-constructor-form (type-name args)
Package

fset.

Source

reader.lisp.

Function: expand-seq-constructor-form (type-name args)
Package

fset.

Source

reader.lisp.

Function: expand-set-constructor-form (type-name args)
Package

fset.

Source

reader.lisp.

Function: expand-tuple-constructor-form (type-name args)
Package

fset.

Source

reader.lisp.

Function: fset-setup-rereading-readtable (readtable)

Adds the FSet rereading reader macros to ‘readtable’. These reader macros will correctly read structure printed by the FSet print functions. Returns ‘readtable’.

Package

fset.

Source

reader.lisp.

Function: get-indices (rel augmented-mp)

Returns a list giving the index to use for each element of ‘augmented-mp’.

Package

fset.

Source

relations.lisp.

Function: get-inverse (br)
Package

fset.

Source

relations.lisp.

Function: greater-than? (a b)
Package

fset.

Source

order.lisp.

Function: handle-var-arity (rel-arity pattern metapattern)
Package

fset.

Source

relations.lisp.

Reader: interval-kind (instance)
Writer: (setf interval-kind) (instance)
Package

fset.

Source

interval.lisp.

Target Slot

kind.

Function: interval-kind-symbol (lower-closed? upper-closed?)
Package

fset.

Source

interval.lisp.

Reader: interval-lower (instance)
Writer: (setf interval-lower) (instance)
Package

fset.

Source

interval.lisp.

Target Slot

lower.

Function: interval-lower-closed? (iv)
Package

fset.

Source

interval.lisp.

Reader: interval-set-contents (instance)
Writer: (setf interval-set-contents) (instance)
Package

fset.

Source

interval.lisp.

Target Slot

contents.

Function: interval-set? (object)
Package

fset.

Source

interval.lisp.

Reader: interval-upper (instance)
Writer: (setf interval-upper) (instance)
Package

fset.

Source

interval.lisp.

Target Slot

upper.

Function: interval-upper-closed? (iv)
Package

fset.

Source

interval.lisp.

Function: interval? (object)
Package

fset.

Source

interval.lisp.

Function: less-than? (a b)
Package

fset.

Source

order.lisp.

Function: list-insert (s pos r)
Package

fset.

Source

testing.lisp.

Function: list-partition (pred ls)
Package

fset.

Source

fset.lisp.

Function: list-relation? (object)
Package

fset.

Source

relations.lisp.

Function: list-remove (s pos)
Package

fset.

Source

testing.lisp.

Function: list-set-elt (s pos val)
Package

fset.

Source

testing.lisp.

Function: list-to-wb-2-relation (alist key-fn value-fn)
Package

fset.

Source

relations.lisp.

Function: make-bounded-set-internal (universe set complement?)
Package

fset.

Source

bounded-sets.lisp.

Function: make-char (code bits)
Package

fset.

Source

port.lisp.

Function: make-complement-set (complement)
Package

fset.

Source

complement-sets.lisp.

Function: make-dyn-tuple (descriptor contents)
Package

fset.

Source

tuples.lisp.

Function: make-equivalent-bag (alist)
Package

fset.

Source

wb-trees.lisp.

Function: make-equivalent-map (alist)
Package

fset.

Source

wb-trees.lisp.

Function: make-equivalent-set (members)
Package

fset.

Source

wb-trees.lisp.

Function: make-interval (lower upper lower-closed? upper-closed?)
Package

fset.

Source

interval.lisp.

Function: make-interval-set (contents)
Package

fset.

Source

interval.lisp.

Function: make-lock (&optional name)
Package

fset.

Source

port.lisp.

Function: make-my-integer (value)
Package

fset.

Source

testing.lisp.

Function: make-query-registry (arity indices key-index)
Package

fset.

Source

relations.lisp.

Function: make-raw-interval (lower upper kind)
Package

fset.

Source

interval.lisp.

Function: make-raw-wb-bag-tree-node (size total-count value count left right)
Package

fset.

Source

wb-trees.lisp.

Function: make-raw-wb-map-tree-node (size key value left right)
Package

fset.

Source

wb-trees.lisp.

Function: make-raw-wb-seq-tree-node (size left right)
Package

fset.

Source

wb-trees.lisp.

Function: make-raw-wb-set-tree-node (size value left right)
Package

fset.

Source

wb-trees.lisp.

Function: make-tuple-desc (key-set pairs)
Package

fset.

Source

tuples.lisp.

Function: make-tuple-desc-internal (key-set pairs lock serial-number)
Package

fset.

Source

tuples.lisp.

Function: make-tuple-key (name default-fn number)
Package

fset.

Source

tuples.lisp.

Function: make-wb-2-relation (size map0 map1)
Package

fset.

Source

relations.lisp.

Function: make-wb-bag (contents)
Package

fset.

Source

fset.lisp.

Function: make-wb-bag-tree-iterator (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-bag-tree-iterator-internal (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-bag-tree-node (value count left right)

The low-level constructor for a bag tree node. ‘count’ is ignored and can be ‘nil’ if value is an ‘Equivalent-Bag’.

Package

fset.

Source

wb-trees.lisp.

Function: make-wb-bag-tree-pair-iterator (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-bag-tree-pair-iterator-internal (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-list-relation (arity tuples indices)
Package

fset.

Source

relations.lisp.

Function: make-wb-map (contents &optional default)
Package

fset.

Source

fset.lisp.

Function: make-wb-map-tree-iterator (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-map-tree-iterator-internal (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-map-tree-node (key value left right)

The low-level constructor for a map tree node.

Package

fset.

Source

wb-trees.lisp.

Function: make-wb-seq (contents &optional default)
Package

fset.

Source

fset.lisp.

Function: make-wb-seq-tree-iterator (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-seq-tree-iterator-internal (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-seq-tree-node (left right)

The low-level constructor for a sequence tree node.

Package

fset.

Source

wb-trees.lisp.

Function: make-wb-set (contents)
Package

fset.

Source

fset.lisp.

Function: make-wb-set-tree-iterator (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-set-tree-iterator-internal (tree)
Package

fset.

Source

wb-trees.lisp.

Function: make-wb-set-tree-node (value left right)

The low-level constructor for a set tree node.

Package

fset.

Source

wb-trees.lisp.

Function: make-wb-tree-iterator (tree size frame-size nodes-have-values?)
Package

fset.

Source

wb-trees.lisp.

Function: map-compare (m1 m2)
Package

fset.

Source

testing.lisp.

Function: map-filter (pred m)
Package

fset.

Source

fset.lisp.

Function: map-fn-compose (m fn)
Package

fset.

Source

fset.lisp.

Function: map-image (fn m)
Package

fset.

Source

fset.lisp.

Function: map-key-size (key)

The number of domain values represented by ‘key’, which can be more than 1 if ‘key’ is an ‘Equivalent-Map’.

Package

fset.

Source

wb-trees.lisp.

Function: map-reduce (fn m initial-value key init?)
Package

fset.

Source

fset.lisp.

Function: map-sort-and-group (m)
Package

fset.

Source

testing.lisp.

Function: map-to-sets-to-wb-2-relation (m)
Package

fset.

Source

relations.lisp.

Function: map-to-wb-2-relation (m)
Package

fset.

Source

relations.lisp.

Function: my-integer-p (object)
Package

fset.

Source

testing.lisp.

Reader: my-integer-value (instance)
Writer: (setf my-integer-value) (instance)
Package

fset.

Source

testing.lisp.

Target Slot

value.

Function: notany (pred sequence0 &rest more-sequences)

FSet generic version of ‘cl:notany’.

Package

fset.

Source

fset.lisp.

Function: notevery (pred sequence0 &rest more-sequences)

FSet generic version of ‘cl:notevery’.

Package

fset.

Source

fset.lisp.

Function: pick (fs)
Package

fset.

Source

testing.lisp.

Function: print-bounded-set (bs stream level)
Package

fset.

Source

bounded-sets.lisp.

Function: print-complement-set (cs stream level)
Package

fset.

Source

complement-sets.lisp.

Function: print-dyn-tuple (tuple stream level)
Package

fset.

Source

tuples.lisp.

Function: print-interval (iv stream level)
Package

fset.

Source

interval.lisp.

Function: print-interval-set (set stream level)
Package

fset.

Source

interval.lisp.

Function: print-tuple-key (key stream level)
Package

fset.

Source

tuples.lisp.

Function: print-wb-2-relation (br stream level)
Package

fset.

Source

relations.lisp.

Function: print-wb-bag (bag stream level)
Package

fset.

Source

fset.lisp.

Function: print-wb-list-relation (rel stream level)
Package

fset.

Source

relations.lisp.

Function: print-wb-map (map stream level)
Package

fset.

Source

fset.lisp.

Function: print-wb-seq (seq stream level)
Package

fset.

Source

fset.lisp.

Function: print-wb-set (set stream level)
Package

fset.

Source

fset.lisp.

Reader: query-registry-arity (instance)
Writer: (setf query-registry-arity) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

arity.

Reader: query-registry-indices (instance)
Writer: (setf query-registry-indices) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

indices.

Reader: query-registry-key-index (instance)
Writer: (setf query-registry-key-index) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

key-index.

Function: query-registry-p (object)
Package

fset.

Source

relations.lisp.

Function: random-test (n)
Package

fset.

Source

testing.lisp.

Function: reduced-tuple (tuple augmented-mp)

Returns a list of those members of ‘tuple’ corresponding to instantiated positions in the original pattern.

Package

fset.

Source

relations.lisp.

Function: relation? (object)
Package

fset.

Source

relations.lisp.

Function: rereading-#[-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: rereading-#{-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: rereading-#~-reader (stream subchar arg)
Package

fset.

Source

reader.lisp.

Function: run-test-suite (n-iterations &optional random-seed)
Package

fset.

Source

testing.lisp.

Function: seq-compare (s1 s2)
Package

fset.

Source

testing.lisp.

Reader: seq-default (instance)
Writer: (setf seq-default) (instance)
Package

fset.

Source

order.lisp.

Target Slot

default.

Function: seq-filter (fn s)
Package

fset.

Source

fset.lisp.

Function: seq-image (fn s)
Package

fset.

Source

fset.lisp.

Function: seq-partition (fn s)
Package

fset.

Source

fset.lisp.

Function: seq-position (x s)
Package

fset.

Source

testing.lisp.

Function: seq-reduce (fn s initial-value key init? start end from-end?)
Package

fset.

Source

fset.lisp.

Function: set-compare (s1 s2)
Package

fset.

Source

testing.lisp.

Function: set-filter (pred s)
Package

fset.

Source

fset.lisp.

Function: set-image (fn s)
Package

fset.

Source

fset.lisp.

Function: set-partition (pred s)
Package

fset.

Source

fset.lisp.

Function: set-reduce (fn s initial-value key init?)
Package

fset.

Source

fset.lisp.

Function: set-transitive-closure (r s)
Package

fset.

Source

relations.lisp.

Function: set-value-size (value)

The number of members represented by ‘value’, which can be more than 1 if ‘value’ is an ‘Equivalent-Set’.

Package

fset.

Source

wb-trees.lisp.

Function: some (pred sequence0 &rest more-sequences)

FSet generic version of ‘cl:some’.

Package

fset.

Source

fset.lisp.

Function: split (pred collection)

Deprecated; use ‘partition’.

Package

fset.

Source

fset.lisp.

Function: string-insert (str idx ch)

Returns a new string like ‘str’ but with ‘ch’ inserted at ‘idx’. Careful – does no bounds checking on ‘str’, which it assumes is simple.

Package

fset.

Source

wb-trees.lisp.

Function: string-remove-at (str idx)
Package

fset.

Source

wb-trees.lisp.

Function: string-seq-to-set (vec lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: string-subseq (str start &optional end)

Returns a subsequence of ‘str’ between ‘start’ and ‘end’. Careful – does no bounds checking on ‘str’, which it assumes is simple.

Package

fset.

Source

wb-trees.lisp.

Function: string-subseq-insert (str start end idx ch)

Takes the subsequence of ‘str’ from ‘start’ to ‘end’, then at ‘idx’ within the result, inserts ‘ch’, returning the new string.

Package

fset.

Source

wb-trees.lisp.

Function: string-update (str idx ch)
Package

fset.

Source

wb-trees.lisp.

Function: test-bag-operations (i)
Package

fset.

Source

testing.lisp.

Function: test-bounded-sets ()

Simple tests on the Bounded Sets operations

Package

fset.

Source

testing.lisp.

Function: test-cl-generic-sequence-ops (i fs0 s0 fs1 s1)
Package

fset.

Source

testing.lisp.

Function: test-compare-lexicographically ()
Package

fset.

Source

testing.lisp.

Function: test-complement-sets ()

Simple tests on the Complement Sets operations

Package

fset.

Source

testing.lisp.

Function: test-equivalent-sets (&optional size reps)
Package

fset.

Source

testing.lisp.

Function: test-functional-deep-update ()
Package

fset.

Source

testing.lisp.

Function: test-map-operations (i a-set)
Package

fset.

Source

testing.lisp.

Function: test-misc ()

Tests some things that don’t need extensive random test cases generated.

Package

fset.

Source

testing.lisp.

Function: test-modify-macros ()
Package

fset.

Source

testing.lisp.

Function: test-reader ()
Package

fset.

Source

testing.lisp.

Function: test-relations ()

Simple tests on Relations

Package

fset.

Source

testing.lisp.

Function: test-rereader ()
Package

fset.

Source

testing.lisp.

Function: test-seq-operations (i)
Package

fset.

Source

testing.lisp.

Function: test-set-operations (i)
Package

fset.

Source

testing.lisp.

Function: test-tuple-operations (i)
Package

fset.

Source

testing.lisp.

Function: test-type-dispatch-speed (n)
Package

fset.

Source

testing.lisp.

Function: time-index (seq n)
Package

fset.

Source

testing.lisp.

Function: time-seq-iter (seq n)
Package

fset.

Source

testing.lisp.

Reader: tuple-desc-key-set (instance)
Writer: (setf tuple-desc-key-set) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

key-set.

Reader: tuple-desc-lock (instance)
Writer: (setf tuple-desc-lock) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

lock.

Reader: tuple-desc-next-desc-map (instance)
Writer: (setf tuple-desc-next-desc-map) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

next-desc-map.

Function: tuple-desc-p (object)
Package

fset.

Source

tuples.lisp.

Reader: tuple-desc-pairs (instance)
Writer: (setf tuple-desc-pairs) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

pairs.

Reader: tuple-desc-reorder-map-map (instance)
Writer: (setf tuple-desc-reorder-map-map) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

reorder-map-map.

Reader: tuple-desc-serial-number (instance)
Writer: (setf tuple-desc-serial-number) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

serial-number.

Function: tuple-get-reorder-map (old-desc new-desc)
Package

fset.

Source

tuples.lisp.

Reader: tuple-key-default-fn (instance)
Writer: (setf tuple-key-default-fn) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

default-fn.

Reader: tuple-key-number (instance)
Writer: (setf tuple-key-number) (instance)
Package

fset.

Source

tuples.lisp.

Target Slot

number.

Function: tuple-lookup (tuple key &optional no-reorder?)
Package

fset.

Source

tuples.lisp.

Function: tuple-make-reorder-map (old-desc new-desc)
Package

fset.

Source

tuples.lisp.

Function: tuple-random-value ()
Package

fset.

Source

tuples.lisp.

Function: tuple-reorder-keys (tuple idx)
Package

fset.

Source

tuples.lisp.

Function: tuple-with (tuple key val)
Package

fset.

Source

tuples.lisp.

Function: update (fn coll &rest keys)

Returns a new version of ‘coll’ in which the element reached by doing chained ‘lookup’s on ‘keys’ is updated by ‘fn’. An example will help a lot here: instead of writing

(incf (@ (@ (@ foo ’a) 3) 7))

you can write, equivalently

(setq foo (update #’1+ foo ’a 3 7))

This is perhaps most useful in contexts where you don’t want to do the ‘setq’ anyway.

Package

fset.

Source

fset.lisp.

Function: vector-insert (vec idx val)

Returns a new vector like ‘vec’ but with ‘val’ inserted at ‘idx’. Careful – does no bounds checking on ‘vec’, which it assumes is simple.

Package

fset.

Source

wb-trees.lisp.

Function: vector-insert-from-string (str idx val)

Returns a new vector like ‘str’ (a string) but with ‘val’ inserted at ‘idx’. Careful – does no bounds checking on ‘str’, which it assumes is simple.

Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-bag-diff (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-bag-intersect (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-bag-product (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-bag-subbag? (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-bag-sum (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-bag-union (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-diff-2 (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-intersect (pr1 pr2 val-fn lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-restrict (map-pr set-vec lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-restrict-not (map-pr set-vec lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-pair-union (pr1 pr2 val-fn lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-remove-at (vec idx)
Package

fset.

Source

wb-trees.lisp.

Function: vector-seq-to-set (vec lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: vector-set-binary-search (vec value)

Searches a vector set ‘vec’ for ‘value’. Returns two values, a symbol and an index. If ‘value’, or a value equivalent to ‘value’, is in ‘vec’, the symbol is ‘:equal’ resp. ‘:unequal’, and the index is the position of the value; otherwise, the symbol is ‘nil’ and the index is where ‘value’ would go if it were to be inserted.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-binary-search-cfn (vec value cfn)

Searches a vector set ‘vec’ for ‘value’. Returns two values, a symbol and an index. If ‘value’, or a value equivalent to ‘value’, is in ‘vec’, the symbol is ‘:equal’ resp. ‘:unequal’, and the index is the position of the value; otherwise, the symbol is ‘nil’ and the index is where ‘value’ would go if it were to be inserted.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-binary-search-hi (vec hi)

Returns the index of the right edge of the last member of ‘vec’ that is below ‘hi’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-binary-search-lo (vec lo)

Returns the index of the left edge of the first member of ‘vec’ that is above ‘lo’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-diff (vec1 vec2 lo hi)

Returns, as a vector, the set difference of vectors ‘vec1’ less ‘vec2’, restricted to those members above ‘lo’ and below ‘hi’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-diff-2 (vec1 vec2 lo hi)

Returns, as two vector values, the set difference of vectors ‘str1’ less ‘str2’ and that of ‘str2’ less ‘str1’, restricted to those members above ‘lo’ and below ‘hi’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-disjoint? (vec1 vec2 lo hi)

Returns true iff ‘vec1’ does not contain any member of ‘vec2’, restricted to those members above ‘lo’ and below ‘hi’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-intersect (vec1 vec2 lo hi)

Returns, as a vector, the intersection of vectors ‘vec1’ and ‘vec2’, restricted to those members above ‘lo’ and below ‘hi’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-subset? (vec1 vec2 lo hi)

Returns true iff ‘vec1’ contains all members of ‘vec2’, restricted to those members above ‘lo’ and below ‘hi’. ‘vec2’ may be ‘nil’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-set-union (vec1 vec2 lo hi)

Returns, as a vector, the union of vectors ‘vec1’ and ‘vec2’, restricted to those members above ‘lo’ and below ‘hi’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-subseq (vec start &optional end)

Returns a subsequence of ‘vec’ between ‘start’ and ‘end’, or ‘nil’ if the result would be of zero length. Careful – does no bounds checking on ‘vec’, which it assumes is simple.

Package

fset.

Source

wb-trees.lisp.

Function: vector-subseq-insert (vec start end idx val)

Takes the subsequence of ‘vec’ from ‘start’ to ‘end’, then at ‘idx’ within the result, inserts ‘val’, returning the new vector.

Package

fset.

Source

wb-trees.lisp.

Function: vector-update (vec idx val)

Returns a new vector like ‘vec’ but with ‘val’ at ‘idx’.

Package

fset.

Source

wb-trees.lisp.

Function: vector-update-from-string (str idx value)
Package

fset.

Source

wb-trees.lisp.

Reader: wb-2-relation-map0 (instance)
Writer: (setf wb-2-relation-map0) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

map0.

Reader: wb-2-relation-map1 (instance)
Writer: (setf wb-2-relation-map1) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

map1.

Reader: wb-2-relation-size (instance)
Writer: (setf wb-2-relation-size) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

size.

Function: wb-2-relation? (object)
Package

fset.

Source

relations.lisp.

Reader: wb-bag-contents (instance)
Writer: (setf wb-bag-contents) (instance)
Package

fset.

Source

fset.lisp.

Target Slot

contents.

Function: wb-bag-tree-arb-pair (tree)

Returns an arbitrary member of the bag and its count. Assumes the bag is nonempty.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-build-node (value count left right)

Constructs a ‘WB-Bag-Tree’, performing one rebalancing step if required. ‘value’ must already be known to go between ‘left’ and ‘right’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-compare (tree1 tree2)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-compare-rng (tree1 base1 tree2 base2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-concat (value count left right)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-diff (tree1 tree2)

Returns the set difference of ‘tree1’ less ‘tree2’. Runs in time linear in the total sizes of the two trees.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-diff-rng (tree1 tree2 lo hi)

Returns the set difference of ‘tree1’ less ‘tree2’, considering only those members that are above ‘lo’ and below ‘hi’, and assuming that the root values of ‘tree1’ and ‘tree2’ are in this range.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-find-equivalent (tree value)

If ‘tree’ contains one or more values equivalent to ‘value’, returns (first value) true, (second value) either the one value or an ‘Equivalent-Bag’ containing the values, and (third value) if the second value was a single value, the corresponding count; otherwise ‘nil’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-from-list (lst)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-greatest-pair (tree)

Assumes ‘tree’ is nonempty. Returns the greatest member, or an arbitrary greatest member if there are more than one; the second value is the associated multiplicity.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-intersect (tree1 tree2)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-intersect-rng (tree1 tree2 lo hi)

Returns the intersection of ‘tree1’ with ‘tree2’, considering only those members that are above ‘lo’ and below ‘hi’, and assuming that the root values of ‘tree1’ and ‘tree2’ are in this range.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-iterator-canonicalize (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-iterator-done? (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-iterator-get (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-join (left right)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-least-pair (tree)

Assumes ‘tree’ is nonempty. Returns the least member, or an arbitrary least member if there are more than one; the second value is the associated count.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-less (tree value &optional count)

Returns ‘tree’ with the count for ‘value’ decremented; if that count was 1, ‘value’ is removed entirely.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-less-minimum (tree)

Assumes ‘tree’ is nonempty. Returns a new tree with the minimum value removed.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-minimum-pair (tree)

Assumes ‘tree’ is nonempty. Returns the minimum value and count as two values. The value may be an ‘Equivalent-Bag’, in which case, as usual, the count is not meaningful.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-multiplicity (tree value)

Returns the multiplicity of ‘value’ in ‘tree’, or 0 if ‘value’ does not appear in ‘tree’. As a second value, returns the value found, if any.

Package

fset.

Source

wb-trees.lisp.

Reader: wb-bag-tree-node-count (instance)
Writer: (setf wb-bag-tree-node-count) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

count.

Reader: wb-bag-tree-node-left (instance)
Writer: (setf wb-bag-tree-node-left) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

left.

Function: wb-bag-tree-node-print (node stream depth)

Print function for ‘WB-Bag-Tree-Node’, q.v.

Package

fset.

Source

wb-trees.lisp.

Reader: wb-bag-tree-node-right (instance)
Writer: (setf wb-bag-tree-node-right) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

right.

Reader: wb-bag-tree-node-size (instance)
Writer: (setf wb-bag-tree-node-size) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

size.

Reader: wb-bag-tree-node-total-count (instance)
Writer: (setf wb-bag-tree-node-total-count) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

total-count.

Reader: wb-bag-tree-node-value (instance)
Writer: (setf wb-bag-tree-node-value) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

value.

Function: wb-bag-tree-node? (object)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-pair-iterator-canonicalize (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-pair-iterator-done? (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-pair-iterator-get (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-product (tree1 tree2)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-product-rng (tree1 tree2 lo hi)

Returns the Production of ‘tree1’ with ‘tree2’, considering only those members that are above ‘lo’ and below ‘hi’, and assuming that the root values of ‘tree1’ and ‘tree2’ are in this range.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-rank (tree value)

Searches a bag tree ‘tree’ for ‘value’. Returns two values, a boolean and an index. If ‘value’, or a value equivalent to ‘value’, is in ‘tree’, the symbol is true, and the index is the rank of the value; otherwise, the boolean is false and the index is the rank ‘value’ would have if it were to be added. Note that if the bag contains equivalent-but-unequal elements, the rank of each of several such elements is guaranteed consistent only within the same tree (by ‘eq’), not between equal trees.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-rank-pair (tree rank)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-rank-pair-internal (tree rank)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-rank-trim (tree base lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-size (tree)

The number of value/count pairs contained in this tree.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-split (tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-subbag? (tree1 tree2)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-subbag?-rng (tree1 tree2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-sum (tree1 tree2)

Returns the sum of ‘tree’ and ‘tree2’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-sum-rng (tree1 tree2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-to-set-tree (tree)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-total-count (tree)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-trim (tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-union (tree1 tree2)

Returns the union of ‘tree’ and ‘tree2’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-union-rng (tree1 tree2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-vector-pair-sum (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-vector-pair-union (pr1 pr2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-verify (tree)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-verify-rng (tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-bag-tree-with (tree value &optional count)

Returns ‘tree’ with ‘value’ added with a count of ‘count’ (if it was already present, its count is incremented by ‘count’). ‘value’ may be an ‘Equivalent-Bag’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-bag? (object)
Package

fset.

Source

fset.lisp.

Reader: wb-list-relation-arity (instance)
Writer: (setf wb-list-relation-arity) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

arity.

Reader: wb-list-relation-indices (instance)
Writer: (setf wb-list-relation-indices) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

indices.

Reader: wb-list-relation-tuples (instance)
Writer: (setf wb-list-relation-tuples) (instance)
Package

fset.

Source

relations.lisp.

Target Slot

tuples.

Function: wb-list-relation? (object)
Package

fset.

Source

relations.lisp.

Reader: wb-map-contents (instance)
Writer: (setf wb-map-contents) (instance)
Package

fset.

Source

fset.lisp.

Target Slot

contents.

Function: wb-map-default (instance)
Package

fset.

Source

fset.lisp.

Function: (setf wb-map-default) (instance)
Package

fset.

Source

fset.lisp.

Function: wb-map-from-cl-sequence (s key-fn value-fn)
Package

fset.

Source

fset.lisp.

Function: wb-map-from-list (list key-fn value-fn)
Package

fset.

Source

fset.lisp.

Function: wb-map-tree-arb-pair (tree)

Selects an arbitrary pair of the map. Assumes it is nonnull.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-build-node (key value left right)

Constructs a ‘WB-Map-Tree’, performing one rebalancing step if required. ‘key’ must already be known to go between ‘left’ and ‘right’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-compare (tree1 tree2 &optional val-fn)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-compare-rng (tree1 base1 tree2 base2 lo hi val-fn)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-compose (tree fn)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-concat (key value left right)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-concat-maybe (pair? key value left right)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-diff-2 (tree1 tree2)

Returns two values: one containing the pairs that are in ‘tree1’ but not ‘tree2’, and the other containing the pairs that are in ‘tree2’ but not ‘tree1’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-diff-2-rng (tree1 tree2 lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-domain (tree)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-find-equivalent (tree key)

If ‘tree’ contains one or more keys equivalent to ‘value’, returns (first value) true, (second value) either the one key or an ‘Equivalent-Map’ containing the values, and (third value) if the second value was a single key, the corresponding value; otherwise ‘nil’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-greatest-pair (tree)

Assumes ‘tree’ is nonempty. Returns the greatest key and its value, or an arbitrary greatest key and its value if there are more than one.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-intersect (tree1 tree2 val-fn)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-intersect-rng (tree1 tree2 val-fn lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-iterator-canonicalize (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-iterator-done? (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-iterator-get (iter)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-join (left right)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-least-pair (tree)

Assumes ‘tree’ is nonempty. Returns the least key and its value, or an arbitrary least key and its value if there are more than one.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-less (tree key)

Returns a new tree like ‘tree’, but with any entry for ‘key’ removed.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-less-minimum (tree)

Assumes ‘tree’ is nonempty. Returns a new tree with the minimum key/value pair removed.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-lookup (tree key)

If ‘tree’ contains a pair whose key is ‘key’, returns two values, true and the associated value; otherwise ‘nil’.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-minimum-pair (tree)

Assumes ‘tree’ is nonempty. Returns the minimum key and value as two values. The key may be an ‘Equivalent-Map’, in which case, as usual, the value is not meaningful.

Package

fset.

Source

wb-trees.lisp.

Reader: wb-map-tree-node-key (instance)
Writer: (setf wb-map-tree-node-key) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

key.

Reader: wb-map-tree-node-left (instance)
Writer: (setf wb-map-tree-node-left) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

left.

Function: wb-map-tree-node-print (node stream depth)

Print function for ‘WB-Map-Tree-Node’, q.v.

Package

fset.

Source

wb-trees.lisp.

Reader: wb-map-tree-node-right (instance)
Writer: (setf wb-map-tree-node-right) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

right.

Reader: wb-map-tree-node-size (instance)
Writer: (setf wb-map-tree-node-size) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

size.

Reader: wb-map-tree-node-value (instance)
Writer: (setf wb-map-tree-node-value) (instance)
Package

fset.

Source

wb-trees.lisp.

Target Slot

value.

Function: wb-map-tree-node? (object)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-rank (tree key)

Searches a map tree ‘tree’ for ‘key’. Returns two values, a boolean and an index. If ‘key’, or a value equivalent to ‘key’, is in ‘tree’, the boolean is true, and the index is the rank of the value; otherwise, the boolean is false and the index is the rank ‘key’ would have if it were to be added. Note that if the map contains equivalent-but-unequal keys, the rank of each of several such keys is guaranteed consistent only within the same tree (by ‘eq’), not between equal trees.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-rank-pair (tree rank)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-rank-pair-internal (tree rank)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-rank-trim (tree base lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-restrict (map-tree set-tree)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-restrict-not (map-tree set-tree)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-restrict-not-rng (map-tree set-tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-restrict-rng (map-tree set-tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-size (tree)

The number of key/value pairs contained in this tree.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-split (tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-trim (tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-union (tree1 tree2 val-fn)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-union-rng (tree1 tree2 val-fn lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-vector-pair-union (pr1 pr2 val-fn lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-verify (tree)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-verify-rng (tree lo hi)
Package

fset.

Source

wb-trees.lisp.

Function: wb-map-tree-with (tree key value)

Returns a new tree like ‘tree’ but with the pair < ‘key’, ‘value’ > added, shadowing any previous pair with the same key.

Package

fset.

Source

wb-trees.lisp.

Function: wb-map? (object)
Package

fset.

Source

fset.lisp.

Reader: wb-seq-contents (instance)
Writer: (setf wb-seq-contents) (instance)
Package

fset.

Source

fset.lisp.

Target Slot

contents.

Function: wb-seq-default (instance)
Package

fset.

Source

fset.lisp.

Function: (setf wb-seq-default) (instance)