The vectors Reference Manual

Table of Contents

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

The vectors Reference Manual

This is the vectors Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:29:50 2018 GMT+0.


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

1 Introduction

Some utilities for vectors

All these functions are inside of package #:vec

Constructing and destructing vectors

Function

vector-of type &rest elemnets

Create a vector of type type containing elements.

Function

slice vector &optional start end

Create a slice of a vector, which is a subvector from start to end of vector and points to the same entries as vector.

Macro

vector-bind list vec &body body

list: A variable list

vec: A vector

Bind elements of vec to variables in list.

Setting and creating vectors

Function

mapvs size function vec &rest vecs

For the first size entries of vec and vecs call function on an element at the same position and write it at the same position of vec.

Function

mapvec function vec &rest vecs

Same as apply #'map 'vector vec vecs.

Function

mapv function vec &rest vecs

Same as apply #'map-into vec vecs.

Function

vec-copy vec

Create a new vector with the same contents as vec.

Function

setv vec vec0

Set all elements of vec to vec0 without creating a new vector.

Math functions

Simple math

In following each pair of functions do the same, but the first version of the function create a new vector, the second write the result to the first vector.

Addition and subtraction only take vectors as arguments, multiplication and division only take a vector for the first argument.

;;Addition
v+
incv
;;Subtraction
v-
decv
;;Multiplication
v*
mulv
;;Division
v/
divv

Vector specific math

Function

absvec vec

The length of the vector vec.

Function

normalize vec

Normalize the vector vec and get it.

Function

unitvec vec

A new unit vector with the direction of vec. Same as (normalize (copy-vec vec)).

Function

distance vec vec0

Distance between the vectors vec and vec0

Function

scalar vec vec0

The scalar product of vec and vec0.

Function

unit-scalar vec vec0

Optimized version of (scalar (unitvec vec) (unitvec vec0)).

Function

angle vec vec0

Angle between vec and vec0.

Function

cross3 vec vec0

Cross product of the 3D-vectors vec and vec0.

Some other functions

orthogonal-factor
orthogonal-vector
line-vector
line-distance

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 vectors

Author

Fabio Krapohl <fabio.u.krapohl@fau.de>

License

LLGPL

Description

Some utilities for using vectors

Source

vectors.asd (file)

Component

vectors.lisp (file)


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 vectors.asd

Location

vectors.asd

Systems

vectors (system)


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

3.1.2 vectors/vectors.lisp

Parent

vectors (system)

Location

vectors.lisp

Packages

vec

Exported Definitions
Internal Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 vec

Source

vectors.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 Macros

Macro: vector-bind LIST VEC &body BODY
Package

vec

Source

vectors.lisp (file)


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

5.1.2 Functions

Function: absvec VECTOR
Package

vec

Source

vectors.lisp (file)

Function: angle VECA VECD
Package

vec

Source

vectors.lisp (file)

Function: cross3 VECA VECD
Package

vec

Source

vectors.lisp (file)

Function: decv &rest VECTORS
Package

vec

Source

vectors.lisp (file)

Function: distance VECTORA VECTORD
Package

vec

Source

vectors.lisp (file)

Function: divv VECTOR &rest NUMBERS
Package

vec

Source

vectors.lisp (file)

Function: incv &rest VECTORS
Package

vec

Source

vectors.lisp (file)

Function: line-distance POINT LINE
Package

vec

Source

vectors.lisp (file)

Function: line-vector POINT LINE
Package

vec

Source

vectors.lisp (file)

Function: mapv FUNCTION VEC &rest VECS
Package

vec

Source

vectors.lisp (file)

Function: mapvec FUNCTION VEC &rest VECS
Package

vec

Source

vectors.lisp (file)

Function: mapvs SIZE FUNCTION VEC &rest VECS
Package

vec

Source

vectors.lisp (file)

Function: mulv VECTOR &rest NUMBERS
Package

vec

Source

vectors.lisp (file)

Function: normalize VECTOR
Package

vec

Source

vectors.lisp (file)

Function: orthogonal-factor POINT LINE
Package

vec

Source

vectors.lisp (file)

Function: orthogonal-vector POINT LINE
Package

vec

Source

vectors.lisp (file)

Function: scalar VECTORA VECTORD
Package

vec

Source

vectors.lisp (file)

Function: setv VECA VECD
Package

vec

Source

vectors.lisp (file)

Function: slice VECTOR &optional START END &aux LEN
Package

vec

Source

vectors.lisp (file)

Function: unit-scalar VECA VECD
Package

vec

Source

vectors.lisp (file)

Function: unitvec VECTOR
Package

vec

Source

vectors.lisp (file)

Function: v* VECTOR &rest NUMBERS
Package

vec

Source

vectors.lisp (file)

Function: v+ &rest VECTORS
Package

vec

Source

vectors.lisp (file)

Function: v- &rest VECTORS
Package

vec

Source

vectors.lisp (file)

Function: v/ VECTOR &rest NUMBERS
Package

vec

Source

vectors.lisp (file)

Function: vec-copy VEC
Package

vec

Source

vectors.lisp (file)

Function: vector-of TYPE &rest ELEMENTS
Package

vec

Source

vectors.lisp (file)


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

5.2 Internal definitions


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

5.2.1 Macros

Macro: mapfun ARGS &body BODY
Package

vec

Source

vectors.lisp (file)

Macro: vector-function FO FI VAR
Package

vec

Source

vectors.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   V  
Index Entry  Section

F
File, Lisp, vectors.asd: The vectors<dot>asd file
File, Lisp, vectors/vectors.lisp: The vectors/vectors<dot>lisp file

L
Lisp File, vectors.asd: The vectors<dot>asd file
Lisp File, vectors/vectors.lisp: The vectors/vectors<dot>lisp file

V
vectors.asd: The vectors<dot>asd file
vectors/vectors.lisp: The vectors/vectors<dot>lisp file

Jump to:   F   L   V  

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

A.2 Functions

Jump to:   A   C   D   F   I   L   M   N   O   S   U   V  
Index Entry  Section

A
absvec: Exported functions
angle: Exported functions

C
cross3: Exported functions

D
decv: Exported functions
distance: Exported functions
divv: Exported functions

F
Function, absvec: Exported functions
Function, angle: Exported functions
Function, cross3: Exported functions
Function, decv: Exported functions
Function, distance: Exported functions
Function, divv: Exported functions
Function, incv: Exported functions
Function, line-distance: Exported functions
Function, line-vector: Exported functions
Function, mapv: Exported functions
Function, mapvec: Exported functions
Function, mapvs: Exported functions
Function, mulv: Exported functions
Function, normalize: Exported functions
Function, orthogonal-factor: Exported functions
Function, orthogonal-vector: Exported functions
Function, scalar: Exported functions
Function, setv: Exported functions
Function, slice: Exported functions
Function, unit-scalar: Exported functions
Function, unitvec: Exported functions
Function, v*: Exported functions
Function, v+: Exported functions
Function, v-: Exported functions
Function, v/: Exported functions
Function, vec-copy: Exported functions
Function, vector-of: Exported functions

I
incv: Exported functions

L
line-distance: Exported functions
line-vector: Exported functions

M
Macro, mapfun: Internal macros
Macro, vector-bind: Exported macros
Macro, vector-function: Internal macros
mapfun: Internal macros
mapv: Exported functions
mapvec: Exported functions
mapvs: Exported functions
mulv: Exported functions

N
normalize: Exported functions

O
orthogonal-factor: Exported functions
orthogonal-vector: Exported functions

S
scalar: Exported functions
setv: Exported functions
slice: Exported functions

U
unit-scalar: Exported functions
unitvec: Exported functions

V
v*: Exported functions
v+: Exported functions
v-: Exported functions
v/: Exported functions
vec-copy: Exported functions
vector-bind: Exported macros
vector-function: Internal macros
vector-of: Exported functions

Jump to:   A   C   D   F   I   L   M   N   O   S   U   V  

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

A.3 Variables


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

A.4 Data types

Jump to:   P   S   V  
Index Entry  Section

P
Package, vec: The vec package

S
System, vectors: The vectors system

V
vec: The vec package
vectors: The vectors system

Jump to:   P   S   V