The cl-string-complete Reference Manual

Table of Contents

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

The cl-string-complete Reference Manual

This is the cl-string-complete Reference Manual, version 0.1, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 14:03:49 2018 GMT+0.


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

1 Introduction

#+TITLE: The =CL-STRING-COMPLETE= String Completion Library
#+AUTHOR: Robert Smith
#+EMAIL: quad@symbo1ics.com

* Summary
A small library for string completion by Robert Smith.

* Usage
The principle use follows.

Create a completion tree:

    : > (defparameter *tree* (make-completion-tree))

Add your words to it:

    : > (completion-tree-add *tree* "hello")
    : > (completion-tree-add* *tree* "helmet"
    :                                "help"
    :                                "helsinki")

Check if something exists in the tree:

    : > (completion-tree-contains-p *tree* "hello")
    : T
    : > (completion-tree-contains-p *tree* "hexagon")
    : NIL

Compute the completions of a character:

    : > (compute-completions *tree* #\h)
    : ("ello" "elmet" "elp" "elsinki")
    : > (compute-completions *tree* #\x)
    : NIL

Compute the completions of a string:

    : > (compute-completions *tree* "hel")
    : ("lo" "met" "sinki" "p")

* Dependencies
None.

* License
See the file ~LICENSE~.

----------
### End of file


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

2 Systems

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


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

2.1 cl-string-complete

Maintainer

Robert Smith

Author

Robert Smith

Description

Simple string completion in Common Lisp.

Long Description

Simple string completion (finding suffixes of a string given a prefix) in Common Lisp.

Version

0.1

Source

cl-string-complete.asd (file)

Components

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

3 Files

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


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

3.1 Lisp


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

3.1.1 cl-string-complete.asd

Location

cl-string-complete.asd

Systems

cl-string-complete (system)

Packages

cl-string-complete-asd


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

3.1.2 cl-string-complete/package.lisp

Parent

cl-string-complete (system)

Location

package.lisp

Packages

cl-string-complete


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

3.1.3 cl-string-complete/exact-completion.lisp

Dependency

package.lisp (file)

Parent

cl-string-complete (system)

Location

exact-completion.lisp

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 cl-string-complete-asd

Source

cl-string-complete.asd

Use List

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

4.2 cl-string-complete

String completion API.

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: completion-tree-add ()

Add a string STR to the ternary tree TREE.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-tree-add* ()

Add a list of strings to TREE. The strings are suffled to help balance the tree.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-tree-contains-p ()

Check if TREE contains the word STR.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-tree-p ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: make-completion-tree ()
Package

cl-string-complete

Source

exact-completion.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: compute-completions NODE ITEM &key LIMIT PREFIXEDP

Compute the completions of of ITEM given a node or
tree NODE. If an integer limit LIMIT is given, then only a maximum of LIMIT completions will be given. If PREFIXEDP is true, then the completions will include the prefix.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Methods
Method: compute-completions (TREE completion-tree) ITEM &key LIMIT PREFIXEDP
Method: compute-completions (NODE completion-node) ITEM &key LIMIT PREFIXEDP

Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Structures

Structure: completion-tree ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: root
Type

(or null cl-string-complete::completion-node)

Readers

completion-tree.root (function)

Writers

(setf completion-tree.root) (function)


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

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: completion-node ()

Make a fresh ternary node. with character CHAR.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node-completions ()

Walk the children of NODE to find all completions.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node-p ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node-printer ()

Printer for ternary nodes.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node.char ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node.endp ()
Function: (setf completion-node.endp) ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node.left ()
Function: (setf completion-node.left) ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node.middle ()
Function: (setf completion-node.middle) ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-node.right ()
Function: (setf completion-node.right) ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-tree-printer ()

Printer for ternary trees.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: completion-tree.root ()
Function: (setf completion-tree.root) ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: copy-completion-node ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: copy-completion-tree ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Function: make-completion-node ()
Package

cl-string-complete

Source

exact-completion.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: completion-node-travel NODE ITEM

Travel to the next node from NODE along the branch(es) specified by ITEM.

Package

cl-string-complete

Source

exact-completion.lisp (file)

Methods
Method: completion-node-travel (NODE completion-node) (ITEM string)
Method: completion-node-travel (NODE completion-node) (ITEM list)
Method: completion-node-travel (NODE completion-node) (ITEM character)
Method: completion-node-travel (NODE null) ITEM

Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Structures

Structure: completion-node ()
Package

cl-string-complete

Source

exact-completion.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods
Direct slots
Slot: char
Type

base-char

Initform

#\nul

Readers

completion-node.char (function)

Writers

(setf completion-node.char) (function)

Slot: endp
Type

boolean

Readers

completion-node.endp (function)

Writers

(setf completion-node.endp) (function)

Slot: left
Type

(or null cl-string-complete::completion-node)

Readers

completion-node.left (function)

Writers

(setf completion-node.left) (function)

Slot: middle
Type

(or null cl-string-complete::completion-node)

Readers

completion-node.middle (function)

Writers

(setf completion-node.middle) (function)

Slot: right
Type

(or null cl-string-complete::completion-node)

Readers

completion-node.right (function)

Writers

(setf completion-node.right) (function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-string-complete.asd: The cl-string-complete<dot>asd file
cl-string-complete/exact-completion.lisp: The cl-string-complete/exact-completion<dot>lisp file
cl-string-complete/package.lisp: The cl-string-complete/package<dot>lisp file

F
File, Lisp, cl-string-complete.asd: The cl-string-complete<dot>asd file
File, Lisp, cl-string-complete/exact-completion.lisp: The cl-string-complete/exact-completion<dot>lisp file
File, Lisp, cl-string-complete/package.lisp: The cl-string-complete/package<dot>lisp file

L
Lisp File, cl-string-complete.asd: The cl-string-complete<dot>asd file
Lisp File, cl-string-complete/exact-completion.lisp: The cl-string-complete/exact-completion<dot>lisp file
Lisp File, cl-string-complete/package.lisp: The cl-string-complete/package<dot>lisp file

Jump to:   C   F   L  

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

A.2 Functions

Jump to:   (  
C   F   G   M  
Index Entry  Section

(
(setf completion-node.endp): Internal functions
(setf completion-node.left): Internal functions
(setf completion-node.middle): Internal functions
(setf completion-node.right): Internal functions
(setf completion-tree.root): Internal functions

C
completion-node: Internal functions
completion-node-completions: Internal functions
completion-node-p: Internal functions
completion-node-printer: Internal functions
completion-node-travel: Internal generic functions
completion-node-travel: Internal generic functions
completion-node-travel: Internal generic functions
completion-node-travel: Internal generic functions
completion-node-travel: Internal generic functions
completion-node.char: Internal functions
completion-node.endp: Internal functions
completion-node.left: Internal functions
completion-node.middle: Internal functions
completion-node.right: Internal functions
completion-tree-add: Exported functions
completion-tree-add*: Exported functions
completion-tree-contains-p: Exported functions
completion-tree-p: Exported functions
completion-tree-printer: Internal functions
completion-tree.root: Internal functions
compute-completions: Exported generic functions
compute-completions: Exported generic functions
compute-completions: Exported generic functions
copy-completion-node: Internal functions
copy-completion-tree: Internal functions

F
Function, (setf completion-node.endp): Internal functions
Function, (setf completion-node.left): Internal functions
Function, (setf completion-node.middle): Internal functions
Function, (setf completion-node.right): Internal functions
Function, (setf completion-tree.root): Internal functions
Function, completion-node: Internal functions
Function, completion-node-completions: Internal functions
Function, completion-node-p: Internal functions
Function, completion-node-printer: Internal functions
Function, completion-node.char: Internal functions
Function, completion-node.endp: Internal functions
Function, completion-node.left: Internal functions
Function, completion-node.middle: Internal functions
Function, completion-node.right: Internal functions
Function, completion-tree-add: Exported functions
Function, completion-tree-add*: Exported functions
Function, completion-tree-contains-p: Exported functions
Function, completion-tree-p: Exported functions
Function, completion-tree-printer: Internal functions
Function, completion-tree.root: Internal functions
Function, copy-completion-node: Internal functions
Function, copy-completion-tree: Internal functions
Function, make-completion-node: Internal functions
Function, make-completion-tree: Exported functions

G
Generic Function, completion-node-travel: Internal generic functions
Generic Function, compute-completions: Exported generic functions

M
make-completion-node: Internal functions
make-completion-tree: Exported functions
Method, completion-node-travel: Internal generic functions
Method, completion-node-travel: Internal generic functions
Method, completion-node-travel: Internal generic functions
Method, completion-node-travel: Internal generic functions
Method, compute-completions: Exported generic functions
Method, compute-completions: Exported generic functions

Jump to:   (  
C   F   G   M  

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

A.3 Variables

Jump to:   C   E   L   M   R   S  
Index Entry  Section

C
char: Internal structures

E
endp: Internal structures

L
left: Internal structures

M
middle: Internal structures

R
right: Internal structures
root: Exported structures

S
Slot, char: Internal structures
Slot, endp: Internal structures
Slot, left: Internal structures
Slot, middle: Internal structures
Slot, right: Internal structures
Slot, root: Exported structures

Jump to:   C   E   L   M   R   S  

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

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-string-complete: The cl-string-complete system
cl-string-complete: The cl-string-complete package
cl-string-complete-asd: The cl-string-complete-asd package
completion-node: Internal structures
completion-tree: Exported structures

P
Package, cl-string-complete: The cl-string-complete package
Package, cl-string-complete-asd: The cl-string-complete-asd package

S
Structure, completion-node: Internal structures
Structure, completion-tree: Exported structures
System, cl-string-complete: The cl-string-complete system

Jump to:   C   P   S