3.9.15. idx-array: arrays of vectors and matrices
|
(lsh/libidx/idx-array.lsh) |
arrays of idx1 of floats, and idx2 of floats. This class is convenient
way of handling sets of vectors or matrices of disparate sizes.
3.9.15.0. idx1-array
|
(lsh/libidx/idx-array.lsh) |
array of idx1 of floats.
3.9.15.0.0. (new idx1-array n)
|
[CLASS] (lsh/libidx/idx-array.lsh) |
Create an array of idx1 of float. Each entry can have a different sizes.
The methods of this object are:
(==> <idx1-array> set <i> <mat>)
<i> is an int, which must be less than <n>, <mat> is an idx1 of float.
This method set the <i>-th entry of the array to <mat>.
(==> <idx1-array> get <i>)
<i> is an int, which must be less than <n>.
This method returns the <i>-th entry of the array.
(==> <idx1-array> set-array <ar>)
Take an array of idx1 and do a set for each element (not compiled).
Example:
(setq ar {[3 4 5] [1] [1 2 3]})
(setq n (idx-dim ar 0))
(setq c-ar (new idx1-array n))
(for (i 0 (1- n)) ;; equivalent to: (==> c-ar set-array ar)
(==> c-ar set i (ar i)))
In a compiled or interpreted function
(de foo (c-ar ...)
((-obj- (idx1-array)) c-ar)
(for (i 0 (1- n))
... (==> c-ar get i)... ;; returns an idx1 of float
See: (new idx2-array n )
3.9.15.0.1. (==> idx1-array set i mat)
|
[MSG] (lsh/libidx/idx-array.lsh) |
3.9.15.0.2. (==> idx1-array get i)
|
[MSG] (lsh/libidx/idx-array.lsh) |
3.9.15.0.3. (==> idx1-array set-array ar)
|
[MSG] (lsh/libidx/idx-array.lsh) |
3.9.15.1. idx2-array
|
(lsh/libidx/idx-array.lsh) |
array of idx2 of floats
3.9.15.1.0. (new idx2-array n)
|
[CLASS] (lsh/libidx/idx-array.lsh) |
Create an array of idx2 of float. Each entry can have a different sizes.
The methods of this object are:
(==> <idx2-array> set <i> <mat>)
<i> is an int, which must be less than <n>, <mat> is an idx2 of float.
This method set the <i>-th entry of the array to <mat>.
(==> <idx2-array> get <i>)
<i> is an int, which must be less than <n>.
This method returns the <i>-th entry of the array.
(==> <idx2-array> set-array <ar>)
Take an array of idx2 and do a set for each element.
Example:
(setq ar {[[3 4 5][2 2 2]] [[1]] [[1] [2] [3]]})
(setq n (idx-dim ar 0))
(setq c-ar (new idx2-array n))
(for (i 0 (1- n)) ;; equivalent to: (==> c-ar set-array ar)
(==> c-ar set i (ar i)))
In a compiled or interpreted function
(de foo (c-ar ...)
((-obj- (idx1-array)) c-ar)
(for (i 0 (1- n))
... (==> c-ar get i)... ;; returns an idx1 of float
See: (new idx1-array n )
3.9.15.1.1. (==> idx2-array set i mat)
|
[MSG] (lsh/libidx/idx-array.lsh) |
3.9.15.1.2. (==> idx2-array get i)
|
[MSG] (lsh/libidx/idx-array.lsh) |
3.9.15.1.3. (==> idx2-array set-array ar)
|
[MSG] (lsh/libidx/idx-array.lsh) |
3.9.15.2. Casting gptr to vectors and matrices
|
(lsh/libidx/idx-array.lsh) |
3.9.15.2.0. (to-idx1flt gptr)
|
(lsh/libidx/idx-array.lsh) |
Casts a gptr into a (-idx1- (-flt-)) No checks are performed in compiled
mode.
3.9.15.2.1. (to-idx2flt gptr)
|
(lsh/libidx/idx-array.lsh) |
Casts a gptr into a (-idx2- (-flt-)) No checks are performed in compiled
mode.
7.7.5. idx-array: arrays of vectors and matrices
|
(lsh/libidx/idx-array.lsh) |
arrays of idx1 of floats, and idx2 of floats. This class is convenient
way of handling sets of vectors or matrices of disparate sizes.
7.7.5.0. idx1-array
|
(lsh/libidx/idx-array.lsh) |
array of idx1 of floats.
7.7.5.0.0. (new idx1-array n)
|
[CLASS] (lsh/libidx/idx-array.lsh) |
Create an array of idx1 of float. Each entry can have a different sizes.
The methods of this object are:
(==> <idx1-array> set <i> <mat>)
<i> is an int, which must be less than <n>, <mat> is an idx1 of float.
This method set the <i>-th entry of the array to <mat>.
(==> <idx1-array> get <i>)
<i> is an int, which must be less than <n>.
This method returns the <i>-th entry of the array.
(==> <idx1-array> set-array <ar>)
Take an array of idx1 and do a set for each element (not compiled).
Example:
(setq ar {[3 4 5] [1] [1 2 3]})
(setq n (idx-dim ar 0))
(setq c-ar (new idx1-array n))
(for (i 0 (1- n)) ;; equivalent to: (==> c-ar set-array ar)
(==> c-ar set i (ar i)))
In a compiled or interpreted function
(de foo (c-ar ...)
((-obj- (idx1-array)) c-ar)
(for (i 0 (1- n))
... (==> c-ar get i)... ;; returns an idx1 of float
See: (new idx2-array n )
7.7.5.0.1. (==> idx1-array set i mat)
|
[MSG] (lsh/libidx/idx-array.lsh) |
7.7.5.0.2. (==> idx1-array get i)
|
[MSG] (lsh/libidx/idx-array.lsh) |
7.7.5.0.3. (==> idx1-array set-array ar)
|
[MSG] (lsh/libidx/idx-array.lsh) |
7.7.5.1. idx2-array
|
(lsh/libidx/idx-array.lsh) |
array of idx2 of floats
7.7.5.1.0. (new idx2-array n)
|
[CLASS] (lsh/libidx/idx-array.lsh) |
Create an array of idx2 of float. Each entry can have a different sizes.
The methods of this object are:
(==> <idx2-array> set <i> <mat>)
<i> is an int, which must be less than <n>, <mat> is an idx2 of float.
This method set the <i>-th entry of the array to <mat>.
(==> <idx2-array> get <i>)
<i> is an int, which must be less than <n>.
This method returns the <i>-th entry of the array.
(==> <idx2-array> set-array <ar>)
Take an array of idx2 and do a set for each element.
Example:
(setq ar {[[3 4 5][2 2 2]] [[1]] [[1] [2] [3]]})
(setq n (idx-dim ar 0))
(setq c-ar (new idx2-array n))
(for (i 0 (1- n)) ;; equivalent to: (==> c-ar set-array ar)
(==> c-ar set i (ar i)))
In a compiled or interpreted function
(de foo (c-ar ...)
((-obj- (idx1-array)) c-ar)
(for (i 0 (1- n))
... (==> c-ar get i)... ;; returns an idx1 of float
See: (new idx1-array n )
7.7.5.1.1. (==> idx2-array set i mat)
|
[MSG] (lsh/libidx/idx-array.lsh) |
7.7.5.1.2. (==> idx2-array get i)
|
[MSG] (lsh/libidx/idx-array.lsh) |
7.7.5.1.3. (==> idx2-array set-array ar)
|
[MSG] (lsh/libidx/idx-array.lsh) |
7.7.5.2. Casting gptr to vectors and matrices
|
(lsh/libidx/idx-array.lsh) |
7.7.5.2.0. (to-idx1flt gptr)
|
(lsh/libidx/idx-array.lsh) |
Casts a gptr into a (-idx1- (-flt-)) No checks are performed in compiled
mode.
7.7.5.2.1. (to-idx2flt gptr)
|
(lsh/libidx/idx-array.lsh) |
Casts a gptr into a (-idx2- (-flt-)) No checks are performed in compiled
mode.