Category : Miscellaneous Language Source Code
Archive   : NEURAL.ZIP
Filename : ADD_PATT.C
Output of file : ADD_PATT.C contained in archive : NEURAL.ZIP
ADD_PATT ADDS A PATTERN TO THE BAM MATRIX XTY
COPYRIGHT (C) 1987, JOEL S. DAVIS. AFTER BYTE PUBLICATION, APPROVED FOR
NON-COMMERCIAL USE ONLY
*/
#include "STRUCT.H"
#include "EXT.H"
add_patt(an,bn)
int *an,*bn;
{
int i,j;
/* MAKE VECTORS BIPOLAR */
for(i=0;i<*an;i++){
if(a[i]<=0){
x[i] = -1;
}else{
x[i] = 1;
}
}
for(j=0;j<*bn;j++){
if(b[j]<=0){
y[j] = -1;
}else{
y[j] = 1;
}
}
/* UPDATE XTY */
for(i=0;i<*an;i++){
for(j=0;j<*bn;j++){
xty[i][j] += x[i]*y[j];
}
}
/* SIGNAL COMPLETION */
putchar(BELL);
}
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/