From 43454884a2c2cdff94f5fff5834742d80f34d289 Mon Sep 17 00:00:00 2001 From: Pablo Date: Sat, 15 Oct 2022 08:11:58 -0300 Subject: [PATCH] Info updated. --- grsp11.scm | 2 +- grsp15.scm | 2 +- grsp16.scm | 34 ++++++++++++++++------------------ grsp5.scm | 38 +++++++++++++++++++------------------- grsp7.scm | 8 ++++---- grsp8.scm | 35 +++++++++++++++++------------------ grsp9.scm | 8 ++++---- 7 files changed, 62 insertions(+), 65 deletions(-) diff --git a/grsp11.scm b/grsp11.scm index 932a8be..b41636a 100644 --- a/grsp11.scm +++ b/grsp11.scm @@ -402,7 +402,7 @@ ;; - p_b1: boolean. ;; - #t: shows element ordinals. ;; - #f: does not show ordinals. -;; - p_l1: list +;; - p_l1: list. ;; (define (grsp-lal-dev p_b1 p_l1) (let ((nh 0)) diff --git a/grsp15.scm b/grsp15.scm index 7f399ee..580ce15 100644 --- a/grsp15.scm +++ b/grsp15.scm @@ -106,7 +106,7 @@ ;; Parameters: ;; - p_x1: x. ;; - p_j1: j. -;; - p_a1: matrixwith data points. +;; - p_a1: matrix with data points. ;; ;; Sources: ;; - [3][4]. diff --git a/grsp16.scm b/grsp16.scm index 3ae4a31..7b4c11d 100644 --- a/grsp16.scm +++ b/grsp16.scm @@ -172,24 +172,22 @@ ;; - p_l2: list of the exported functions as strings, i.e "grsp-reqmod" ;; "grsp-defmod"... ;; -(define (grsp-scm-defmod p_s1 p_l1 p_l2) - ;;(let ((j2 1)) - - (display "(define-module ") - (display p_s1) - (displayl "\n #:use-module " p_l1) - (display "\n #:export ") - (display (list-ref p_l2 0)) - - (let loop ((j2 1)) - (if (< j2 (length p_l2)) - (begin (display "\n ") - (display (list-ref p_l2 j2)) - (loop (+ j2 1))))) - - - (display "))") - (newline)) +(define (grsp-scm-defmod p_s1 p_l1 p_l2) + (display "(define-module ") + (display p_s1) + (displayl "\n #:use-module " p_l1) + (display "\n #:export ") + (display (list-ref p_l2 0)) + + (let loop ((j2 1)) + (if (< j2 (length p_l2)) + (begin (display "\n ") + (display (list-ref p_l2 j2)) + (loop (+ j2 1))))) + + + (display "))") + (newline)) ;;;; grsp-scm-create-prg - Creates an .scm program file according to user diff --git a/grsp5.scm b/grsp5.scm index 7eead91..cedfc42 100644 --- a/grsp5.scm +++ b/grsp5.scm @@ -1398,7 +1398,7 @@ ;; Create results vector. (set! res1 (grsp-matrix-create 0 1 5)) - ;; Q2 + ;; Q2. (array-set! res1 (grsp-median1 res3) 0 2) (set! res3 res6) @@ -1414,10 +1414,10 @@ (set! n4 (+ ln2 (- ll1 2))) (set! n5 (+ n4 2)))) - ;; Q1 + ;; Q1. (array-set! res1 (grsp-median1 (grsp-matrix-subcpy res3 lm2 hm2 ln2 n4)) 0 1) - ;; Q3 + ;; Q3. (set! res3 res6) (array-set! res1 (grsp-median1 (grsp-matrix-subcpy res3 lm2 hm2 n5 hn2)) 0 3) @@ -1928,14 +1928,14 @@ (res3 0) (res4 0)) - ;; res2 + ;; res2. (set! res2 (/ 1 (* (grsp-complex-gamma p_b2 p_s1 p_k1 p_n1) (expt p_t1 p_k1)))) - ;; res3 + ;; res3. (set! res3 (expt p_x1 (- p_k1 1))) - ;; res4 + ;; res4. (set! res4 (expt (grsp-e) (* -1 (/ p_x1 p_t1)))) ;; Compose results. @@ -2003,14 +2003,14 @@ (res3 0) (res4 0)) - ;; res2 + ;; res2. (set! res2 (/ (expt p_b1 p_a1) (grsp-complex-gamma p_b2 p_s1 p_a1 p_n1))) - ;; res3 + ;; res3. (set! res3 (expt p_x1 (- p_a1 1))) - ;; res4 + ;; res4. (set! res4 (expt (grsp-e) (* -1 p_b1 p_x1))) ;; Compose results. @@ -2076,10 +2076,10 @@ (res2 0) (res3 0)) - ;; res2 + ;; res2. (set! res2 (/ 1 (grsp-complex-gamma p_b2 p_s1 p_k1 p_n1))) - ;; res3 + ;; res3. (set! res3 (grsp-complex-ligamma p_b2 p_s1 p_k1 (/ p_x1 p_t1) p_n1)) ;; Compose results. @@ -2144,10 +2144,10 @@ (res2 0) (res3 0)) - ;; res2 + ;; res2. (set! res2 (/ 1 (grsp-complex-gamma p_b2 p_s1 p_a1 p_n1))) - ;; res3 + ;; res3. (set! res3 (grsp-complex-ligamma p_b2 p_s1 p_a1 (* p_b1 p_x1) p_n1)) ;; Compose results. @@ -2450,13 +2450,13 @@ (res3 0) (res4 0)) - ;; res2 + ;; res2. (set! res2 (/ 1 (* p_x3 (sqrt (* 2 (grsp-pi)))))) - ;; res3 + ;; res3. (set! res3 (* -0.5 (expt (/ (- p_x1 p_x2) p_x3) 2))) - ;; res4 + ;; res4. (set! res4 (expt (grsp-e) res3)) ;; Compose results. @@ -2532,13 +2532,13 @@ (res3 0) (res4 0)) - ;; res2 + ;; res2. (set! res2 (expt (/ p_x3 p_x4) 2)) - ;; res3 + ;; res3. (set! res3 (/ (expt (- p_x2 p_x1) 2) (grsp-variance1 p_x4))) - ;; res4 + ;; res4. (set! res4 (* 2 (log (/ p_x4 p_x3)))) ;; Compose results. diff --git a/grsp7.scm b/grsp7.scm index af7918c..2f6ef86 100644 --- a/grsp7.scm +++ b/grsp7.scm @@ -105,7 +105,7 @@ ;;;; grsp-geo-triangle - Area of a triangle. ;; ;; Keywords: -;; - geometry. +;; - geometry, polygons. ;; ;; Parameters: ;; - p_x1: base. @@ -122,7 +122,7 @@ ;;;; grsp-geo-rectangle - Area of a rectangle. ;; ;; Keywords: -;; - geometry. +;; - geometry, polygons. ;; ;; Parameters: ;; - p_x1: base. @@ -348,7 +348,7 @@ ;; - geometry, conoids. ;; ;; Parameters: -;; - p_x1: x +;; - p_x1: x. ;; - p_y1: y. ;; ;; Sources: @@ -388,7 +388,7 @@ ;; - geometry, saddle, surface, hyperbolic, paraboloid. ;; ;; Parameters: -;; - p_x1: x +;; - p_x1: x. ;; - p_y1: y. ;; ;; Sources: diff --git a/grsp8.scm b/grsp8.scm index 09f3605..4640ac9 100644 --- a/grsp8.scm +++ b/grsp8.scm @@ -371,7 +371,7 @@ ;; weights, etc. ;; ;; Examples: -;; - example3.scm +;; - example3.scm. ;; ;; Output: ;; - A list with elements combining the results provided by: @@ -480,7 +480,7 @@ ;; - p_n2: mutations desired after each iteration. ;; ;; Examples: -;; - example3.scm +;; - example3.scm. ;; ;; Output: ;; - p_l1 updated. @@ -502,7 +502,7 @@ (display s1) (display i1) (display "\n"))) - ;; *** + ;; Evaluate nodes. (set! res1 (grsp-ann-nodes-eval p_b3 res1)) @@ -638,7 +638,7 @@ ;; - p_a3: count matrix. ;; - p_n1: ;; - 0: for nodes. -;; - 1: for conns +;; - 1: for conns. ;; - p_l2: list containing the values for the matrix row. ;; ;; Notes: @@ -767,7 +767,7 @@ ;; - functions, ann, neural network. ;; ;; Parameters: -;; - p_d1: database name +;; - p_d1: database name. ;; - p_l1: ann. ;; ;; Output: @@ -817,7 +817,7 @@ ;; - functions, ann, neural network. ;; ;; Parameters: -;; - p_d1: database name +;; - p_d1: database name. ;; - p_l1: ann. ;; ;; Output: @@ -992,7 +992,6 @@ 0 l1)))) - ;;(grsp-ann-counter-upd count 0) (set! c0 (array-ref count 0 0)) (set! i2 (in i2))) @@ -1135,7 +1134,7 @@ ;; Calculate number of rows based on total number of ann layers. (set! m1 (+ 2 p_nm)) - ;; Create empty matrix + ;; Create empty matrix. (set! res1 (grsp-matrix-create 0 m1 n1)) ;; Extract the boundaries of the matrix. @@ -1545,7 +1544,7 @@ ;; Prepare data for activation function. (set! n5 (array-ref res1 0 5)) ;; Bias. (set! n7 (array-ref res1 0 7)) ;; Associated function. - (set! n9 (array-ref res1 0 9)) ;; Weight. (was elem 7) + (set! n9 (array-ref res1 0 9)) ;; Weight (was elem 7). ;; Set activation function input value. (set! n6 (* (+ n6 n9) n5)) @@ -1753,7 +1752,7 @@ (display "\n ++ 1.1 Node number ") (display id) (display "\n"))) - ;; *** + (grsp-ann-node-eval p_b3 id nodes conns count) (set! res3 (grsp-ann-node-eval p_b3 id nodes conns count)) @@ -2359,7 +2358,7 @@ (set! odata (grsp-matrix-row-subrepal odata m3 (list 0 0 0 0))) ;; Fill data. - (array-set! odata (array-ref res2 i2 0) m3 0) ;; id + (array-set! odata (array-ref res2 i2 0) m3 0) ;; id. (array-set! odata (array-ref res2 i2 3) m3 1) ;; layer. (array-set! odata (array-ref res2 i2 4) m3 2) ;; layer pos. (array-set! odata (array-ref res2 i2 6) m3 3) ;; output value col. @@ -2556,7 +2555,7 @@ ;; - See grsp-m2datai. ;; ;; Examples: -;; - example3.scm +;; - example3.scm. ;; ;; Output: ;; - p_l1 with an updated datai table. @@ -2732,7 +2731,7 @@ ;; - See grsp3.grsp-matrix-fdifm, grsp-ann-fdifm. ;; ;; Examples: -;; - example3.scm +;; - example3.scm. ;; ;; Output: ;; - A list containing difference maps (matrices) for each pair of ann matrices; @@ -2951,7 +2950,7 @@ (set! i2 lm2) (while (<= i1 hm1) - ;; Add a row in res2 + ;; Add a row in res2. (set! res2 (grsp-matrix-subexp res2 1 0)) (set! hm2 (grsp-matrix-esi 2 res2)) @@ -3414,7 +3413,7 @@ ;; - p_l1: ann. ;; ;; Examples: -;; - example3.scm +;; - example3.scm. ;; (define (grsp-ann-devt p_b1 p_l1) (let ((l2 '())) @@ -3626,10 +3625,10 @@ ;; - 2: describe only output connections. ;; ;; Notes: -;; - See grsp-ann-devnc +;; - See grsp-ann-devnc. ;; ;; Examples: -;; - example3.scm +;; - example3.scm. ;; (define (grsp-ann-devnca p_b1 p_b3 p_l1 p_n2) (let ((i1 0) @@ -3669,7 +3668,7 @@ ;; p_l1: ann. ;; ;; Examples: -;; - example3.scm +;; - example3.scm. ;; (define (grsp-ann-stats p_s1 p_l1) (let ((size 0) diff --git a/grsp9.scm b/grsp9.scm index 61c5910..6c7af61 100644 --- a/grsp9.scm +++ b/grsp9.scm @@ -908,7 +908,7 @@ ;; ;; Parameters: ;; - p_a1: 1 x n vector with n elements, representing an n-dimensinal problem. -;; [-5.0, +5.0] +;; [-5.0, +5.0]. ;; ;; Sources: ;; - [1]. @@ -1185,8 +1185,8 @@ ;;;; grsp-cop-rosenbrock1 - Rosenbrock test, constrained objective function ;; (cube, line). Returns +nan.0 for unconstraied arguments. -;; - (p_x1 - 1)**3 - p_y1 + 1 <= 0 -;; - p_x1 = p_y1 - 2 <= 0 +;; - (p_x1 - 1)**3 - p_y1 + 1 <= 0. +;; - p_x1 = p_y1 - 2 <= 0. ;; ;; Keywords: ;; - functions, test, optimization, artificial, landscape. @@ -1220,7 +1220,7 @@ ;;;; grsp-cop-rosenbrock2 - Rosenbrock test, constrained objective function ;; (disk). Returns +nan.0 for unconstraied arguments. -;; - p_x1**2 + p_y1**2 <= 2 +;; - p_x1**2 + p_y1**2 <= 2- ;; ;; Keywords: ;; - functions, test, optimization, artificial, landscape.