📄 generatehtml.tcl
字号:
#!/opt/tcl/bin/tclshset htmlPath "./"set javaCode "DemoGNGcode.html"set description "http://www.neuroinformatik.ruhr-uni-bochum.de/ini/VDM/research/gsn/JavaPaper/"set manual "tex/DemoGNG/DemoGNG.html"set algoNames [list GNG GNG-U HCL NG NGwCHL CHL LBG LBG-U GG SOM]set distribNames [list "Rectangle" "Circle" "Ring" "UNI" "Small Spirals" "Large Spirals" "HiLo Density" "Discrete" "UNIT" "Move & Jump" "Move" "Jump" "Right MouseB"]proc fillHTMLparam {fileId algo distrib} { global javaCode manual description puts $fileId "<title>Neural Competitive Models Demo</title>"# puts $fileId "<hr>" puts $fileId "<strong>" puts $fileId "<p align=right><strong>Authors: </strong>" puts $fileId "<A HREF=\"http://www.neuroinformatik.ruhr-uni-bochum.de/ini/PEOPLE/loos\">" puts $fileId "Hartmut S. Loos</A>" puts $fileId "<A HREF=\"http://www.neuroinformatik.ruhr-uni-bochum.de/ini/PEOPLE/fritzke\">" puts $fileId "Bernd Fritzke</A>" puts $fileId "<hr></p>" puts $fileId "<CENTER>" puts $fileId "" puts $fileId "<!--Neural Nets-->" puts $fileId "" puts $fileId " <H2>DemoGNG (Version 1.5)</H2>" puts $fileId "(Please wait while loading ca. 122 KByte class-code.)" puts $fileId "<p>" puts $fileId "</strong>" puts $fileId "</CENTER>" puts $fileId "" puts $fileId " <i>DemoGNG</i>, a Java applet, implements several methods related to" puts $fileId " competitive learning. It is possible to experiment with the" puts $fileId " methods using various data distributions and observe the learning process." puts $fileId " A common terminology is used to make it easy to compare one method" puts $fileId " to the other." puts $fileId "<p>" puts $fileId "" puts $fileId "<hr>" puts $fileId "" puts $fileId "" puts $fileId "" puts $fileId "" puts $fileId "" puts $fileId "" puts $fileId "<center>"# puts $fileId "<applet archive=\"DemoGNG.zip\" code=\"DemoGNG.class\" width=625 height=500>" puts $fileId "<applet archive=\"DemoGNG.zip\" code=\"DemoGNG.class\" width=720 height=560>" puts $fileId "<param name=algorithm value=\"$algo\">" puts $fileId "<param name=distribution value=\"$distrib\">" puts $fileId "<b>Your browser does not support Java applets.</b>" puts $fileId "</applet>" puts $fileId "</center>" puts $fileId "" puts $fileId "<p>" puts $fileId "<hr>" puts $fileId "" puts $fileId "<center>" puts $fileId "<table border=3 width = 400>" puts $fileId "<tr>" puts $fileId "<td width = 0>" puts $fileId "<td width = 210><center><a href=\"$javaCode\"><b>Java Code</b></a></center>" puts $fileId "<td width = 210><center><a href=\"$description\"><b>Model Description</b></a></center>" puts $fileId "<td width = 210><center><a href=\"$manual\"><b>Manual</b></a></center>" puts $fileId "<td width = 0>" puts $fileId "<tr>" puts $fileId "</table>" puts $fileId "</center>" puts $fileId "" puts $fileId " <p>" puts $fileId " Hopefully, the experimentation with the models" puts $fileId " will increase the intuitive understanding and make it easier to" puts $fileId " judge their particular strengths and weaknesses." puts $fileId " <p>" puts $fileId " The following algorithms are available:" puts $fileId "<UL>" puts $fileId "<LI> LBG (Linde, Buzo, Gray)" puts $fileId "<LI> LBG-U (Fritzke)" puts $fileId "<LI> Hard Competitive Learning (standard algorithm)" puts $fileId "<LI> Neural Gas (Martinetz and Schulten)" puts $fileId "<LI> Competitive Hebbian Learning (Martinetz and Schulten)" puts $fileId "<LI> Neural Gas with Competitive Hebbian Learning (Martinetz and Schulten)" puts $fileId "<LI> Growing Neural Gas (Fritzke)" puts $fileId "<LI> Growing Neural Gas with Utility (GNG-U, Fritzke)" puts $fileId "<LI> Self-Organizing Map (Kohonen)" puts $fileId "<LI> Growing Grid (Fritzke)" puts $fileId "</UL>" puts $fileId "" puts $fileId "If you are not quite familiar with what the applet does, " puts $fileId "have a look at the" puts $fileId "<A HREF=\"tex/DemoGNG/DemoGNG.html\"><b>manual in HTML-format</b></A>" puts $fileId "or as" puts $fileId "<A HREF=\"tex/DemoGNG.ps.gz\"><b>Postscript version</b></A> (ca. 233 KByte)." puts $fileId "<p>" puts $fileId "For those of you, who want to go into further details:" puts $fileId "look at the technical report " puts $fileId "<A HREF=\"http://www.neuroinformatik.ruhr-uni-bochum.de/ini/VDM/research/gsn/JavaPaper/\"><b>Some Competitive Learning Methods</b></A> " puts $fileId "by Bernd Fritzke also available as " puts $fileId "<A HREF=\"ftp://ftp.neuroinformatik.ruhr-uni-bochum.de/pub/software/NN/DemoGNG/sclm.ps.gz\"><b>Postscript version</b></A>." puts $fileId "" puts $fileId "Furthermore, you can" puts $fileId "<A HREF=\"DemoGNGcode.html#download\"><b>Download the whole Package</b></A> or just" puts $fileId "have a look at the" puts $fileId "<A HREF=\"DemoGNGcode.html#source\"><b>DemoGNG Source</b></A> or the" puts $fileId "<A HREF=\"DemoGNGcode.html#cdoc\"><b>Code Documentation</b></A>."}puts "Autogenerate HTML-Files:"foreach algo $algoNames { set i 0 puts -nonewline " $algo " # The parameter html-files foreach distrib $distribNames { set htmlName "" puts -nonewline "." flush stdout append htmlName $htmlPath $algo "_" $i ".html" if [catch {open $htmlName w 0644} fileId] { puts stderr "Cannot open $htmlName: $fileId" } else { fillHTMLparam $fileId $algo $distrib close $fileId } incr i } # The main (default) html-files set htmlName "" append htmlName $htmlPath $algo ".html" if [catch {open $htmlName w 0644} fileId] { puts stderr "Cannot open $htmlName: $fileId" } else { puts -nonewline "." fillHTMLparam $fileId $algo [lindex $distribNames 3] close $fileId } puts " ok!"}puts "Ready."
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -