The vp-trees Reference Manual

This is the vp-trees Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 18:16:24 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 vp-trees

Perceptual hash algorithms for images

Author

Vasily Postnicov <>

License

2-clause BSD

Version

1.0

Dependencies
  • serapeum (system).
  • float-features (system).
Source

vp-trees.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 vp-trees/vp-trees.asd

Source

vp-trees.asd.

Parent Component

vp-trees (system).

ASDF Systems

vp-trees.


3.1.2 vp-trees/src/package.lisp

Source

vp-trees.asd.

Parent Component

vp-trees (system).

Packages

vp-trees.


3.1.3 vp-trees/src/vp-trees.lisp

Dependency

src/package.lisp (file).

Source

vp-trees.asd.

Parent Component

vp-trees (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 vp-trees

Source

src/package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Ordinary functions

Function: flatten (tree)

Deconstruct VP tree back into list. The order of elements in the original list is not preserved.

Package

vp-trees.

Source

src/vp-trees.lisp.

Function: items-in-ball (tree item threshold distance &key key)

Find all items in the tree @c(tree) closer to @c(item) than @c(threshold). @c(item) and elements of the tree must belong to a metric space with @c(distance) as a metric function. Optional @c(key) function can be used to calculate a distance between two objects in the following way: @c(ρ(x,y) = distance (key(x), key(y))).

Package

vp-trees.

Source

src/vp-trees.lisp.

Function: make-vp-tree (list distance &key key)

Make vantage point tree from a set @c(list) using a distance function @c(distance). Optional @c(key) function can be specified as a mapping between elements in @c(list) and elements in your metric space, so @c(ρ(x,y) = distance (key(x), key(y))) where x and y are in the @c(list).

Package

vp-trees.

Source

src/vp-trees.lisp.

Function: nearest-neighbor (tree item distance &key key)

Return element in the @c(tree) which is the closest element to @c(item). @c(item) and elements of the tree must belong to a metric space with @c(distance) as a metric function. Optional @c(key) function can be used to calculate a distance between two objects in the following way: @c(ρ(x,y) = distance (key(x), key(y))).

Package

vp-trees.

Source

src/vp-trees.lisp.

Function: vp-node (center radius inner outer)
Package

vp-trees.

Source

src/vp-trees.lisp.


5.1.2 Standalone methods

Method: print-object ((object vp-node) stream)
Source

src/vp-trees.lisp.


5.1.3 Structures

Structure: vp-node
Package

vp-trees.

Source

src/vp-trees.lisp.

Direct superclasses

%read-only-struct.

Direct methods
Direct slots
Slot: center
Initform

(alexandria:required-argument (quote vp-trees::center))

Readers

vp-node-center.

Writers

This slot is read-only.

Slot: radius
Type

(real 0)

Initform

(alexandria:required-argument (quote vp-trees::radius))

Readers

vp-node-radius.

Writers

This slot is read-only.

Slot: inner
Type

(or vp-trees:vp-node null)

Initform

(alexandria:required-argument (quote vp-trees::inner))

Readers

vp-node-inner.

Writers

This slot is read-only.

Slot: outer
Type

(or vp-trees:vp-node null)

Initform

(alexandria:required-argument (quote vp-trees::outer))

Readers

vp-node-outer.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Ordinary functions

Function: divide-list (list predicate)

Divide a set in two halves depending on the value of predicate function

Package

vp-trees.

Source

src/vp-trees.lisp.

Function: make-vp-node (&key center radius inner outer)
Package

vp-trees.

Source

src/vp-trees.lisp.

Function: median (list &optional nleft nright)

Return median value for a list

Package

vp-trees.

Source

src/vp-trees.lisp.

Function: pick-random (list)

Pick a random value from a list and return this value and a new list with this value removed.

Package

vp-trees.

Source

src/vp-trees.lisp.

Reader: vp-node-center (instance)
Package

vp-trees.

Source

src/vp-trees.lisp.

Target Slot

center.

Reader: vp-node-inner (instance)
Package

vp-trees.

Source

src/vp-trees.lisp.

Target Slot

inner.

Function: vp-node-leaf-p (node)

True if this node is a leaf

Package

vp-trees.

Source

src/vp-trees.lisp.

Reader: vp-node-outer (instance)
Package

vp-trees.

Source

src/vp-trees.lisp.

Target Slot

outer.

Function: vp-node-p (object)
Package

vp-trees.

Source

src/vp-trees.lisp.

Reader: vp-node-radius (instance)
Package

vp-trees.

Source

src/vp-trees.lisp.

Target Slot

radius.


5.2.2 Standalone methods

Method: read-only-struct-slot-names append ((self vp-node))
Package

serapeum.

Source

src/vp-trees.lisp.


5.2.3 Types

Type: metric ()
Package

vp-trees.

Source

src/vp-trees.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   D   F   I   M   N   P   R   V  
Index Entry  Section

D
divide-list: Private ordinary functions

F
flatten: Public ordinary functions
Function, divide-list: Private ordinary functions
Function, flatten: Public ordinary functions
Function, items-in-ball: Public ordinary functions
Function, make-vp-node: Private ordinary functions
Function, make-vp-tree: Public ordinary functions
Function, median: Private ordinary functions
Function, nearest-neighbor: Public ordinary functions
Function, pick-random: Private ordinary functions
Function, vp-node: Public ordinary functions
Function, vp-node-center: Private ordinary functions
Function, vp-node-inner: Private ordinary functions
Function, vp-node-leaf-p: Private ordinary functions
Function, vp-node-outer: Private ordinary functions
Function, vp-node-p: Private ordinary functions
Function, vp-node-radius: Private ordinary functions

I
items-in-ball: Public ordinary functions

M
make-vp-node: Private ordinary functions
make-vp-tree: Public ordinary functions
median: Private ordinary functions
Method, print-object: Public standalone methods
Method, read-only-struct-slot-names: Private standalone methods

N
nearest-neighbor: Public ordinary functions

P
pick-random: Private ordinary functions
print-object: Public standalone methods

R
read-only-struct-slot-names: Private standalone methods

V
vp-node: Public ordinary functions
vp-node-center: Private ordinary functions
vp-node-inner: Private ordinary functions
vp-node-leaf-p: Private ordinary functions
vp-node-outer: Private ordinary functions
vp-node-p: Private ordinary functions
vp-node-radius: Private ordinary functions


A.3 Variables