This is Info file pm.info, produced by Makeinfo version 1.68 from the
input file bigpm.texi.


File: pm.info,  Node: Tree-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Tree Menu
*********

   This is the documentation for modules associated with the main module
Tree.

* Menu:

* Tree/DAG_Node:: (super)class for representing nodes in a tree
* Tree/Fat:: Perl Extension to Implement Fat-Node Trees
* Tree/MultiNode:: a multi node tree object.  Most useful for  modeling heirarchial data structures.
* Tree/Nary:: Perl implementation of N-ary search trees.
* Tree/RedBlack:: Perl implementation of Red/Black tree, a type of balanced tree.
* Tree/RedBlack/Node:: Node class for Perl implementation of Red/Black tree
* Tree/Ternary:: Perl implementation of ternary search trees.
* Tree/Ternary_XS:: Perl extension implementing ternary search trees.
* Tree/Trie:: An implementation of the Trie data structure in Perl


File: pm.info,  Node: UDDI-menu,  Next: Module List,  Prev: Module List,  Up: Module List

UDDI Menu
*********

   This is the documentation for modules associated with the main module
UDDI.

* Menu:

* UDDI Itself: UDDI. UDDI client interface
* UDDI/Lite:: Library for UDDI clients in Perl


File: pm.info,  Node: UNIVERSAL-menu,  Next: Module List,  Prev: Module List,  Up: Module List

UNIVERSAL Menu
**************

   This is the documentation for modules associated with the main module
UNIVERSAL.

* Menu:

* UNIVERSAL Itself: UNIVERSAL. base class for ALL classes (blessed references)
* UNIVERSAL/exports:: Lightweight, universal exporting of variables
* UNIVERSAL/require:: require() modules from a variable


File: pm.info,  Node: URI-menu,  Next: Module List,  Prev: Module List,  Up: Module List

URI Menu
********

   This is the documentation for modules associated with the main module
URI.

* Menu:

* URI Itself: URI. Uniform Resource Identifiers (absolute and relative)
* URI/Attr:: associate attributes with the URI name space
* URI/Bookmark:: Perl module class encapsulating an entry in a typical bookmark file.
* URI/Bookmark/Netscape:: Perl module containing routines for individual Netscape bookmarks
* URI/Bookmarks:: Perl module class encapsulating bookmark files
* URI/Bookmarks/Netscape:: Perl module containing routines for Netscape bookmark files
* URI/Escape:: Escape and unescape unsafe characters
* URI/Find:: Find URIs in arbitrary text
* URI/Heuristic:: Expand URI using heuristics
* URI/Sequin:: Extract information from the URLs of Search-Engines
* URI/URL:: Uniform Resource Locators
* URI/WithBase:: URI which remember their base
* URI/data:: URI that contain immediate data
* URI/file:: URI that map to local file names
* URI/ldap:: LDAP Uniform Resource Locators


File: pm.info,  Node: URI2-menu,  Next: Module List,  Prev: Module List,  Up: Module List

URI2 Menu
*********

   This is the documentation for modules associated with the main module
URI2.

* Menu:

* URI2/Heuristic:: Expand URL using heuristics


File: pm.info,  Node: Unicode-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Unicode Menu
************

   This is the documentation for modules associated with the main module
Unicode.

* Menu:

* Unicode/CharName:: Look up Unicode character names
* Unicode/Map:: maps charsets from and to utf16 unicode
* Unicode/Map8:: Mapping table between 8-bit chars and Unicode
* Unicode/MapUTF8:: Conversions to and from arbitrary character sets and UTF8
* Unicode/String:: String of Unicode characters (UCS2/UTF16)


File: pm.info,  Node: Unix-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Unix Menu
*********

   This is the documentation for modules associated with the main module
Unix.

* Menu:

* Unix/AliasFile:: Perl interface to /etc/aliases format files
* Unix/AutomountFile:: Perl interface to automounter files
* Unix/ConfigFile:: Perl interface to various Unix configuration files
* Unix/GroupFile:: Perl interface to /etc/group format files
* Unix/PasswdFile:: Perl interface to /etc/passwd format files
* Unix/Processors:: Interface to processor (CPU) information
* Unix/Processors/Info:: Interface to processor (CPU) information
* Unix/Syslog:: Perl interface to the UNIX syslog(3) calls


File: pm.info,  Node: User-menu,  Next: Module List,  Prev: Module List,  Up: Module List

User Menu
*********

   This is the documentation for modules associated with the main module
User.

* Menu:

* User Itself: User. API for locating user information regardless of OS
* User/Utmp:: Perl access to utmp- and utmpx-style databases
* User/grent:: by-name interface to Perl's built-in getgr*() functions
* User/pwent:: by-name interface to Perl's built-in getpw*() functions


File: pm.info,  Node: VCP-menu,  Next: Module List,  Prev: Module List,  Up: Module List

VCP Menu
********

   This is the documentation for modules associated with the main module
VCP.

* Menu:

* VCP Itself: VCP. Versioned Copy, copying hierarchies of versioned files
* VCP/Debug:: debugging support for VCP
* VCP/Dest:: A base class for VCP destinations
* VCP/Dest/cvs:: cvs destination driver
* VCP/Dest/p4:: p4 destination driver
* VCP/Dest/revml:: Outputs versioned files to a revml file
* VCP/Plugin:: A base class for VCP::Source and VCP::Dest
* VCP/Rev:: VCP's concept of a revision
* VCP/Revs:: A collection of VCP::Rev objects.
* VCP/Source:: A base class for repository sources
* VCP/Source/cvs:: A CVS repository source
* VCP/Source/p4:: A Perforce p4 repository source
* VCP/Source/revml:: Outputs versioned files to a revml file


File: pm.info,  Node: VCS-menu,  Next: Module List,  Prev: Module List,  Up: Module List

VCS Menu
********

   This is the documentation for modules associated with the main module
VCS.

* Menu:

* VCS Itself: VCS. Library for generic Version Control System access in Perl
* VCS/CVS:: Provide a simple interface to CVS (the Concurrent Versions System).
* VCS/Cvs:: implementation notes for CVS implementation
* VCS/Dir:: module for access to a VCS directory
* VCS/File:: module for access to a file under version control
* VCS/PVCS:: Global configuration class for for VCS::PVCS::*.
* VCS/PVCS/Archive:: Archive class for for VCS::PVCS.
* VCS/PVCS/Attributes:: Attributes class for for VCS::PVCS
* VCS/PVCS/Commands:: Command class for for VCS::PVCS
* VCS/PVCS/Folder:: Folder class for for VCS::PVCS.
* VCS/PVCS/Project:: Standard PVCS Project class for for VCS::PVCS
* VCS/Version:: module for access to a VCS version


File: pm.info,  Node: VMS-menu,  Next: Module List,  Prev: Module List,  Up: Module List

VMS Menu
********

   This is the documentation for modules associated with the main module
VMS.

* Menu:

* VMS/FlatFile:: read and write hashes with VMS::IndexedFile.


File: pm.info,  Node: VRML-menu,  Next: Module List,  Prev: Module List,  Up: Module List

VRML Menu
*********

   This is the documentation for modules associated with the main module
VRML.

* Menu:

* VRML Itself: VRML. Specification independent VRML methods (1.0, 2.0, 97)
* VRML/Base:: common basic methods for VRML in/output
* VRML/Browser:: perl module to implement a VRML97 browser
* VRML/Color:: color functions and X11 color names
* VRML/VRML1:: VRML methods with the VRML 1.0 standard
* VRML/VRML1/Standard:: implements the VRML 1.x standard nodes
* VRML/VRML2:: VRML methods with the VRML 2.0/97 standard
* VRML/VRML2/Standard:: implements VRML 2.0/97 standard nodes
* VRML/Viewer:: navigation modes of FreeWRL


File: pm.info,  Node: VcsTools-menu,  Next: Module List,  Prev: Module List,  Up: Module List

VcsTools Menu
*************

   This is the documentation for modules associated with the main module
VcsTools.

* Menu:

* VcsTools/DataSpec/HpTnd:: Hp Tnd custom data for HMS logs
* VcsTools/DataSpec/Rcs:: Rcs data description
* VcsTools/File:: Perl class to manage a VCS file.
* VcsTools/FileAgent:: Perl class to handle a file
* VcsTools/History:: Perl class to manage a VCS history.
* VcsTools/HmsAgent:: Perl class to manage ONE HMS files..
* VcsTools/LogParser:: Perl class to translate RCS based log to info hash
* VcsTools/Process:: Perl functions to handle child process (blocking mode)
* VcsTools/RcsAgent:: Perl class to manage ONE RCS files..
* VcsTools/Source:: Perl base class for some VcsTools components
* VcsTools/Version:: Perl class to manage VCS revision.


File: pm.info,  Node: Verilog-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Verilog Menu
************

   This is the documentation for modules associated with the main module
Verilog.

* Menu:

* Verilog/Language:: Verilog language utilities
* Verilog/Parse:: parse Verilog language files
* Verilog/Parser:: Parse Verilog language files
* Verilog/SigParser:: Signal Parsing for Verilog language files


File: pm.info,  Node: Video-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Video Menu
**********

   This is the documentation for modules associated with the main module
Video.

* Menu:

* Video/Capture/V4l:: Perl interface to the Video4linux framegrabber interface.
* Video/Capture/VBI:: Functions to manipulate vbi fields & lines.
* Video/Frequencies:: Many, many frequency constants and lists.
* Video/RTjpeg:: Real time, jpeg-like video compression.
* Video/XawTV:: read, create and edit .xawtvrc's.


File: pm.info,  Node: VoiceXML-menu,  Next: Module List,  Prev: Module List,  Up: Module List

VoiceXML Menu
*************

   This is the documentation for modules associated with the main module
VoiceXML.

* Menu:

* VoiceXML/Server:: An easy-to-use VoiceXML server class


File: pm.info,  Node: WML-menu,  Next: Module List,  Prev: Module List,  Up: Module List

WML Menu
********

   This is the documentation for modules associated with the main module
WML.

* Menu:

* WML/Card:: Perl extension for builiding WML Cards according to the browser being used.
* WML/Deck:: Perl extension for builiding WML Decks.


File: pm.info,  Node: WWW-menu,  Next: Module List,  Prev: Module List,  Up: Module List

WWW Menu
********

   This is the documentation for modules associated with the main module
WWW.

* Menu:

* WWW/BBSWatch:: Send, via email, messages posted to a WWW bulletin board
* WWW/Babelfish:: Perl extension for translation via babelfish
* WWW/Poll:: Perl extension to build web polls
* WWW/Robot:: configurable web traversal engine (for web robots & agents)
* WWW/RobotRules:: Parse robots.txt files
* WWW/RobotRules/AnyDBM_File:: Persistent RobotRules
* WWW/Search:: Virtual base class for WWW searches
* WWW/Search/AOL/Classifieds/Employment:: class for searching Jobs Classifieds on AOL
* WWW/Search/AlltheWeb:: class for searching AlltheWeb
* WWW/Search/AltaVista:: class for searching Alta Vista
* WWW/Search/AltaVista/AdvancedNews:: class for advanced Alta Vista news searching
* WWW/Search/AltaVista/AdvancedWeb:: class for advanced Alta Vista web searching
* WWW/Search/AltaVista/Careers:: class for searching www.altavistacareers.com
* WWW/Search/AltaVista/Intranet:: class for searching via AltaVista Search Intranet 2.3
* WWW/Search/AltaVista/News:: class for Alta Vista news searching
* WWW/Search/AltaVista/Web:: class for Alta Vista web searching
* WWW/Search/Crawler:: class for searching Crawler
* WWW/Search/Dice:: class for searching Dice
* WWW/Search/Excite:: backend for searching www.excite.com
* WWW/Search/Excite/News:: class for searching ExciteNews
* WWW/Search/ExciteForWebServers:: class for searching ExciteforWeb engine
* WWW/Search/Fireball:: class for searching Fireball
* WWW/Search/FirstGov:: class for searching http://www.firstgov.gov
* WWW/Search/FolioViews:: class for searching Folio Views
* WWW/Search/Go:: backend class for searching with go.com
* WWW/Search/Gopher:: class for searching Gopher pages
* WWW/Search/HeadHunter:: class for searching HeadHunter
* WWW/Search/HotBot:: backend for searching hotbot.lycos.com
* WWW/Search/HotFiles:: class for searching ZDnet HotFiles
* WWW/Search/Infoseek:: class for searching Infoseek
* WWW/Search/Infoseek/Companies:: class for Infoseek Companies searching
* WWW/Search/Infoseek/Email:: class for searching for e-mail at Infoseek
* WWW/Search/Infoseek/News:: class for Infoseek News searching
* WWW/Search/Infoseek/Web:: class for Infoseek Web searching
* WWW/Search/Livelink:: class for searching Open Text Livelink Intranet search engine
* WWW/Search/MSIndexServer:: class for searching MSIndexServer search engine
* WWW/Search/MetaCrawler:: class for searching http://mc3.go2net.com!
* WWW/Search/Metapedia:: class for searching online Encyclopedias
* WWW/Search/Monster:: class for searching Monster
* WWW/Search/NetFind:: class for searching NetFind  Originally based on Google.pm. NetFind is the same as AOL search.
* WWW/Search/Nomade:: class for searching Nomade
* WWW/Search/Null:: class for searching any web site
* WWW/Search/PLweb:: class for searching PLS PLweb search engine
* WWW/Search/SFgate:: class for searching SFgate/Wais search engine
* WWW/Search/Search97:: class for searching Verity Search97 search engine
* WWW/Search/Simple:: class for searching any web site
* WWW/Search/Test:: utilities to aid in testing WWW::Search backends
* WWW/Search/Translator:: class for Translating languages
* WWW/Search/Verity:: class for searching Verity
* WWW/Search/VoilaFr:: class for searching voila.fr
* WWW/Search/WebCrawler:: class for searching WebCrawler
* WWW/Search/Yahoo/Classifieds/Employment:: class for searching employment classifieds on Yahoo!
* WWW/Search/YahooNews:: backend for searching Yahoo News
* WWW/SearchResult:: class for results returned from WWW::Search
* WWW/Sitemap:: functions for generating a site map for a given site URL.


File: pm.info,  Node: Watchdog-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Watchdog Menu
*************

   This is the documentation for modules associated with the main module
Watchdog.

* Menu:

* Watchdog/Base:: Watchdog base class
* Watchdog/HTTP:: Test status of HTTP service
* Watchdog/Mysql:: Test status of Mysql service
* Watchdog/Process:: Check for process in process table
* Watchdog/Util:: Watchdog utility functions


File: pm.info,  Node: Weather-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Weather Menu
************

   This is the documentation for modules associated with the main module
Weather.

* Menu:

* Weather/PIL::
* Weather/Product:: routines for parsing WMO-style weather products
* Weather/Product/NWS:: routines for parsing NWS weather products
* Weather/UGC:: routines for parsing Universal Generic Code (UGC) lines
* Weather/WMO:: routines for parsing WMO abbreviated header lines


File: pm.info,  Node: WebCache-menu,  Next: Module List,  Prev: Module List,  Up: Module List

WebCache Menu
*************

   This is the documentation for modules associated with the main module
WebCache.

* Menu:

* WebCache/Digest:: a Cache Digest implementation in Perl
* WebCache/ICP:: Internet Cache Protocol client and server


File: pm.info,  Node: WebFS-menu,  Next: Module List,  Prev: Module List,  Up: Module List

WebFS Menu
**********

   This is the documentation for modules associated with the main module
WebFS.

* Menu:

* WebFS/FileCopy:: Get, put, move, copy, and delete files located by URIs
* WebFS/FileCopy/Put:: Object for putting data to either file or ftp URI


File: pm.info,  Node: WebFetch-menu,  Next: Module List,  Prev: Module List,  Up: Module List

WebFetch Menu
*************

   This is the documentation for modules associated with the main module
WebFetch.

* Menu:

* WebFetch Itself: WebFetch. Perl module to download and save information from the Web
* WebFetch/32BitsOnline:: download and save 32BitsOnline headlines
* WebFetch/CNETnews:: download and save c|net news.com headlines or news search
* WebFetch/CNNsearch:: search for stories at CNN Interactive
* WebFetch/COLA:: news from the comp.os.linux.announce ("cola") newsgroup
* WebFetch/DebianNews:: download and save Debian News headlines
* WebFetch/Freshmeat:: download and save Freshmeat headlines
* WebFetch/General:: download and save headlines from other WebFetch sites
* WebFetch/LinuxDevNet:: download and save Linux Dev.Net headlines
* WebFetch/LinuxTelephony:: download and save LinuxTelephony headlines
* WebFetch/LinuxToday:: download and save LinuxToday headlines
* WebFetch/ListSubs:: summarize mail list subscriptions
* WebFetch/PerlStruct:: accepts a Perl structure with pre-parsed news
* WebFetch/SiteNews:: download and save SiteNews headlines
* WebFetch/Slashdot:: download and save Slashdot (or any Slashdot-compatible) headlines
* WebFetch/YahooBiz:: download and save YahooBiz headlines


File: pm.info,  Node: Wharf-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Wharf Menu
**********

   This is the documentation for modules associated with the main module
Wharf.

* Menu:

* Wharf/JDockApp:: Perl extension for doing Wharf or Window Maker dockapps.
* Wharf/JDockApp/jtools:: Perl extension for JDockApp.  It's the tools, man.


File: pm.info,  Node: Win32-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Win32 Menu
**********

   This is the documentation for modules associated with the main module
Win32.

* Menu:

* Win32 Itself: Win32. Interfaces to some Win32 API Functions
* Win32/ADO:: ADO Constants and a couple of helper functions
* Win32/API:: Perl Win32 API Import Facility
* Win32/ASP:: a Module for ASP (PerlScript) Programming
* Win32/ASP/DBRecord:: an abstract parent class for representing database records
* Win32/ASP/DBRecordGroup:: an abstract parent class for representing groups of database records
* Win32/ASP/Error:: an abstract parent class for implementing exceptions in Win32::ASP::DB
* Win32/ASP/Extras:: a extension to Win32::ASP that provides more methods
* Win32/ASP/Field:: an abstract parent class for representing database fields, used by Win32::ASP::DBRecord
* Win32/ASP/Profile:: provides quick and dirty profiling for web performance testing
* Win32/ChangeNotify:: Monitor events related to files and directories
* Win32/Console:: Win32 Console and Character Mode Functions
* Win32/DriveInfo:: drives on Win32 systems
* Win32/Event:: Use Win32 event objects from Perl
* Win32/EventLog:: Process Win32 Event Logs from Perl
* Win32/EventLog/Carp:: for carping in the Windows NT Event Log
* Win32/File:: manage file attributes in perl
* Win32/FileOp:: 0.10.3
* Win32/FileSecurity:: manage FileSecurity Discretionary Access Control Lists in perl
* Win32/GUI/BitmapInline:: Inline bitmap support for Win32::GUI
* Win32/GUI/GridLayout:: Grid layout support for Win32::GUI
* Win32/GuiTest:: Perl GUI Test Utilities
* Win32/IPC:: Base class for Win32 synchronization objects
* Win32/Internet:: Access to WININET.DLL functions
* Win32/Mutex:: Use Win32 mutex objects from Perl
* Win32/NetAdmin:: manage network groups and users in perl
* Win32/NetResource:: manage network resources in perl
* Win32/PerfLib:: accessing the Windows NT Performance Counter
* Win32/ProcFarm/Parent:: stand-in for child process in ProcFarm RPC system
* Win32/ProcFarm/PerpetualPool:: manages a pool of child processes for perpetual jobs
* Win32/ProcFarm/Pool:: manages a pool of child processes
* Win32/ProcFarm/Port:: manages access to the TCP port for ProcFarm system
* Win32/RASE:: managing dialup entries and network connections on Win32
* Win32/Semaphore:: Use Win32 semaphore objects from Perl
* Win32/Service:: manage system services in perl
* Win32/Sound:: An extension to play with Windows sounds
* Win32/SystemInfo:: Memory and Processor information on Win32 systems
* Win32/TieRegistry:: Powerful and easy ways to manipulate a registry [on Win32 for now].


File: pm.info,  Node: Win32API-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Win32API Menu
*************

   This is the documentation for modules associated with the main module
Win32API.

* Menu:

* Win32API/Const:: Access Win32 constants such as WM_CLOSE, HELP_CONTENTS, etc.
* Win32API/File:: Low-level access to Win32 system API calls for files/dirs.
* Win32API/Net:: Perl interface to the Windows NT LanManager API account management functions.
* Win32API/Registry:: Low-level access to Win32 system API calls from WINREG.H


File: pm.info,  Node: Wizard-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Wizard Menu
***********

   This is the documentation for modules associated with the main module
Wizard.

* Menu:

* Wizard Itself: Wizard. A framework for building wizard-style applications.
* Wizard/Examples/Apache:: MISSING SHORT DESCRIPTION
* Wizard/Examples/Apache/Directory:: MISSING SHORT DESCRIPTION
* Wizard/Examples/Apache/Host:: MISSING SHORT DESCRIPTION
* Wizard/Examples/Apache/Server:: MISSING SHORT DESCRIPTION
* Wizard/Examples/Apache/VirtualServer:: MISSING SHORT DESCRIPTION
* Wizard/HTML:: A subclass for running Wizard applications in HTML::EP.
* Wizard/LDAP:: Administration interface for your LDAP server
* Wizard/LDAP/User:: A base class for implementing users in the LDAP wizard
* Wizard/SaveAble:: A package for automatically saved objects.
* Wizard/SaveAble/LDAP:: A package for automatically saved objects,     that are stored in a LDAP server's directory structure.
* Wizard/SaveAble/ShellVars:: MISSING SHORT DESCRIPTION
* Wizard/Shell:: A subclass for running Wizard applications in a shell.
* Wizard/State:: A class for storing the Wizard state.


File: pm.info,  Node: WordNet-menu,  Next: Module List,  Prev: Module List,  Up: Module List

WordNet Menu
************

   This is the documentation for modules associated with the main module
WordNet.

* Menu:

* WordNet/Query:: perl interface for noun relations of WordNet
* WordNet/QueryData:: direct perl interface to WordNet database


File: pm.info,  Node: X11-menu,  Next: Module List,  Prev: Module List,  Up: Module List

X11 Menu
********

   This is the documentation for modules associated with the main module
X11.

* Menu:

* X11/Auth:: Perl module to read X11 authority files
* X11/Keysyms:: Perl module for names of X11 keysyms
* X11/Protocol:: Perl module for the X Window System Protocol, version 11
* X11/Protocol/Connection:: Perl module abstract base class for X11 client to server connections
* X11/Protocol/Connection/FileHandle:: Perl module base class for FileHandle-based X11 connections
* X11/Protocol/Connection/INETFH:: Perl module for FileHandle-based TCP/IP X11 connections
* X11/Protocol/Connection/INETSocket:: Perl module for IO::Socket::INET-based X11 connections
* X11/Protocol/Connection/Socket:: Perl module base class for IO::Socket-based X11 connections
* X11/Protocol/Connection/UNIXFH:: Perl module for FileHandle-based Unix-domain X11 connections
* X11/Protocol/Connection/UNIXSocket:: Perl module for IO::Socket::UNIX-based X11 connections
* X11/Protocol/Ext/BIG_REQUESTS:: Perl module for the X11 protocol Big Requests extension
* X11/Protocol/Ext/SHAPE:: Perl module for the X11 Protocol Nonrectangular Window Shape Extension


File: pm.info,  Node: X500-menu,  Next: Module List,  Prev: Module List,  Up: Module List

X500 Menu
*********

   This is the documentation for modules associated with the main module
X500.

* Menu:

* X500/DN/Parser:: Parse X500 Distinguished Names


File: pm.info,  Node: XBase-menu,  Next: Module List,  Prev: Module List,  Up: Module List

XBase Menu
**********

   This is the documentation for modules associated with the main module
XBase.

* Menu:

* XBase Itself: XBase. Perl module for reading and writing the dbf files
* XBase/Base:: Base input output module for XBase suite
* XBase/FAQ:: Frequently asked questions about the XBase.pm/DBD::XBase modules
* XBase/Index:: base class for the index files for dbf
* XBase/Memo:: Generic support for various memo formats
* XBase/SDBM:: SDBM nonportable index support for dbf


File: pm.info,  Node: XML-menu,  Next: Module List,  Prev: Module List,  Up: Module List

XML Menu
********

   This is the documentation for modules associated with the main module
XML.

* Menu:

* XML/AutoWriter:: DOCTYPE based XML output
* XML/Catalog:: Resolve public identifiers and remap system identifiers
* XML/Checker:: A perl module for validating XML
* XML/Checker/Parser:: an XML::Parser that validates at parse time
* XML/Config:: MISSING SHORT DESCRIPTION
* XML/DOM:: A perl module for building DOM Level 1 compliant document structures
* XML/DOM/AttDef:: A single XML attribute definition in an ATTLIST in XML::DOM
* XML/DOM/AttlistDecl:: An XML ATTLIST declaration in XML::DOM
* XML/DOM/Attr:: An XML attribute in XML::DOM
* XML/DOM/CDATASection:: Escaping XML text blocks in XML::DOM
* XML/DOM/CharacterData:: Common interface for Text, CDATASections and Comments
* XML/DOM/Comment:: An XML comment in XML::DOM
* XML/DOM/DOMImplementation:: Information about XML::DOM implementation
* XML/DOM/Document:: An XML document node in XML::DOM
* XML/DOM/DocumentFragment:: Facilitates cut & paste in XML::DOM documents
* XML/DOM/DocumentType:: An XML document type (DTD) in XML::DOM
* XML/DOM/Element:: An XML element node in XML::DOM
* XML/DOM/ElementDecl:: An XML ELEMENT declaration in XML::DOM
* XML/DOM/Entity:: An XML ENTITY in XML::DOM
* XML/DOM/EntityReference:: An XML ENTITY reference in XML::DOM
* XML/DOM/NamedNodeMap:: A hash table interface for XML::DOM
* XML/DOM/Node:: Super class of all nodes in XML::DOM
* XML/DOM/NodeList:: A node list as used by XML::DOM
* XML/DOM/Notation:: An XML NOTATION in XML::DOM
* XML/DOM/Parser:: An XML::Parser that builds XML::DOM document structures
* XML/DOM/PerlSAX:: Old name of *Note XML/Handler/BuildDOM: XML/Handler/BuildDOM,
* XML/DOM/ProcessingInstruction:: An XML processing instruction in XML::DOM
* XML/DOM/Text:: A piece of XML text in XML::DOM
* XML/DOM/ValParser:: an XML::DOM::Parser that validates at parse time
* XML/DOM/XMLDecl:: XML declaration in XML::DOM
* XML/DOM-ecmascript:: MISSING SHORT DESCRIPTION
* XML/DT:: module for unicode utf8 to latin1 translation
* XML/Doctype:: A DTD object class
* XML/Doctype/AttDef:: A class representing a definition in an <!ATTLIST> tag
* XML/Doctype/ElementDecl:: A class representing an <!ELEMENT> tag
* XML/Driver/HTML:: SAX Driver for non wellformed HTML.
* XML/Dumper:: Perl module for dumping Perl objects from/to XML
* XML/EP:: A framework for embedding XML into a web server
* XML/ESISParser:: Perl SAX parser using nsgmls
* XML/Edifact:: Perl module to handle XML::Edifact messages.
* XML/Element:: XML elements with the same interface as HTML::Element
* XML/Encoding:: A perl module for parsing XML encoding maps.
* XML/Filter/DetectWS:: A PerlSAX filter that detects ignorable whitespace
* XML/Filter/Digest:: XML::Filter::Digest
* XML/Filter/Hekeln:: a SAX stream editor
* XML/Filter/Reindent:: Reformats whitespace for pretty printing XML
* XML/Filter/SAXT:: Replicates SAX events to several SAX event handlers
* XML/Generator:: Perl extension for generating XML
* XML/Generator/DOM:: XML::Generator subclass for producing DOM trees instead of strings.
* XML/Grove:: Perl-style XML objects
* XML/Grove/AsCanonXML:: output XML objects in canonical XML
* XML/Grove/AsString:: output content of XML objects as a string
* XML/Grove/Builder:: PerlSAX handler for building an XML::Grove
* XML/Grove/Factory:: simplify creation of XML::Grove objects
* XML/Grove/IDs:: return an index of `id' attributes in a grove
* XML/Grove/Iter:: add tree iteration methods to XML objects
* XML/Grove/Path:: return the object at a path
* XML/Grove/PerlSAX:: an PerlSAX event interface for XML objects
* XML/Grove/Sub:: run a filter sub over a grove
* XML/Grove/Subst:: substitute values into a template
* XML/Grove/Visitor:: add visitor/callback methods to XML objects
* XML/Grove/XPointer:: deprecated module once intended for XPointer
* XML/Handler/BuildDOM:: PerlSAX handler that creates XML::DOM document structures
* XML/Handler/CanonXMLWriter:: output XML in canonical XML format
* XML/Handler/Composer:: Another XML printer/writer/generator
* XML/Handler/PrintEvents:: Prints PerlSAX events (for debugging)
* XML/Handler/PyxWriter:: convert Perl SAX events to ESIS of Nsgmls or Pyxie.
* XML/Handler/Sample:: a trivial PerlSAX handler
* XML/Handler/Subs:: a PerlSAX handler base class for calling user-defined subs
* XML/Handler/XMLWriter:: a PerlSAX handler for writing readable XML
* XML/Handler/YAWriter:: Yet another Perl SAX XML Writer
* XML/MetaGenerator:: Collects user input, validates input and generates output in a number of ways based on the defined grammar.
* XML/Node:: Node-based XML parsing: an simplified interface to XML::Parser
* XML/PPD:: PPD file format and XML parsing elements
* XML/PPMConfig:: PPMConfig file format and XML parsing elements
* XML/PYX:: XML to PYX generator
* XML/Parser:: A perl module for parsing XML documents
* XML/Parser/EasyTree:: Easier tree style for XML::Parser
* XML/Parser/Expat:: Lowlevel access to James Clark's expat XML parser
* XML/Parser/PerlSAX:: Perl SAX parser using XML::Parser
* XML/Parser/PyxParser:: convert ESIS of Nsgmls or Pyxie to Perl SAX events.
* XML/PatAct/ActionTempl:: An action module for
* XML/PatAct/Amsterdam:: An action module for simplistic style-sheets
* XML/PatAct/MatchName:: A pattern module for matching element names
* XML/PatAct/PatternTempl:: A pattern module for
* XML/PatAct/ToObjects:: An action module for creating Perl objects
* XML/Perl2SAX:: translate Perl SAX methods to Java/CORBA style methods
* XML/QL:: An XML query language
* XML/RSS:: creates and updates RSS files
* XML/Records:: Perlish record-oriented interface to XML
* XML/RegExp:: Regular expressions for XML tokens
* XML/Registry:: Perl module for loading and saving an XML registry.
* XML/SAX2Perl:: translate Java/CORBA style SAX methods to Perl methods
* XML/Schematron:: Perl implementation of the Schematron.
* XML/Schematron/Sablotron:: Perl extension for validating XML with XPath/XSLT expressions.
* XML/Schematron/XPath:: Perl extension for validating XML with XPath expressions.
* XML/Simple:: Trivial API for reading and writing XML (esp config files)
* XML/SimpleObject:: Perl extension allowing a simple object representation of a parsed XML::Parser tree.
* XML/Stream:: Creates and XML Stream connection and parses return data
* XML/Stream/Namespace:: Object to make defining Namespaces easier in                           XML::Stream.
* XML/Stream/Parser:: SAX XML Parser for XML Streams
* XML/Stream/Parser/DTD:: XML DTD Parser and Verifier
* XML/TiePYX:: Read or write XML data in PYX format via tied filehandle
* XML/TokeParser:: Simplified interface to XML::Parser
* XML/TreeBuilder:: Parser that builds a tree of XML::Element objects
* XML/Twig:: A perl module for processing huge XML documents in tree mode.
* XML/UM:: Convert UTF-8 strings to any encoding supported by XML::Encoding
* XML/ValidWriter:: DOCTYPE driven valid XML output
* XML/Writer:: Perl extension for writing XML documents.
* XML/XPath:: a set of modules for parsing and evaluating XPath statements
* XML/XPath/Boolean:: Boolean true/false values
* XML/XPath/Builder:: SAX handler for building an XPath tree
* XML/XPath/Literal:: Simple string values.
* XML/XPath/Node:: internal representation of a node
* XML/XPath/Node/Attribute:: a single attribute
* XML/XPath/Node/Comment:: an XML comment: <!-comment->
* XML/XPath/Node/Element:: an <element>
* XML/XPath/Node/Namespace:: an XML namespace node
* XML/XPath/Node/PI:: an XML processing instruction node
* XML/XPath/Node/Text:: an XML text node
* XML/XPath/NodeSet:: a list of XML document nodes
* XML/XPath/Number:: Simple numeric values.
* XML/XPath/PerlSAX:: A PerlSAX event generator for my wierd node structure
* XML/XPath/XMLParser:: The default XML parsing class that produces a node tree
* XML/XPathScript:: Stand alone XPathScript
* XML/XQL:: A perl module for querying XML tree structures with XQL
* XML/XQL/DOM:: Adds XQL support to XML::DOM nodes
* XML/XQL/Date:: Adds an XQL::Node type for representing and comparing dates and times
* XML/XQL/Query:: Creates an XQL query evaluater from a XQL expression
* XML/XQL/Tutorial:: Describes the XQL query syntax
* XML/XSLT:: A perl module for processing XSLT
* XML/miniXQL:: Module for doing stream based XML queries


File: pm.info,  Node: XMLNews-menu,  Next: Module List,  Prev: Module List,  Up: Module List

XMLNews Menu
************

   This is the documentation for modules associated with the main module
XMLNews.

* Menu:

* XMLNews/HTMLTemplate:: A module for converting NITF to HTML.
* XMLNews/Meta:: A module for reading and writing XMLNews metadata files.


File: pm.info,  Node: XTM-menu,  Next: Module List,  Prev: Module List,  Up: Module List

XTM Menu
********

   This is the documentation for modules associated with the main module
XTM.

* Menu:

* XTM Itself: XTM. Topic Map management
* XTM/Log:: Topic Map Logger
* XTM/Memory:: Topic Map management, in-memory data structure.
* XTM/XML:: Topic Map management, syncing with XML data
* XTM/XML/Grove2TM:: XTM XML parser
* XTM/XML/Latin1Parser:: XTM generic XML first pass parser.
* XTM/XML/PSI:: Topic Map management, published subject identifiers
* XTM/XML/UTF8:: XTM backwards compatible UTF support
* XTM/association:: trivial class definition
* XTM/baseName:: trivial class definition
* XTM/baseNameString:: trivial class definition
* XTM/generic:: XTM generic accessor
* XTM/instanceOf:: trivial class definition
* XTM/member:: trivial class definition
* XTM/mergeMap:: trivial class definition
* XTM/occurrence:: trivial class definition
* XTM/parameters:: trivial class definition
* XTM/resourceData:: trivial class definition
* XTM/resourceRef:: trivial class definition
* XTM/roleSpec:: trivial class definition
* XTM/scope:: trivial class definition
* XTM/subjectIdentity:: trivial class definition
* XTM/subjectIndicatorRef:: trivial class definition
* XTM/topic:: Topic Map management, Topic
* XTM/topicRef:: trivial class definition
* XTM/variant:: trivial class definition
* XTM/variantName:: trivial class definition


File: pm.info,  Node: Xmms-menu,  Next: Module List,  Prev: Module List,  Up: Module List

Xmms Menu
*********

   This is the documentation for modules associated with the main module
Xmms.

* Menu:

* Xmms Itself: Xmms. Interactive remote control shell for xmms
* Xmms/Config:: Perl Interface to xmms_cfg API
* Xmms/Remote:: Perl Interface to xmms_remote API
* Xmms/SongChange:: Take actions based on song track/time change


File: pm.info,  Node: YAPE-menu,  Next: Module List,  Prev: Module List,  Up: Module List

YAPE Menu
*********

   This is the documentation for modules associated with the main module
YAPE.

* Menu:

* YAPE/HTML:: Yet Another Parser/Extractor for HTML
* YAPE/HTML/Element:: sub-classes for YAPE::HTML elements
* YAPE/Regex:: Yet Another Parser/Extractor for Regular Expressions
* YAPE/Regex/Element:: sub-classes for YAPE::Regex elements
* YAPE/Regex/Explain:: explanation of a regular expression


File: pm.info,  Node: ex-menu,  Next: Module List,  Prev: Module List,  Up: Module List

ex Menu
*******

   This is the documentation for modules associated with the main module
ex.

* Menu:

* ex/constant/vars:: Perl pragma to create readonly variables
* ex/lib/zip:: Perl extension to let you use things direct from zip files.
* ex/override:: Perl pragma to override core functions


File: pm.info,  Node: perlrpcgen-menu,  Next: Module List,  Prev: Module List,  Up: Module List

perlrpcgen Menu
***************

   This is the documentation for modules associated with the main module
perlrpcgen.

* Menu:

* perlrpcgen/Fstream:: a class to encapsulate a filehandle as a stream;


File: pm.info,  Node: pod-menu,  Next: Module List,  Prev: Module List,  Up: Module List

pod Menu
********

   This is the documentation for modules associated with the main module
pod.

* Menu:

* pod/Win32:: Interfaces to some Win32 API Functions


File: pm.info,  Node: AI/Fuzzy,  Next: AI/Gene/AI/Gene/Sequence,  Prev: Module List,  Up: Module List

Perl extension for Fuzzy Logic
******************************

NAME
====

   AI::Fuzzy - Perl extension for Fuzzy Logic

SYNOPSIS
========

     use AI::Fuzzy;

     my $f = new AI::Fuzzy::Label;

     $f->addlabel("baby",        -1,   1, 2.5);
     $f->addlabel("toddler",      1, 1.5, 3.5);
     $f->addlabel("little kid",   2,   7,  12);
     $f->addlabel("kid",          6,  10,  14);
     $f->addlabel("teenager",    12,  16,  20);
     $f->addlabel("young adult", 18,  27,  35);
     $f->addlabel("adult",       25,  50,  75);
     $f->addlabel("senior",      60,  80, 110);
     $f->addlabel("relic",      100, 150, 200);

     for (my $x = 0; $x<50; $x+=4) {
         print "$x years old => " . $f->label($x) . "\n";
     }

   __END__

DESCRIPTION
===========

   AI::Fuzzy really consists of two modules - AI::Fuzzy::Label and
AI::Fuzzy::Set.

   A fuzzy set is simply a mathematical set to which members can
*partially* belong. For example, a particular shade of gray may partially
belong to the set of dark colors, whereas black would have full
membership, and lemon yellow would have almost no membership.

   A fuzzy labeler classifies a particular crisp value by examining the
degree to which it belongs to several sets, and selecting the most
appropriate. For example, it can decide whether to call water at 60
degrees Farenheight "cold", "cool", or "warm". A fuzzy label might be one
of these labels, or a fuzzy set describing to what degree each of the
labels describes the particular value in question.

Fuzzy Sets
----------

   AI::Fuzzy:Set has these methods:

     $fs = B<new> AI::Fuzzy::Set;

     # here, "Bob" is unquestionably tall.. the others less so.
     $fs_tall_people = B<new> AI::Fuzzy::Set( Lester=>34, Bob=>100, Max=>86 );
     
     # $x will be 86
     $x = B<membership> $fs_tall_people, "Max";

     # get list of members, sorted from least membership to greatest:
     @shortest_first = B<members> $fs_tall_people;

Fuzzy Labels
------------

   A Fuzzy::Label label has four attributes: the text of the label (it can
be any scalar, really), and three numbers: low, mid, high if you imagine a
cartesian plane (remember graph paper in algebra?)  of all possible
values, the label applies to a particular range.  the graph might look
something like this:

     |Y               * (mid, 1)
     	  |               /  \
     	  |             /    \
     	  |           /       \
     	  |         /          \
     	 -|-------*-------------*------- X
     	           (low,0)      (high,0)

   the Y value is applicability of the label for a given X value

   the mid number is the "pure" value. eg, orange is at 0 or 360 degrees
on the color wheel. the label applies 100% at the mid point.

   the low and high numbers are the two points at which the label ceases
to apply.

   note that labels can overlap, and that the mid number isn't always in
the exact center, so the slope of the two sides may vary...

   $fl = new AI::FuzzyLabel;

   $fl->addlabel( "hot", 77, 80, 100 );     # what I consider hot. :) (in
Farenheit, of course!)

   $a = $fl->applicability($label, $value);     # $a is now the degree to
which $label applies to $value

   $l = $fl->label ($value);     # applies a label to $value

   @l = $fl->label($value);     # returns a list of labels and their
applicability values

   @l = new AI::Fuzzy::Set( $fl->label($value) );     # same thing, but
now it's an object

   @range = $fl->range();     # returns a list of labels, sorted by their
midpoints     # eg: ("cold", "cool", "lukewarm", "warm", "hot")

AUTHOR
======

   Michal Wallace  (sabren@manifestation.com)

SEE ALSO
========

   Move along, nothing to "see also" here...


File: pm.info,  Node: AI/Gene/AI/Gene/Sequence,  Next: AI/Gene/AI/Gene/Simple,  Prev: AI/Fuzzy,  Up: Module List

AI::Gene::Sequence
******************

NAME
====

     AI::Gene::Sequence

SYNOPSIS
========

   A base class for storing and mutating genetic sequences.

     package Somegene;
     use AI::Gene::Sequence;
     our @ISA = qw(AI::Gene::Sequence);

     my %things = ( a => [qw(a1 a2 a3 a4 a5)],
     	       b => [qw(b1 b2 b3 b4 b5)],);

     sub generate_token {
      my $self = shift;
      my ($type, $prev) = @_;
      if ($type) {
        $prev = ${ $things{$type} }[rand @{ $things{$type} }];
      }
      else {
        $type = ('a','b')[rand 2];
        $prev = ${$things{$type}}[rand @{$things{$type}}];
      }
      return ($type, $prev);
     }

     sub valid_gene {
       my $self = shift;
       return 0 if $_[0] =~ /(.)\1/;
       return 1;
     }

     sub seed {
       my $self = shift;
       $self->[0] = 'ababab';
       @{$self->[1]} = qw(A1 B1 A2 B2 A3 B3);
     }

     sub render {
       my $self = shift;
       return join(' ', @{$self->[1]});
     }

     # elsewhere
     package main;

     my $gene = Somegene->new;
     $gene->seed;
     print $gene->render, "\n";
     $gene->mutate(5);
     print $gene->render, "\n";
     $gene->mutate(5);
     print $gene->render, "\n";

DESCRIPTION
===========

   This is a class which provides generic methods for the creation and
mutation of genetic sequences.  Various mutations are provided as is a way
to ensure that genes created by mutations remain useful (for instance, if
a gene gives rise to code, it can be tested for correct syntax).

   If you do not need to keep check on what sort of thing is currently
occupying a slot in the gene, you would be better off using the
AI::Gene::Simple class instead as this will be somewhat faster.  The
interface to the mutations is the same though, so if you need to change in
future, then it will not be too painful.

   This module should not be confused with the *bioperl* modules which are
used to analyse DNA sequences.

   It is intended that the methods in this code are inherited by other
modules.

Anatomy of a gene
-----------------

   A gene is a sequence of tokens, each a member of some group of simillar
tokens (they can of course all be members of a single group).  This module
encodes genes as a string representing token types, and an array
containing the tokens themselves, this allows for arbitary data to be
stored as a token in a gene.

   For instance, a regular expression could be encoded as:

     $self = ['ccartm',['a', 'b', '|', '[A-Z]', '\W', '*?'] ]

   Using a string to indicate the sort of thing held at the corresponding
part of the gene allows for a simple test of the validity of a proposed
gene by using a regular expression.

Using the module
----------------

   To use the genetic sequences, you must write your own implementations
of the following methods:

generate_token
valid_gene
   You may also want to override the following methods:

new
clone
render_gene
Mutation methods
----------------

   Mutation methods are all named `mutate_*'.  In general, the first
argument will be the number of mutations required, followed by the
positions in the genes which should be affected, followed by the lengths
of sequences within the gene which should be affected.  If positions are
not defined, then random ones are chosen.  If lengths are not defined, a
length of 1 is assumed (ie. working on single tokens only), if a length of
0 is requested, then a random length is chosen.

   Also, if a mutation is suggested but would result in an invalid
sequence, then the mutation will not be carried out.  If a mutation is
attempted which could corrupt your gene (copying from a region beyond the
end of the gene for instance) then it will be silently skipped.  Mutation
methods all return the number of mutations carried out (not the number of
tokens affected).

   These methods all expect to be passed positive integers, undef or zero,
other values could (and likely will) do something unpredictable.

`mutate([num, ref to hash of probs & methods])'
     This will call at random one of the other mutation methods.  It will
     repeat itself num times.  If passed a reference to a hash as its
     second argument, it will use that to decide which mutation to attempt.

     This hash should contain keys which fit $1 in `mutate_(.*)' and
     values indicating the weight to be given to that method.  The module
     will normalise this nicely, so you do not have to.  This lets you
     define your own mutation methods in addition to overriding any you do
     not like in the module.

`mutate_insert([num, pos])'
     Inserts a single token into the string at position pos.  The token
     will be randomly generated by the calling object's generate_token
     method.

`mutate_overwrite([num, pos1, pos2, len])'
     Copies a section of the gene (starting at *pos1*, length len) and
     writes it back into the gene, overwriting current elements, starting
     at *pos2*.

`mutate_reverse([num, pos, len])'
     Takes a sequence within the gene and reverses the ordering of the
     elements within that sequence.  Starts at position pos for length len.

`mutate_shuffle([num, pos1, pos2, len])'
     This takes a sequence (starting at *pos1* length len)  from within a
     gene and moves it to another position (starting at *pos2*).  Odd
     things might occur if the position to move the sequence into lies
     within the section to be moved, but the module will try its hardest
     to cause a mutation.

`mutate_duplicate([num, pos1, pos2, length])'
     This copies a portion of the gene starting at *pos1* of length length
     and then splices it into the gene before *pos2*.

`mutate_remove([num, pos, length]))'
     Deletes length tokens from the gene, starting at pos. Repeats num
     times.

`mutate_minor([num, pos])'
     This will mutate a single token at position pos in the gene into one
     of the same type (as decided by the object's generate_token method).

`mutate_major([num, pos])'
     This changes a single token into a token of any token type.  Token at
     postition pos.  The token is produced by the object's generate_token
     method.

`mutate_switch([num, pos1, pos2, len1, len2])'
     This takes two sequences within the gene and swaps them into each
     other's position.  The first starts at *pos1* with length *len1* and
     the second at *pos2* with length *len2*.  If the two sequences
     overlap, then no mutation will be attempted.

   The following methods are also provided, but you will probably want to
overide them for your own genetic sequences.

`generate_token([token type, current token])'
     This is used by the mutation methods when changing tokens or creating
     new ones.  It is expected to return a list consisting of a single
     character to indicate the token type being produced and the token
     itself.  Where it makes sense to do so the token which is about to be
     modifed is passed along with the token type.  If the calling methods
     require a token of any type, then no arguments will be passed to this
     method.

     The provided version of this method returns a random character from
     'a'..'z' as both the token type and token.

`valid_gene(string [, posn])'
     This is used to determine if a proposed mutation is allowed.  This
     method is passed a string of the whole gene's token types, it will
     also be passed a position in the gene where this makes sense (for
     instance, if only one token is to change).  It is expected to return
     a true value if a change is acceptable and a false one if it is not.

     The provided version of this method always returns true.

clone()
     This returns a copy of the gene as a new object.  If you are using
     nested genes, or other references as your tokens, then you may need
     to produce your own version which will deep copy your structure.

new
     This returns an empty gene, into which you can put things.  If you
     want to initialise your gene, or anything useful like that, then you
     will need another one of these.

render_gene
     This is useful for debugging, returns a serialised summary of the
     gene.

AUTHOR
======

   This module was written by Alex Gough (`alex@rcon.org').

SEE ALSO
========

   For an illustration of the use of this module, see Regexgene.pm,
Musicgene.pm, spamscan.pl and music.pl from the gziped distribution.

COPYRIGHT
=========

   Copyright (c) 2000 Alex Gough <`alex@rcon.org'>. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

BUGS
====

   This is very slow if you do not need to check that your mutations
create valid genes, but fast if you do, thems the breaks.  There is a
AI::Gene::Simple class instead if this bothers you.

   Some methods will do odd things if you pass them weird values, so try
not to do that.  So long as you stick to passing positive integers or
undef to the methods then they should recover gracefully.

   While it is easy and fun to write genetic and evolutionary algorithms
in perl, for most purposes, it will be much slower than if they were
implemented in another more suitable language.  There are some problems
which do lend themselves to an approach in perl and these are the ones
where the time between mutations will be large, for instance, when
composing music where the selection process is driven by human whims.


File: pm.info,  Node: AI/Gene/AI/Gene/Simple,  Next: AI/Perceptron,  Prev: AI/Gene/AI/Gene/Sequence,  Up: Module List

AI::Gene::Simple
****************

NAME
====

     AI::Gene::Simple

SYNOPSIS
========

   A base class for storing and mutating genetic sequences.

     package Somegene;
     use AI::Gene::Simple;
     our @ISA = qw (AI::Gene::Simple);

     sub generate_token {
       my $self = shift;
       my $prev = $_[0] ? $_[0] + (1-rand(1)) : rand(1)*10;
       return $prev;
     }

     sub calculate {
       my $self = shift;
       my $x = $_[0];
       my $rt=0;
       for (0..(scalar(@{$self->[0]}) -1)) {
         $rt += $self->[0][$_] * ($x ** $_);
       }
       return $rt;
     }

     sub seed {
       my $self = shift;
       $self->[0][$_] = rand(1) * 10 for (0..$_[0]);
       return $self;
     }

     # ... then elsewhere

     package main;

     my $gene = Somegene->new;
     $gene->seed(5);
     print $gene->calculate(2), "\n";
     $gene->mutate_minor;
     print $gene->calculate(2), "\n";
     $gene->mutate_major;
     print $gene->calculate(2), "\n";

DESCRIPTION
===========

   This is a class which provides generic methods for the creation and
mutation of genetic sequences.  Various mutations are provided but the
resulting mutations are not checked for a correct syntax.  These classes
are suitable for genes where it is only necessary to know what lies at a
given position in a gene.  If you need to ensure a gene maintains a
sensible grammar, then you should use the AI::Gene::Sequence class
instead, the interfaces are the same though so you will only need to
modify your overiding classes if you need to switch from one to the other.

   A suitable use for this module might be a series of coefficients in a
polynomial expansion or notes to be played in a musical score.

   This module should not be confused with the *bioperl* modules which are
used to analyse DNA sequences.

   It is intended that the methods in this code are inherited by other
modules.

Anatomy of a gene
-----------------

   A gene is a linear sequence of tokens which tell some unknown system
how to behave.  These methods all expect that a gene is of the form:

     [ [ 'token0', 'token1', ...  ], .. other elements ignored ]

Using the module
----------------

   To use the genetic sequences, you must write your own implementations
of the following methods along with some way of turning your encoded
sequence into something useful.

generate_token
   You may also want to override the following methods:

new
clone
render_gene
   The calling conventions for these methods are outlined below.

Mutation methods
----------------

   Mutation methods are all named `mutate_*'.  In general, the first
argument will be the number of mutations required, followed by the
positions in the genes which should be affected, followed by the lengths
of sequences within the gene which should be affected.  If positions are
not defined, then random ones are chosen.  If lengths are not defined, a
length of 1 is assumed (ie. working on single tokens only), if a length of
0 is requested, then a random length is chosen.

   If a mutation is attempted which could corrupt your gene (copying from
a region beyond the end of the gene for instance) then it will be silently
skipped.  Mutation methods all return the number of mutations carried out
(not the number of tokens affected).

`mutate([num, ref to hash of probs & methods])'
     This will call at random one of the other mutation methods.  It will
     repeat itself num times.  If passed a reference to a hash as its
     second argument, it will use that to decide which mutation to attempt.

     This hash should contain keys which fit $1 in `mutate_(.*)' and
     values indicating the weight to be given to that method.  The module
     will normalise this nicely, so you do not have to.  This lets you
     define your own mutation methods in addition to overriding any you do
     not like in the module.

`mutate_insert([num, pos])'
     Inserts a single token into the string at position pos.  The token
     will be randomly generated by the calling object's generate_token
     method.

`mutate_overwrite([num, pos1, pos2, len])'
     Copies a section of the gene (starting at *pos1*, length len) and
     writes it back into the gene, overwriting current elements, starting
     at *pos2*.

`mutate_reverse([num, pos, len])'
     Takes a sequence within the gene and reverses the ordering of the
     elements within that sequence.  Starts at position pos for length len.

`mutate_shuffle([num, pos1, pos2, len])'
     This takes a sequence (starting at *pos1* length len)  from within a
     gene and moves it to another position (starting at *pos2*).  Odd
     things might occur if the position to move the sequence into lies
     within the section to be moved, but the module will try its hardest
     to cause a mutation.

`mutate_duplicate([num, pos1, pos2, length])'
     This copies a portion of the gene starting at *pos1* of length length
     and then splices it into the gene before *pos2*.

`mutate_remove([num, pos, length]))'
     Deletes length tokens from the gene, starting at pos. Repeats num
     times.

`mutate_minor([num, pos])'
     This will mutate a single token at position pos in the gene into one
     of the same type (as decided by the object's generate_token method).

`mutate_major([num, pos])'
     This changes a single token into a token of any token type.  Token at
     postition pos.  The token is produced by the object's generate_token
     method.

`mutate_switch([num, pos1, pos2, len1, len2])'
     This takes two sequences within the gene and swaps them into each
     other's position.  The first starts at *pos1* with length *len1* and
     the second at *pos2* with length *len2*.  If the two sequences
     overlap, then no mutation will be attempted.

   The following methods are also provided, but you will probably want to
overide them for your own genetic sequences.

`generate_token([current token])'
     This is used by the mutation methods when changing tokens or creating
     new ones.  It is expected to return a single token.  If a minor
     mutation is being attempted, then the method will also be passed the
     current token.

     The provided version of this method returns a random character from
     'a'..'z' as both the token type and token.

clone()
     This returns a copy of the gene as a new object.  If you are using
     nested genes, or other references as your tokens, then you may need
     to produce your own version which will deep copy your structure.

new
     This returns an empty gene, into which you can put things.  If you
     want to initialise your gene, or anything useful like that, then you
     will need another one of these.

render_gene
     This is useful for debugging, returns a serialised summary of the
     gene.

AUTHOR
======

   This module was written by Alex Gough (`alex@rcon.org').

SEE ALSO
========

   If you are encoding something which must maintain a correct syntax
(executable code, regular expressions, formal poems) then you might be
better off using AI::Gene::Sequence .

COPYRIGHT
=========

   Copyright (c) 2000 Alex Gough <`alex@rcon.org'>. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

BUGS
====

   Some methods will do odd things if you pass them weird values, so try
not to do that.  So long as you stick to passing positive integers or
undef to the methods then they should recover gracefully.

   While it is easy and fun to write genetic and evolutionary algorithms
in perl, for most purposes, it will be much slower than if they were
implemented in another more suitable language.  There are some problems
which do lend themselves to an approach in perl and these are the ones
where the time between mutations will be large, for instance, when
composing music where the selection process is driven by human whims.


