Class summary | |
---|---|
sorted-list-merger |
Method summary | |
---|---|
key | sorted-list-merger |
lists | sorted-list-merger |
next-item | (sorted-list-merger sorted-list-merger) |
test | sorted-list-merger |
tree-difference | a b |
Function summary | |
---|---|
add-hash-table | table1 table2 &key overwrite |
all-biggest | fn l &key (key (function identity)) |
all-smallest | fn l |
all-subsets | list &key (min-length 1) |
always | &rest elements |
array->list | array |
assq | obj list &key (test (function eq)) |
assqv | obj list &key (test (function eq)) |
binary-search | sorted-vector value &key (key (function identity)) (test (function <=)) |
collect-ignore-nils | &rest lists |
combinations | &rest lists |
combinations-of-length | elements length |
copy-hash-table | source |
deep-reverse | tree |
duplicates? | list &key (test (function equal)) (key (function identity)) |
eq-sets | set-1 set-2 |
eql-sets | set-1 set-2 |
equal-sets | set-1 set-2 &key (test (function equal)) key |
extremum | list &key (key (function identity)) (test (function >)) |
extremum-position | list &key (key (function identity)) (test (function >)) |
find-all | what lst &key (test (function eq)) (key (function identity)) |
find-all-anywhere | item tree &key (test (function eq)) (key (function identity)) |
find-all-anywhere-if | test tree &key (key (function identity)) |
find-all-anywhere-of-type | type tree &key (key (function identity)) |
find-all-if | test lst &key (key (function identity)) |
find-all-if-not | test lst &key (key (function identity)) |
find-all-of-type | type lst &key (key (function identity)) |
find-anywhere | item tree &key (test (function eq)) (key (function identity)) |
find-of-type | type lst &key (key (function identity)) |
flatten | list |
get-duplicate-elements | lst |
is-set | list &key (test (function eq)) key |
is-subset | sub-set super-set &key (test (function eq)) key |
length< | arg1 arg2 |
length<= | arg1 arg2 |
length= | arg1 arg2 |
length> | arg1 arg2 |
length>= | arg1 arg2 |
list->array | list |
list-length<=l | list1 list2 |
list-length<=n | list length |
list-length<l | list1 list2 |
list-length<n | list length |
list-length=l | list1 list2 |
list-length=n | list length |
list-length>=l | list1 list2 |
list-length>=n | list length |
list-length>l | list1 list2 |
list-length>n | list length |
listify | element |
listxlist | l1 l2 &key (combiner (function list)) |
mappend | fn &rest lists |
mapunion | fn &rest lists |
member-of-tree | item tree |
nmerge | lists &key (key (function identity)) (test (function >)) |
permutate-list | list |
permutation-of? | l1 l2 &key (key (function identity)) (test (function eql)) |
permutations-of-length | elements length &optional (copy-fn (function identity)) |
random-elt | l |
random-elt-if | predicate list |
random-elts | seq n |
random-other | elts seq |
random-shuffle | sequence |
random-subset | list &key (include-empty-set? t) |
remove-first | item sequence &key (test (quote equal)) test-not |
remove-nth | nth sequence &key |
replace-by-variable | item tree |
set-partitions | list &key (min-length 1) max-length |
shuffle | l |
simple-shuffle | list |
simple-sort | lst &key (test (function <)) (key (function identity)) |
sorted-insert | list to-insert &key (key (function identity)) (test (function <)) |
sorted-p | list predicate &key (key (function identity)) |
the-biggest | fn l &optional cut-of |
the-highest | lst func |
the-smallest | fn l |
the-x-highest | lst nr-of-highest &key (key (function identity)) |
true | &rest args |
union+ | &rest sets |
write-list | elements &optional (stream t) |
write-list2 | elements &optional (stream t) |
%fast-sorted-insert-default-key | list to-insert test |
%fast-sorted-insert-default-key-and-test | list to-insert |
%fast-sorted-insert-default-test | list to-insert key |
Macro summary | |
---|---|
pushend | item location |
toggle | var &rest vars |
:lists | [Initarg] |
:key | [Initarg] |
:test | [Initarg] |
sorted-lists | [Slot] |
A list of lists, each of which is sorted according to some attribute
key | [Slot] |
The key after which the lists are sorted
test | [Slot] |
The test after which the keys are sorted
Returns and (with setf) changes the test of the specified sorted-list-merger
Returns and (with setf) changes the key of the specified sorted-list-merger
Calls assoc with eq as test predicate, and returns cdr of found value or nil.
computes a list of all partitions of a set: (set-partitions '(a b c)) -> (((a b c)) ((a b) (c)) ((a c) (b)) ((a) (b c)) ((a) (b) (c))) algorithm from Michael Orlov (2002). Efficient Generation of Set Partitions.
a slow hack for getting all subsets of a list. needs to be properly written
Returns a random subset both in the amount of elements and in which elements it picks.
Assumes a list sorted on func. Will insert the given el in the list based on test. Example: (sorted-insert '(1 2 4 5) 3) --> (1 2 3 4 5)
Performs a binary search on the given vector and returns the first element for which the sought value satisfies the test
Like (list) except that it does not put nil elements into the list
Permutates a list containing the permuted elements of the given list.
Checks whether an element occurs twice in the same list. Only use on short lists.
Loops over the given list and evaluates function on every item. It returns the item for which the function returned the highest value. If there are multiple it gives the first one.
Loops over the given list and evaluates function on every item. It returns the item for which the function returned the highest value. If there are multiple it gives the first one. You must supply a third parameter which allows you to get the x highest elements. It will even return these x elements ordered so from high to low.
looks whether feature-value or symbol is member of tree (any depth)
replaces feature-value or symbol in tree with new variable (any depth)
Return true if the given list does not contain the same element twice.
Return true if each member of the given sub-set is a member of the given super-set. This function assumes that the given list are sets!
Return true if the given sets contain the same elements.
Returns the element of the list which maximises/minimises the given key. This is the element which would come first if you sorted the list with the same key + test.
Returns the position of the element in the list which maximises/minimises the given key. This is the position of the element which would come first if you sorted the list with the same key + test.
Non-destructively merges the ordered lists contained in the passed list together into one ordered list. The list content itself is not copied, but the resulting list is made up of new conses so as not to destroy the original lists
Append the item to the list in the given location, and returns the list.