# The cl-iterative Reference Manual

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

# The cl-iterative Reference Manual

This is the cl-iterative Reference Manual, version 0.1.0, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 13:44:43 2018 GMT+0.

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

## 1 Introduction

```#+TITLE: CL-ITERATIVE

* Introduction
All linearly iterative algorithms can be transformed into the form
=x=f(x)= for some value =x= and some function =f(x)=. This system
provides a way to perform an iterative algorithm as a process of
finding the solution of this equation.

Furthermore, many existing implementations provide very limited
control over how iterations are performed: what if the value is bound
and the iterative step takes it out the boundaries? what if one wants
to log the progress of computation? what if the computation needs to
be stopped after some iterations?.. =CL-ITERATIVE= system provides the
refined control over the progress of iterations by means of special
structures called (unsurprisingly) /controls/.

The library was tested with SBCL (1.2.14) and ECL (15.3.7) on Linux
(Ubuntu 15.10 x86-64).

* Modus operandi

The key idea of the method is to perform the computation only if
=ITERATOR:ITERATOR= object is in state =CONTINUE= and stop otherwise
(for category theory lovers and purists: =ITERATOR:ITERATOR= is

The state of computation can be changed by means of controls. This
system provides the following controls:
- =FINISHED-VALUE= :: successfully stops the computation if certain
condition on computation value is reached.
- =FAILED-VALUE= :: stops the computation with a failure if certain
condition on computation value is reached.
- =LIMIT-ITERATIONS= :: stops the computation with a failure if number
of iterations exceeds the limit.
- =LOG-COMPUTATION= :: logs the progress of iterative computation, can
be viewed as a probe.
- =CONVERGED-VALUE= :: successfully stops the computation if the value
has converged in some sense (using user-specified predicate of
closeness =CLOSE-P=; for mathematical purists: user specifies the
topology of the computation space).
- =CONVERGED-NUMBER= :: simplified version of =CONVERGED-VALUE= for
numbers where closeness is defined as =|x-y| 0
;; due to quadratic convergence of the algorithm
(assert successful-p () "Could not find the square root of S = ~A" s)
;; Just for illustrative purposes: return extra info - why computation
;; was stopped?
(values final-x info))))
#+END_SRC

If want to find square root of 4,
#+BEGIN_EXAMPLE
> (sqrt-heron 4d0)
2.0d0
((:CONVERGED-NUMBER))
#+END_EXAMPLE

If we want to peek into how the computation proceeds, we can add the
logging function:

#+BEGIN_SRC lisp
(defun sqrt-heron (s)
(flet ((improve (x)
(* 0.5d0 (+ x (/ s x))))
(log-function (indicator x)           ; log computation
(if (eq indicator :init)
(format t "~&INIT: x = ~A~%" x)
(format t "~&x = ~A~%" x))))
(multiple-value-bind (final-x successful-p info)
(fixed-point
#'improve 1d0
:controls (combine-controls
(log-computation #'log-function) ; add it before convergence test
(converged-number-with-id)
(limit-iterations-with-id 20)))
(assert successful-p () "Could not find the square root of S = ~A" s)
(values final-x info))))
#+END_SRC

Then, the output and the result will look as follows:

#+BEGIN_EXAMPLE
> (sqrt-heron 4d0)
INIT: x = 1.0d0
x = 2.5d0
x = 2.05d0
x = 2.000609756097561d0
x = 2.0000000929222947d0
x = 2.000000000000002d0
x = 2.0d0
2.0d0
((:CONVERGED-NUMBER))
#+END_EXAMPLE

Check the system =CL-ITERATIVE-TESTS= for more examples.

```

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-iterative

Author

Alexey Cherkaev (mobius-eng)

LGPLv3

Description

Generic iterative algorithm with multiple controls

Version

0.1.0

Dependencies
• alexandria
• optima
Source

cl-iterative.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-iterative.asd

Location

cl-iterative.asd

Systems

cl-iterative (system)

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

#### 3.1.2 cl-iterative/package.lisp

Parent

cl-iterative (system)

Location

package.lisp

Packages

#### 3.1.3 cl-iterative/iterator.lisp

Dependency

package.lisp (file)

Parent

cl-iterative (system)

Location

iterator.lisp

Exported Definitions
Internal Definitions

#### 3.1.4 cl-iterative/cl-iterative.lisp

Dependency

iterator.lisp (file)

Parent

cl-iterative (system)

Location

cl-iterative.lisp

Exported Definitions
Internal Definitions

#### 3.1.5 cl-iterative/iteratorex.lisp

Dependency

cl-iterative.lisp (file)

Parent

cl-iterative (system)

Location

iteratorex.lisp

Exported Definitions

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

#### 3.1.6 cl-iterative/cl-iterative-ex.lisp

Dependency

iteratorex.lisp (file)

Parent

cl-iterative (system)

Location

cl-iterative-ex.lisp

Exported Definitions

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

## 4 Packages

Packages are listed by definition order.

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

### 4.1 cl-iterative-ex

Upgrades controls from CL-ITERATIVE to work with ITERATOREX

Source

package.lisp (file)

Use List
Exported Definitions

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

### 4.2 iteratorex

Extension of ITERATOR to annotate it with INFO

Source

package.lisp (file)

Use List
Exported Definitions

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

### 4.3 cl-iterative

Control of computation flow and iterative algorithm

Source

package.lisp (file)

Use List
• optima
• common-lisp
Used By List
Exported Definitions
Internal Definitions

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

### 4.4 iterator

Computation flow

Source

package.lisp (file)

Use List
• optima
• 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: define-simple-constructor CLASS (&rest ARGS)

Make simple constuctor with boa arguments for CLASS

Package
Source

cl-iterative.lisp (file)

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

#### 5.1.2 Functions

Function: ->continue ITERATOR &optional UPDATE-VALUE-FUNCTION

Change status of the ITERATOR to :CONTINUE

Package
Source

iterator.lisp (file)

Function: ->failed ITERATOR &optional UPDATE-VALUE-FUNCTION

Change status of the ITERATOR to :FAILED

Package
Source

iterator.lisp (file)

Function: ->finished ITERATOR &optional UPDATE-VALUE-FUNCTION

Change status of the ITERATOR to :FINISHED

Package
Source

iterator.lisp (file)

Package
Source

cl-iterative-ex.lisp (file)

Function: alter-value FUNCTION
Package
Source

cl-iterative.lisp (file)

Function: bind ITERATOR &rest FUNCTIONS

Propogates ITERATOR’s value through FUNCTIONS iff its status is :CONTINUE. Each function must accept iterator’s value and return a new iterator.

Package
Source

iterator.lisp (file)

Function: change-status ITERATOR NEW-STATUS &optional UPDATE-VALUE-FUNCTION

Destructively change iterator’s status

Package
Source

iterator.lisp (file)

Function: combine-controls &rest CONTROLS

Combine controls forming a generic control. Controls are applied in order they appear

Package
Source

cl-iterative.lisp (file)

Function: continue VAL

Make contine iterator

Package
Source

iterator.lisp (file)

Function: continue-p ITERATOR

Is ITERATOR :CONTINUE?

Package
Source

iterator.lisp (file)

Function: control INIT APPLY
Package
Source

cl-iterative.lisp (file)

Function: converged-number &optional TOLERANCE
Package
Source

cl-iterative.lisp (file)

Function: converged-number-with-id &optional ID TOLERANCE

Constructs CONVERGED-NUMBER-WITH-ID control

Package
Source

cl-iterative-ex.lisp (file)

Function: converged-value CLOSE-P COPY &optional FINAL
Package
Source

cl-iterative.lisp (file)

Function: converged-value-with-id CLOSE-P COPY &optional ID FINAL

Constructs CONVERGED-VALUE-WITH-ID control

Package
Source

cl-iterative-ex.lisp (file)

Function: failed VAL

Make failed iterator

Package
Source

iterator.lisp (file)

Function: failed-p ITERATOR

Is ITERATOR :FAILED?

Package
Source

iterator.lisp (file)

Function: failed-value PREDICATE &optional FINAL
Package
Source

cl-iterative.lisp (file)

Function: failed-value-with-id PREDICATE &optional ID FINAL

Constructs FAILED-VALUE-WITH-ID control

Package
Source

cl-iterative-ex.lisp (file)

Function: finished VAL

Make finished iterator

Package
Source

iterator.lisp (file)

Function: finished-p ITERATOR

Is ITERATOR :FINISHED?

Package
Source

iterator.lisp (file)

Function: finished-value PREDICATE &optional FINAL
Package
Source

cl-iterative.lisp (file)

Function: finished-value-with-id PREDICATE &optional ID FINAL

Constructs FINIED-VALUE-WITH-ID control

Package
Source

cl-iterative-ex.lisp (file)

Function: fixed-point FUNCTION INIT-VALUE &key PRE-TREAT CONTROLS POST-TREAT

Fixed point method solving x=f(x) starting from x0.
CONTROL is an object implementing control protocol: INIT-CONTROL and APPLY-CONTROL.
FUNCTION might change INIT-VALUE destuctively
Returns (VALUES SOLUTION SOLVED-P INDICATOR), where
SOLUTION is the final result,
SOLVED-P is the indicator if the solution was reached successfully, INDICATOR is an extra indicator of what could have gone wrong.

Package
Source

cl-iterative.lisp (file)

Function: fmap ITERATOR &rest FUNCTIONS

Update iterators value iff it is :CONTINUE

Package
Source

iterator.lisp (file)

Function: iterate Y0 ITER-COMPUTATION &optional PRE-TREAT POST-TREAT

Iteratively apply CONTROL to iterator Y0 until it finishes

Package
Source

cl-iterative.lisp (file)

Function: iterator STATUS VALUE

Constructs ITERATOR with given STATUS and VALUE

Package
Source

iterator.lisp (file)

Function: limit-iterations MAX &optional FINAL
Package
Source

cl-iterative.lisp (file)

Function: limit-iterations-with-id MAX &optional ID FINAL

Constructs LIMIT-ITERATIONS-WITH-ID control

Package
Source

cl-iterative-ex.lisp (file)

Function: log-computation LOG-FUNCTION
Package
Source

cl-iterative.lisp (file)

Function: replace-value ITERATOR NEW-VALUE

Destrcutively change ITERATOR’s value

Package
Source

iterator.lisp (file)

Function: update-value ()

Destructively update ITERATOR’s value

Package
Source

iterator.lisp (file)

Package
Source

iteratorex.lisp (file)

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

#### 5.1.3 Generic functions

Generic Function: apply-control CONTROL VALUE

Apply CONTROL to a VALUE. CONTROL must return ITERATOR

Package
Source

cl-iterative.lisp (file)

Methods
Method: apply-control (CONTROL control-with-id) (VALUE iteratorex) after
Source

cl-iterative-ex.lisp (file)

Method: apply-control (CONTROL add-info) (VAL iteratorex)
Source

cl-iterative-ex.lisp (file)

Method: apply-control (CONTROL add-info) (VAL iterator)
Source

cl-iterative-ex.lisp (file)

Method: apply-control (CONTROL control) VALUE
Method: apply-control (CONTROL alter-value) VALUE
Method: apply-control (CONTROL converged-number) VALUE
Method: apply-control (CONTROL converged-value) VALUE
Method: apply-control (CONTROL log-computation) VALUE
Method: apply-control (CONTROL limit-iterations) VALUE
Method: apply-control (CONTROL change-status) VALUE
Method: apply-control CONTROL VALUE
Generic Function: control-apply-function OBJECT
Generic Function: (setf control-apply-function) NEW-VALUE OBJECT
Package
Methods
Method: control-apply-function (CONTROL control)
Method: (setf control-apply-function) NEW-VALUE (CONTROL control)

A generic control apply function

Source

cl-iterative.lisp (file)

Generic Function: control-id OBJECT
Package
Methods
Method: control-id OBJ
Source

cl-iterative-ex.lisp (file)

Method: control-id (CONTROL-WITH-ID control-with-id)

Source

cl-iterative-ex.lisp (file)

Generic Function: control-init-function OBJECT
Generic Function: (setf control-init-function) NEW-VALUE OBJECT
Package
Methods
Method: control-init-function (CONTROL control)
Method: (setf control-init-function) NEW-VALUE (CONTROL control)

A generic control init function

Source

cl-iterative.lisp (file)

Generic Function: fixed-point-result-indicator ITERATOR

Returns the indicator of the cause of the final result

Package
Source

cl-iterative.lisp (file)

Methods
Method: fixed-point-result-indicator (ITERATOR iteratorex)
Source

cl-iterative-ex.lisp (file)

Method: fixed-point-result-indicator (ITERATOR iterator)
Generic Function: info OBJECT
Generic Function: (setf info) NEW-VALUE OBJECT
Package
Methods
Method: info (OBJ iterator)
Source

iteratorex.lisp (file)

Method: info (ITERATOREX iteratorex)

Source

iteratorex.lisp (file)

Method: (setf info) NEW-VALUE (ITERATOREX iteratorex)

automatically generated writer method

Source

iteratorex.lisp (file)

Generic Function: init-control CONTROL INIT-VALUE

Initialize CONTROL using INIT-VALUE. Useful for stateful controls

Package
Source

cl-iterative.lisp (file)

Methods
Method: init-control (CONTROL control) INIT-VALUE
Method: init-control (CONTROL converged-number) INIT-VALUE
Method: init-control (CONTROL converged-value) INIT-VALUE
Method: init-control (CONTROL log-computation) INIT-VALUE
Method: init-control (CONTROL limit-iterations) INIT-VALUE
Method: init-control CONTROL INIT-VALUE
Generic Function: init-info OBJECT
Package
Methods

Source

cl-iterative-ex.lisp (file)

Generic Function: push-info-p OBJECT
Package
Methods
Method: push-info-p OBJ
Source

cl-iterative-ex.lisp (file)

Method: push-info-p (CONTROL-WITH-ID control-with-id)

Source

cl-iterative-ex.lisp (file)

Generic Function: status OBJECT
Generic Function: (setf status) NEW-VALUE OBJECT
Package
Methods
Method: status (ITERATOR iterator)
Method: (setf status) NEW-VALUE (ITERATOR iterator)

Iterator status: :continue :finished or :failed

Source

iterator.lisp (file)

Generic Function: value OBJECT
Generic Function: (setf value) NEW-VALUE OBJECT
Package
Methods
Method: value (ITERATOR iterator)
Method: (setf value) NEW-VALUE (ITERATOR iterator)

Iterator value

Source

iterator.lisp (file)

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

#### 5.1.4 Classes

Control that adds info to an iterator

Package
Source

cl-iterative-ex.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: init-info
Initargs

:init-info

init-info (generic function)

Class: alter-value ()

Control that alters the value if, for example, it is outside of some boundaries. The behaviour is control by FUNCTION.

Package
Source

cl-iterative.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: alter-value-function

Function that alters the value. Must return ITERATOR

Initargs

:function

alter-value-function (generic function)

Class: control ()

A generic control class. It is used to combine other controls.

Package
Source

cl-iterative.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: control-init-function

A generic control init function

Initargs

:init

control-init-function (generic function)

Writers

(setf control-init-function) (generic function)

Slot: control-apply-function

A generic control apply function

Initargs

:apply

control-apply-function (generic function)

Writers

(setf control-apply-function) (generic function)

Class: control-with-id ()

Control mixin that adds ID to other controls

Package
Source

cl-iterative-ex.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: id
Initargs

:id

control-id (generic function)

Slot: push-info-p
Initargs

:push-info-p

push-info-p (generic function)

Class: converged-number ()

Control that will finish the computation if the number sequence converges. This is a simplified (for numbers) version of CONVERGED-VALUE

Package
Source

cl-iterative.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

converged-number-with-id (class)

Direct methods
Direct slots
Slot: converged-number-tolerance

Absolute tolerance within which two numbers are considered to be the same

Initargs

:tolerance

converged-number-tolerance (generic function)

Slot: converged-number-last

Internal storage of the previous item in the sequence

converged-number-last (generic function)

Writers

(setf converged-number-last) (generic function)

Class: converged-number-with-id ()

Extension of CONVERGED-NUMBER with ID info

Package
Source

cl-iterative-ex.lisp (file)

Direct superclasses
Class: converged-value ()

Controls if the sequence of values is converged (Cauchy criteria) Since the value might change destructively, it requires COPY function to store the copy of the previous value in the sequence

Package
Source

cl-iterative.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

converged-value-with-id (class)

Direct methods
Direct slots
Slot: converged-value-close-p

Predicate that checks if two values are close enough for the sequence to be considered convergent

Initargs

:close-p

converged-value-close-p (generic function)

Slot: converged-value-copy

Reliably copy the value: the value itself might be
detroyed during the computation, this function must be able to copy it to reliably compare previus and current value in the sequence

Initargs

:copy

converged-value-copy (generic function)

Slot: converged-value-final

Final function to apply to value once converged

Initargs

:final

converged-value-final (generic function)

Slot: converged-value-last

Internal: stores the previous value (copied) of the sequence

converged-value-last (generic function)

Writers

(setf converged-value-last) (generic function)

Class: converged-value-with-id ()

Extension of CONVERGED-VALUE with ID info

Package
Source

cl-iterative-ex.lisp (file)

Direct superclasses
Class: failed-value ()

Change computation to failed if predicate returns T

Package
Source

cl-iterative.lisp (file)

Direct superclasses

change-status (class)

Direct subclasses

failed-value-with-id (class)

Direct slots
Slot: change-status-target
Initform

(function iterator:->failed)

Class: failed-value-with-id ()

Extension of FAILED-VALUE with ID info

Package
Source

cl-iterative-ex.lisp (file)

Direct superclasses
Class: finished-value ()

Change computation to finish if predicate returns T

Package
Source

cl-iterative.lisp (file)

Direct superclasses

change-status (class)

Direct subclasses

finished-value-with-id (class)

Direct slots
Slot: change-status-target
Initform

(function iterator:->finished)

Class: finished-value-with-id ()

Extension of FINISHED-VALUE with ID info

Package
Source

cl-iterative-ex.lisp (file)

Direct superclasses
Class: iterator ()

Computation flow status

Package
Source

iterator.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

iteratorex (class)

Direct methods
Direct slots
Slot: status

Iterator status: :continue :finished or :failed

Initargs

:status

status (generic function)

Writers

(setf status) (generic function)

Slot: value

Iterator value

Initargs

:value

value (generic function)

Writers

(setf value) (generic function)

Class: iteratorex ()
Package
Source

iteratorex.lisp (file)

Direct superclasses

iterator (class)

Direct methods
Direct slots
Slot: info

info (generic function)

Writers

(setf info) (generic function)

Class: limit-iterations ()

Control that fails computation if it exceeds max number of evaluations

Package
Source

cl-iterative.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses

limit-iterations-with-id (class)

Direct methods
Direct slots
Slot: limit-iterations-max

Max number of evaluations permitted

Initargs

:max

limit-iterations-max (generic function)

Slot: limit-iterations-final

Final function to apply to value once failed

Initargs

:final

limit-iterations-final (generic function)

Slot: limit-iterations-performed

Internal storage of the number of evaluations already performed

Initform

0

limit-iterations-performed (generic function)

Writers

(setf limit-iterations-performed) (generic function)

Class: limit-iterations-with-id ()

Extension of LIMIT-ITERATIONS with ID info

Package
Source

cl-iterative-ex.lisp (file)

Direct superclasses
Class: log-computation ()

Control that logs the progress of computation

Package
Source

cl-iterative.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: log-function

Function to log the computation process.
Accepts two arguments: (TAG VALUE)
TAG is either :INIT or :APPLY indicating at which point it was called VALUE is ITERATOR’s value passed.

Initargs

:log-function

log-function (generic function)

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

### 5.2 Internal definitions

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

#### 5.2.1 Functions

Function: iterator-p OBJ

Returns T if a given OBJ is ITERATOR

Package
Source

iterator.lisp (file)

Function: reduce-list ()

Reduce (fold left) LIST with FUNCTION starting from INIT-STATE. Supports shortcircuiting if FUNCTION returns REDUCED value

Package
Source

cl-iterative.lisp (file)

Function: reduced X
Package
Source

cl-iterative.lisp (file)

Function: reduced-p X
Package
Source

cl-iterative.lisp (file)

Function: reduced-value X
Package
Source

cl-iterative.lisp (file)

Function: status-p OBJ STATUS

If OBJ is ITERATOR checks its STATUS

Package
Source

iterator.lisp (file)

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

#### 5.2.2 Generic functions

Generic Function: alter-value-function OBJECT
Package
Methods
Method: alter-value-function (ALTER-VALUE alter-value)

Function that alters the value. Must return ITERATOR

Source

cl-iterative.lisp (file)

Generic Function: change-status-final OBJECT
Package
Methods
Method: change-status-final (CHANGE-STATUS change-status)

Final transformation to apply to value once predicate is T

Source

cl-iterative.lisp (file)

Generic Function: change-status-pred OBJECT
Package
Methods
Method: change-status-pred (CHANGE-STATUS change-status)

Predicate on the value of ITERATOR

Source

cl-iterative.lisp (file)

Generic Function: change-status-target OBJECT
Package
Methods
Method: change-status-target (CHANGE-STATUS change-status)

Function of iterator changing the status

Source

cl-iterative.lisp (file)

Generic Function: converged-number-last OBJECT
Generic Function: (setf converged-number-last) NEW-VALUE OBJECT
Package
Methods
Method: converged-number-last (CONVERGED-NUMBER converged-number)
Method: (setf converged-number-last) NEW-VALUE (CONVERGED-NUMBER converged-number)

Internal storage of the previous item in the sequence

Source

cl-iterative.lisp (file)

Generic Function: converged-number-tolerance OBJECT
Package
Methods
Method: converged-number-tolerance (CONVERGED-NUMBER converged-number)

Absolute tolerance within which two numbers are considered to be the same

Source

cl-iterative.lisp (file)

Generic Function: converged-value-close-p OBJECT
Package
Methods
Method: converged-value-close-p (CONVERGED-VALUE converged-value)

Predicate that checks if two values are close enough for the sequence to be considered convergent

Source

cl-iterative.lisp (file)

Generic Function: converged-value-copy OBJECT
Package
Methods
Method: converged-value-copy (CONVERGED-VALUE converged-value)

Reliably copy the value: the value itself might be
detroyed during the computation, this function must be able to copy it to reliably compare previus and current value in the sequence

Source

cl-iterative.lisp (file)

Generic Function: converged-value-final OBJECT
Package
Methods
Method: converged-value-final (CONVERGED-VALUE converged-value)

Final function to apply to value once converged

Source

cl-iterative.lisp (file)

Generic Function: converged-value-last OBJECT
Generic Function: (setf converged-value-last) NEW-VALUE OBJECT
Package
Methods
Method: converged-value-last (CONVERGED-VALUE converged-value)
Method: (setf converged-value-last) NEW-VALUE (CONVERGED-VALUE converged-value)

Internal: stores the previous value (copied) of the sequence

Source

cl-iterative.lisp (file)

Generic Function: limit-iterations-final OBJECT
Package
Methods
Method: limit-iterations-final (LIMIT-ITERATIONS limit-iterations)

Final function to apply to value once failed

Source

cl-iterative.lisp (file)

Generic Function: limit-iterations-max OBJECT
Package
Methods
Method: limit-iterations-max (LIMIT-ITERATIONS limit-iterations)

Max number of evaluations permitted

Source

cl-iterative.lisp (file)

Generic Function: limit-iterations-performed OBJECT
Generic Function: (setf limit-iterations-performed) NEW-VALUE OBJECT
Package
Methods
Method: limit-iterations-performed (LIMIT-ITERATIONS limit-iterations)
Method: (setf limit-iterations-performed) NEW-VALUE (LIMIT-ITERATIONS limit-iterations)

Internal storage of the number of evaluations already performed

Source

cl-iterative.lisp (file)

Generic Function: log-function OBJECT
Package
Methods
Method: log-function (LOG-COMPUTATION log-computation)

Function to log the computation process.
Accepts two arguments: (TAG VALUE)
TAG is either :INIT or :APPLY indicating at which point it was called VALUE is ITERATOR’s value passed.

Source

cl-iterative.lisp (file)

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

#### 5.2.3 Classes

Class: change-status ()

Base class for control changing status based on predicate on value

Package
Source

cl-iterative.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Direct slots
Slot: change-status-pred

Predicate on the value of ITERATOR

Initargs

:predicate

change-status-pred (generic function)

Slot: change-status-final

Final transformation to apply to value once predicate is T

Initargs

:final

Initform

(function identity)

change-status-final (generic function)

Slot: change-status-target

Function of iterator changing the status

change-status-target (generic function)

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

## Appendix A Indexes

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

### A.1 Concepts

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

### A.2 Functions

Jump to: (   -   A   B   C   D   F   G   I   L   M   P   R   S   U   V
Jump to: (   -   A   B   C   D   F   G   I   L   M   P   R   S   U   V

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