Commit 91c9544a authored by Davis King's avatar Davis King

set the subversion eol-style to native for these files

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402354
parent 8fa33842
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Change Log</title>
<body from_file="svnlog.txt">
<br/>
<center><a href="old_change_log.html">Old Change Logs</a></center>
<br/>
</body>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Change Log</title>
<body from_file="svnlog.txt">
<br/>
<center><a href="old_change_log.html">Old Change Logs</a></center>
<br/>
</body>
</doc>
The Table of Contents.hhc file is auto generated by the toc.xml and htmlhelp_stylesheet.xsl files.
You really can edit it if you want but I suggest you use the stylesheet to auto generate it instead.
If you want to regenerate the table of contents file you can do so with
The Table of Contents.hhc file is auto generated by the toc.xml and htmlhelp_stylesheet.xsl files.
You really can edit it if you want but I suggest you use the stylesheet to auto generate it instead.
If you want to regenerate the table of contents file you can do so with
the command "msxsl toc.xml htmlhelp_stylesheet.xsl" if you are using msxsl.exe.
\ No newline at end of file
<TITLE>dlib C++ library</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function redirect () { window.location.href = "docs/index.html"; }
//--></SCRIPT>
</HEAD>
<BODY onLoad="redirect()">
<p>
<a href="docs/index.html">click here to go to the documentation</a>
</p>
</BODY>
<TITLE>dlib C++ library</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function redirect () { window.location.href = "docs/index.html"; }
//--></SCRIPT>
</HEAD>
<BODY onLoad="redirect()">
<p>
<a href="docs/index.html">click here to go to the documentation</a>
</p>
</BODY>
</HTML>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes' />
<xsl:variable name="main_menu" select="/htmlhelp_toc/main_menu_file"/>
<xsl:variable name="docs" select="/htmlhelp_toc/docs_folder"/>
<xsl:variable name="show_include_file" select="/htmlhelp_toc/show_include_file"/>
<!-- ************************************************************************* -->
<xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz </xsl:variable>
<xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ </xsl:variable>
<!-- ************************************************************************* -->
<xsl:template match="/htmlhelp_toc">
<HTML>
<HEAD>
</HEAD><BODY>
<UL>
<xsl:apply-templates select="document($main_menu)/doc/menu"/>
</UL>
</BODY></HTML>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="section">
<xsl:param name="html_file" />
<xsl:param name="xml_file" />
<xsl:choose>
<xsl:when test="count(/doc/menu/top/section) != 1">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="{name}"/>
</OBJECT>
</LI>
<UL>
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</UL>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="menu">
<xsl:param name="html_file" />
<xsl:param name="xml_file" />
<xsl:for-each select="top/section">
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="item">
<xsl:param name="html_file" />
<xsl:param name="xml_file" />
<xsl:choose>
<xsl:when test="name != ''">
<LI><OBJECT type="text/sitemap">
<param name="Name" value="{name}"/>
<xsl:choose>
<xsl:when test="link">
<param name="Local" value="{$docs}\{link}"/>
</xsl:when>
<xsl:when test="@nolink = 'true'">
</xsl:when>
<xsl:otherwise>
<param name="Local" value="{$docs}\{$html_file}#{name}"/>
</xsl:otherwise>
</xsl:choose>
</OBJECT>
</LI>
<xsl:choose>
<xsl:when test="sub">
<UL>
<xsl:for-each select="sub/item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</UL>
</xsl:when>
<xsl:when test="chm_sub">
<UL>
<xsl:apply-templates select="document(chm_sub)/doc/menu">
<xsl:with-param name="xml_file" select="chm_sub"/>
<xsl:with-param name="html_file" select="link"/>
</xsl:apply-templates>
</UL>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="@nolink = 'true'">
</xsl:when>
<xsl:otherwise>
<LI><OBJECT type="text/sitemap">
<param name="Name" value="{.}"/>
<param name="Local" value="{$docs}\{$html_file}#{.}"/>
</OBJECT>
</LI>
<xsl:variable name="cname" select="."/>
<xsl:for-each select="document($xml_file)/doc/components/component">
<xsl:if test="name = $cname">
<UL>
<xsl:if test="spec_file">
<xsl:choose>
<xsl:when test="spec_file/@link = 'true'">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="specification"/>
<param name="Local" value="{$docs}\{spec_file}.html#{name}"/>
</OBJECT>
</LI>
</xsl:when>
<xsl:otherwise>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="specification"/>
<param name="Local" value="{$docs}\{spec_file}.html"/>
</OBJECT>
</LI>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="$show_include_file = 'true'">
<xsl:if test="file">
<xsl:choose>
<xsl:when test="spec_file/@link = 'true' ">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="include file"/>
<param name="Local" value="{$docs}\{file}.html"/>
</OBJECT>
</LI>
</xsl:when>
<xsl:when test="spec_file != file">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="include file"/>
<param name="Local" value="{$docs}\{file}.html"/>
</OBJECT>
</LI>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:if>
<xsl:if test="body_file">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="body"/>
<param name="Local" value="{$docs}\{body_file}.html#{name}"/>
</OBJECT>
</LI>
</xsl:if>
<xsl:if test="extensions">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="extensions"/>
</OBJECT>
</LI>
<UL>
<xsl:for-each select="extensions/extension">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="{name}"/>
<param name="Local" value="{$docs}\{spec_file}.html"/>
</OBJECT>
</LI>
</xsl:for-each>
</UL>
</xsl:if>
</UL>
</xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="sub">
<ul>
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</ul>
</xsl:template>
<!-- ************************************************************************* -->
</xsl:stylesheet>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes' />
<xsl:variable name="main_menu" select="/htmlhelp_toc/main_menu_file"/>
<xsl:variable name="docs" select="/htmlhelp_toc/docs_folder"/>
<xsl:variable name="show_include_file" select="/htmlhelp_toc/show_include_file"/>
<!-- ************************************************************************* -->
<xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz </xsl:variable>
<xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ </xsl:variable>
<!-- ************************************************************************* -->
<xsl:template match="/htmlhelp_toc">
<HTML>
<HEAD>
</HEAD><BODY>
<UL>
<xsl:apply-templates select="document($main_menu)/doc/menu"/>
</UL>
</BODY></HTML>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="section">
<xsl:param name="html_file" />
<xsl:param name="xml_file" />
<xsl:choose>
<xsl:when test="count(/doc/menu/top/section) != 1">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="{name}"/>
</OBJECT>
</LI>
<UL>
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</UL>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="menu">
<xsl:param name="html_file" />
<xsl:param name="xml_file" />
<xsl:for-each select="top/section">
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="item">
<xsl:param name="html_file" />
<xsl:param name="xml_file" />
<xsl:choose>
<xsl:when test="name != ''">
<LI><OBJECT type="text/sitemap">
<param name="Name" value="{name}"/>
<xsl:choose>
<xsl:when test="link">
<param name="Local" value="{$docs}\{link}"/>
</xsl:when>
<xsl:when test="@nolink = 'true'">
</xsl:when>
<xsl:otherwise>
<param name="Local" value="{$docs}\{$html_file}#{name}"/>
</xsl:otherwise>
</xsl:choose>
</OBJECT>
</LI>
<xsl:choose>
<xsl:when test="sub">
<UL>
<xsl:for-each select="sub/item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="xml_file" select="$xml_file"/>
<xsl:with-param name="html_file" select="$html_file"/>
</xsl:apply-templates>
</xsl:for-each>
</UL>
</xsl:when>
<xsl:when test="chm_sub">
<UL>
<xsl:apply-templates select="document(chm_sub)/doc/menu">
<xsl:with-param name="xml_file" select="chm_sub"/>
<xsl:with-param name="html_file" select="link"/>
</xsl:apply-templates>
</UL>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="@nolink = 'true'">
</xsl:when>
<xsl:otherwise>
<LI><OBJECT type="text/sitemap">
<param name="Name" value="{.}"/>
<param name="Local" value="{$docs}\{$html_file}#{.}"/>
</OBJECT>
</LI>
<xsl:variable name="cname" select="."/>
<xsl:for-each select="document($xml_file)/doc/components/component">
<xsl:if test="name = $cname">
<UL>
<xsl:if test="spec_file">
<xsl:choose>
<xsl:when test="spec_file/@link = 'true'">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="specification"/>
<param name="Local" value="{$docs}\{spec_file}.html#{name}"/>
</OBJECT>
</LI>
</xsl:when>
<xsl:otherwise>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="specification"/>
<param name="Local" value="{$docs}\{spec_file}.html"/>
</OBJECT>
</LI>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="$show_include_file = 'true'">
<xsl:if test="file">
<xsl:choose>
<xsl:when test="spec_file/@link = 'true' ">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="include file"/>
<param name="Local" value="{$docs}\{file}.html"/>
</OBJECT>
</LI>
</xsl:when>
<xsl:when test="spec_file != file">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="include file"/>
<param name="Local" value="{$docs}\{file}.html"/>
</OBJECT>
</LI>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:if>
<xsl:if test="body_file">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="body"/>
<param name="Local" value="{$docs}\{body_file}.html#{name}"/>
</OBJECT>
</LI>
</xsl:if>
<xsl:if test="extensions">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="extensions"/>
</OBJECT>
</LI>
<UL>
<xsl:for-each select="extensions/extension">
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="{name}"/>
<param name="Local" value="{$docs}\{spec_file}.html"/>
</OBJECT>
</LI>
</xsl:for-each>
</UL>
</xsl:if>
</UL>
</xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="sub">
<ul>
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</ul>
</xsl:template>
<!-- ************************************************************************* -->
</xsl:stylesheet>
[OPTIONS]
Binary TOC=Yes
Compatibility=1.1 or later
Compiled file=help.chm
Contents file=Table of Contents.hhc
Default topic=docs/index.html
Display compile progress=Yes
Full-text search=Yes
Language=0x409 English (United States)
Title=dLib
[FILES]
docs/api.html
docs/dlib/test/makefile
docs/right.gif
docs/down.gif
docs/plus.gif
docs/minus.gif
docs/change_log.html
docs/compile.html
docs/compress_stream_ex.cpp.html
docs/compression.html
docs/containers.html
docs/dir_nav_ex.cpp.html
docs/gui_api_ex.cpp.html
docs/index.html
docs/intro.html
docs/kernel_1a.html
docs/kernel_1b.html
docs/kernel_1c.html
docs/kernel_1da.html
docs/kernel_1db.html
docs/kernel_1ea.html
docs/kernel_1eb.html
docs/kernel_1ec.html
docs/kernel_2a.html
docs/kernel_3a.html
docs/kernel_3b.html
docs/license.html
docs/network.html
docs/other.html
docs/metaprogramming.html
docs/imaging.html
docs/parsing.html
docs/queue_ex.cpp.html
docs/release_notes.html
docs/old_release_notes.html
docs/sockets_ex.cpp.html
[INFOTYPES]
[OPTIONS]
Binary TOC=Yes
Compatibility=1.1 or later
Compiled file=help.chm
Contents file=Table of Contents.hhc
Default topic=docs/index.html
Display compile progress=Yes
Full-text search=Yes
Language=0x409 English (United States)
Title=dLib
[FILES]
docs/api.html
docs/dlib/test/makefile
docs/right.gif
docs/down.gif
docs/plus.gif
docs/minus.gif
docs/change_log.html
docs/compile.html
docs/compress_stream_ex.cpp.html
docs/compression.html
docs/containers.html
docs/dir_nav_ex.cpp.html
docs/gui_api_ex.cpp.html
docs/index.html
docs/intro.html
docs/kernel_1a.html
docs/kernel_1b.html
docs/kernel_1c.html
docs/kernel_1da.html
docs/kernel_1db.html
docs/kernel_1ea.html
docs/kernel_1eb.html
docs/kernel_1ec.html
docs/kernel_2a.html
docs/kernel_3a.html
docs/kernel_3b.html
docs/license.html
docs/network.html
docs/other.html
docs/metaprogramming.html
docs/imaging.html
docs/parsing.html
docs/queue_ex.cpp.html
docs/release_notes.html
docs/old_release_notes.html
docs/sockets_ex.cpp.html
[INFOTYPES]
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="htmlhelp_stylesheet.xsl"?>
<htmlhelp_toc>
<docs_folder>docs</docs_folder>
<main_menu_file>../main_menu.xml</main_menu_file>
<show_include_file>false</show_include_file>
</htmlhelp_toc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="htmlhelp_stylesheet.xsl"?>
<htmlhelp_toc>
<docs_folder>docs</docs_folder>
<main_menu_file>../main_menu.xml</main_menu_file>
<show_include_file>false</show_include_file>
</htmlhelp_toc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>How to compile</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
To use this library all you have to do is extract the library somewhere, make sure the folder <i>containing</i>
the dlib folder is in your include path, and finally add <a href="dlib/all/source.cpp.html">dlib/all/source.cpp</a>
to your project.
</p>
<p>
An example makefile that uses this library can be found here:
<a href="dlib/test/makefile">dlib/test/makefile</a>. It is the makefile used to build the regression
test suite for this library. There is also a
<web> <a href="http://www.cmake.org">CMake</a> </web> <chm>CMake</chm> makefile that builds the
regression test suite at <a href="dlib/test/CMakeLists.txt.html">dlib/test/CMakeLists.txt</a> and another
CMake makefile that builds all the example programs at
<a href="examples/CMakeLists.txt.html">examples/CMakeLists.txt</a>
</p>
<p>
I try to make sure everything compiles fine under Visual Studio .NET 2003 (and above) and gcc. The compilers that will give you trouble are listed at the bottom of the page.
</p>
<p>
Again, note that you should <b><i>not</i></b> add the dlib folder itself to your compiler's include path.
Doing so will cause the
build to fail because of name collisions (such as dlib/string.h and string.h from the standard library).
Instead you should add the folder that contains the dlib folder to your include search path and then use
include statements of the form <tt>#include &lt;dlib/queue.h&gt;</tt>. This will ensure that everything
builds correctly.
</p>
<center><h1>Preprocessor Directives</h1></center>
<p>
There are a few preprocessor directives that you can supply during the build process to cause the
library to build in various optional ways. The most people will probably not want
to mess with these at all and just use the library in its default build. But they are listed
here in the event that you need to use them.
</p>
<anchor>DLIB_THREAD_POOL_TIMEOUT</anchor>
<h3>#define DLIB_ISO_CPP_ONLY</h3>
<p>
This is a #define directive that you can set to cause the library to exclude all non ISO C++ code (The things in the <a href="api.html">API wrappers</a> section and any objects that depend on those wrappers).
This is useful if you are trying to build on a system that isn't fully supported by the library or if you
just decide you don't want any of that stuff compiled into your program for your own reasons.
</p>
<anchor>DLIB_NO_GUI_SUPPORT</anchor>
<h3>#define DLIB_NO_GUI_SUPPORT</h3>
<p>
This is just like the DLIB_ISO_CPP_ONLY option except that it excludes only the GUI part of the library.
An example of when you might want to use this would be if you don't need GUI support and you are building
on a UNIX platform that doesn't have the X11 headers installed.
</p>
<anchor>NO_MAKEFILE</anchor>
<h3>#define NO_MAKEFILE</h3>
<p>
This preprocessor directive causes the dlib headers to pull in all the
code that would normally be built in dlib/all/source.cpp. Thus if you #define NO_MAKEFILE you won't
have to add dlib/all/source.cpp to your project. The <i>only</i> time this is useful is when your
project consists of a single translation unit (i.e. a single cpp file). In this instance NO_MAKEFILE
allows you to easily build your project on the command line by saying something like <tt>g++ -DNO_MAKEFILE
project.cpp</tt>. But again, this is only for single cpp file projects. If you use NO_MAKEFILE with projects
that contain more than one cpp file you will get linker errors about multiply defined symbols.
</p>
<p>
Also note that if you use this macro then the <a href="metaprogramming.html#DLIB_STACK_TRACE">stack trace</a>
functionality in the library will be disabled.
</p>
<anchor>DLIB_THREAD_POOL_TIMEOUT</anchor>
<h3>#define DLIB_THREAD_POOL_TIMEOUT &lt;time-in-milliseconds&gt;</h3>
<p>
If you use the <a href="dlib/threads/threads_kernel_abstract.h#create_new_thread">create_new_thread</a> function
to create your threads then you receive the benefit of the dlib thread pool. This pool enables the create_new_thread
function to spawn new threads very rapidly since it draws threads back out of its thread pool when the pool isn't
empty.
</p>
<p>
Thus, when a thread that was created by create_new_thread ends it actually goes back into the dlib thread pool
and waits DLIB_THREAD_POOL_TIMEOUT milliseconds before totally terminating and releasing its resources back
to the operating system. The default timeout used by this library is 30,000 milliseconds (30 seconds). You
may however change this to whatever you like by defining DLIB_THREAD_POOL_TIMEOUT to some new value.
</p>
<center><h1>Compilers</h1></center>
<h2>Visual Studio .NET 2003</h2>
<p>You need to link to one of the multithreaded C run-time libraries if you are using the threading stuff. You can do
this by setting it in the project options. If you don't you will get some error about _beginthreadex not linking.
</p>
<h2>Visual C++ toolkit 2003</h2>
<p>
This is a pretty good compiler and it is free. But it can be a major pain to use.
To get it working you have to download the platform sdk along with the toolkit itself.
both of these things are available from the microsoft web page for free.
</p>
<p>
Once you have the toolkit and platform sdk installed you should be ready to go.
Go to start -> programs -> microsoft visual c++ toolkit 2003 -> Visual C++ Toolkit 2003 Command Prompt. Then switch to the directory that contains your source and the dlib folder.
</p>
<p>
The following is the command I use and yours should look similar:
<tt>cl /O2 -DNO_MAKEFILE /EHsc /MT "%1"</tt> <br/>
The %1 should be replaced with the cpp file(s) you want to compile.
</p>
<p>
You may also have to tell the compiler where the include and lib folders are in the platform sdk.
If the above command doesn't work try this one (change paths appropriately for your system):
<tt>cl /O2 -DNO_MAKEFILE /EHsc /MT /I"C:\Program Files\Microsoft Platform SDK\Include" "%1" /link /LIBPATH:"C:\Program Files\Microsoft Platform SDK\Lib\" </tt>
</p>
<h2>gcc</h2>
<p>
I generally use gcc version 4.1 but most other versions of gcc work just fine also (except 2.95, see below).
</p>
<p>
The command line I generally use is "g++ -D NO_MAKEFILE -lnsl -lpthread file.cpp" I think you need to
tell it to link nsl to make the threading stuff work right, I honestly can't remember what part of
the library requires it I have just been doing it for so long :)
</p>
<p>
If you are using the sockets stuff then on some platforms you need to supply the -lsocket option. Or if you are using the gui stuff you will need to supply the -lX11 option.
</p>
<p>
If you compile on solaris you have to give the -lsocket
option if you use the sockets API.
</p>
<h2>gcc on windows</h2>
<p>
The commands for gcc on windows are the same as above but you may also have to link (via the -l option) to the following libraries: gdi32, comctl32, user32, ws2_32, or imm32.
</p>
<center><h1>Problem Compilers</h1></center>
<p>
Below is a list of the problems I can remember with various compilers. All the problems here are
bugs in the compiler and are a pain to write workarounds for (or the workarounds are slow/unsatisfactory) so I have no plans to deal with them. Just avoid these compilers in the
given situations.
</p>
<li/> <b> Visual Studio .NET and earlier versions </b>
<ul>
These compilers don't compile standard C++ very well. Visual Studio 6
doesn't even make any pretenses about being standards compliant. Visual Studio .NET is a lot
better but has some bugs with how it implements namespace lookups so most of my code will not
compile in Visual Studio .NET. (Note that Visual Studio .NET <I>2003</I> works just fine)
</ul>
<li/> <b> gcc 2.95 </b>
<ul>
<p>
The dir_nav component will not be able to list directories that contain files bigger than 4GB because
I had to use stat() rather than stat64() when compiling under this compiler.
</p>
<p>
There are also some other problems with gcc 2.95.
I believe all the containers work and all the API wrappers
but the GUI stuff works. It is sort of touch and go though.
</p>
</ul>
</body>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>How to compile</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
To use this library all you have to do is extract the library somewhere, make sure the folder <i>containing</i>
the dlib folder is in your include path, and finally add <a href="dlib/all/source.cpp.html">dlib/all/source.cpp</a>
to your project.
</p>
<p>
An example makefile that uses this library can be found here:
<a href="dlib/test/makefile">dlib/test/makefile</a>. It is the makefile used to build the regression
test suite for this library. There is also a
<web> <a href="http://www.cmake.org">CMake</a> </web> <chm>CMake</chm> makefile that builds the
regression test suite at <a href="dlib/test/CMakeLists.txt.html">dlib/test/CMakeLists.txt</a> and another
CMake makefile that builds all the example programs at
<a href="examples/CMakeLists.txt.html">examples/CMakeLists.txt</a>
</p>
<p>
I try to make sure everything compiles fine under Visual Studio .NET 2003 (and above) and gcc. The compilers that will give you trouble are listed at the bottom of the page.
</p>
<p>
Again, note that you should <b><i>not</i></b> add the dlib folder itself to your compiler's include path.
Doing so will cause the
build to fail because of name collisions (such as dlib/string.h and string.h from the standard library).
Instead you should add the folder that contains the dlib folder to your include search path and then use
include statements of the form <tt>#include &lt;dlib/queue.h&gt;</tt>. This will ensure that everything
builds correctly.
</p>
<center><h1>Preprocessor Directives</h1></center>
<p>
There are a few preprocessor directives that you can supply during the build process to cause the
library to build in various optional ways. The most people will probably not want
to mess with these at all and just use the library in its default build. But they are listed
here in the event that you need to use them.
</p>
<anchor>DLIB_THREAD_POOL_TIMEOUT</anchor>
<h3>#define DLIB_ISO_CPP_ONLY</h3>
<p>
This is a #define directive that you can set to cause the library to exclude all non ISO C++ code (The things in the <a href="api.html">API wrappers</a> section and any objects that depend on those wrappers).
This is useful if you are trying to build on a system that isn't fully supported by the library or if you
just decide you don't want any of that stuff compiled into your program for your own reasons.
</p>
<anchor>DLIB_NO_GUI_SUPPORT</anchor>
<h3>#define DLIB_NO_GUI_SUPPORT</h3>
<p>
This is just like the DLIB_ISO_CPP_ONLY option except that it excludes only the GUI part of the library.
An example of when you might want to use this would be if you don't need GUI support and you are building
on a UNIX platform that doesn't have the X11 headers installed.
</p>
<anchor>NO_MAKEFILE</anchor>
<h3>#define NO_MAKEFILE</h3>
<p>
This preprocessor directive causes the dlib headers to pull in all the
code that would normally be built in dlib/all/source.cpp. Thus if you #define NO_MAKEFILE you won't
have to add dlib/all/source.cpp to your project. The <i>only</i> time this is useful is when your
project consists of a single translation unit (i.e. a single cpp file). In this instance NO_MAKEFILE
allows you to easily build your project on the command line by saying something like <tt>g++ -DNO_MAKEFILE
project.cpp</tt>. But again, this is only for single cpp file projects. If you use NO_MAKEFILE with projects
that contain more than one cpp file you will get linker errors about multiply defined symbols.
</p>
<p>
Also note that if you use this macro then the <a href="metaprogramming.html#DLIB_STACK_TRACE">stack trace</a>
functionality in the library will be disabled.
</p>
<anchor>DLIB_THREAD_POOL_TIMEOUT</anchor>
<h3>#define DLIB_THREAD_POOL_TIMEOUT &lt;time-in-milliseconds&gt;</h3>
<p>
If you use the <a href="dlib/threads/threads_kernel_abstract.h#create_new_thread">create_new_thread</a> function
to create your threads then you receive the benefit of the dlib thread pool. This pool enables the create_new_thread
function to spawn new threads very rapidly since it draws threads back out of its thread pool when the pool isn't
empty.
</p>
<p>
Thus, when a thread that was created by create_new_thread ends it actually goes back into the dlib thread pool
and waits DLIB_THREAD_POOL_TIMEOUT milliseconds before totally terminating and releasing its resources back
to the operating system. The default timeout used by this library is 30,000 milliseconds (30 seconds). You
may however change this to whatever you like by defining DLIB_THREAD_POOL_TIMEOUT to some new value.
</p>
<center><h1>Compilers</h1></center>
<h2>Visual Studio .NET 2003</h2>
<p>You need to link to one of the multithreaded C run-time libraries if you are using the threading stuff. You can do
this by setting it in the project options. If you don't you will get some error about _beginthreadex not linking.
</p>
<h2>Visual C++ toolkit 2003</h2>
<p>
This is a pretty good compiler and it is free. But it can be a major pain to use.
To get it working you have to download the platform sdk along with the toolkit itself.
both of these things are available from the microsoft web page for free.
</p>
<p>
Once you have the toolkit and platform sdk installed you should be ready to go.
Go to start -> programs -> microsoft visual c++ toolkit 2003 -> Visual C++ Toolkit 2003 Command Prompt. Then switch to the directory that contains your source and the dlib folder.
</p>
<p>
The following is the command I use and yours should look similar:
<tt>cl /O2 -DNO_MAKEFILE /EHsc /MT "%1"</tt> <br/>
The %1 should be replaced with the cpp file(s) you want to compile.
</p>
<p>
You may also have to tell the compiler where the include and lib folders are in the platform sdk.
If the above command doesn't work try this one (change paths appropriately for your system):
<tt>cl /O2 -DNO_MAKEFILE /EHsc /MT /I"C:\Program Files\Microsoft Platform SDK\Include" "%1" /link /LIBPATH:"C:\Program Files\Microsoft Platform SDK\Lib\" </tt>
</p>
<h2>gcc</h2>
<p>
I generally use gcc version 4.1 but most other versions of gcc work just fine also (except 2.95, see below).
</p>
<p>
The command line I generally use is "g++ -D NO_MAKEFILE -lnsl -lpthread file.cpp" I think you need to
tell it to link nsl to make the threading stuff work right, I honestly can't remember what part of
the library requires it I have just been doing it for so long :)
</p>
<p>
If you are using the sockets stuff then on some platforms you need to supply the -lsocket option. Or if you are using the gui stuff you will need to supply the -lX11 option.
</p>
<p>
If you compile on solaris you have to give the -lsocket
option if you use the sockets API.
</p>
<h2>gcc on windows</h2>
<p>
The commands for gcc on windows are the same as above but you may also have to link (via the -l option) to the following libraries: gdi32, comctl32, user32, ws2_32, or imm32.
</p>
<center><h1>Problem Compilers</h1></center>
<p>
Below is a list of the problems I can remember with various compilers. All the problems here are
bugs in the compiler and are a pain to write workarounds for (or the workarounds are slow/unsatisfactory) so I have no plans to deal with them. Just avoid these compilers in the
given situations.
</p>
<li/> <b> Visual Studio .NET and earlier versions </b>
<ul>
These compilers don't compile standard C++ very well. Visual Studio 6
doesn't even make any pretenses about being standards compliant. Visual Studio .NET is a lot
better but has some bugs with how it implements namespace lookups so most of my code will not
compile in Visual Studio .NET. (Note that Visual Studio .NET <I>2003</I> works just fine)
</ul>
<li/> <b> gcc 2.95 </b>
<ul>
<p>
The dir_nav component will not be able to list directories that contain files bigger than 4GB because
I had to use stat() rather than stat64() when compiling under this compiler.
</p>
<p>
There are also some other problems with gcc 2.95.
I believe all the containers work and all the API wrappers
but the GUI stuff works. It is sort of touch and go though.
</p>
</ul>
</body>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Data Compression</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
This page contains a bunch of objects that implement various parts of compression algorithms.
They can be put together in different ways to construct many different algorithms.
Note that the <a href="#compress_stream">compress_stream</a> object contains complete compression algorithms. So if you
just want to compress some data then you can easily use that object and not bother with the others.
</p>
<p>
In the column to the right you can see benchmark data for each of the compress_stream
typedefs. The times measured are the time it takes to compress and then
decompress each file. It was run on a 3.0ghz P4. For reference see the Canterbury corpus
<a href="http://corpus.canterbury.ac.nz/">web site</a>.
</p>
</body>
<!-- ************************************************************************* -->
<menu width="200">
<top>
<section>
<name>Objects</name>
<item>compress_stream</item>
<item>conditioning_class</item>
<item>entropy_decoder</item>
<item>entropy_encoder</item>
<item>entropy_decoder_model</item>
<item>entropy_encoder_model</item>
<item>lz77_buffer</item>
<item>lzp_buffer</item>
</section>
<section>
<name>Benchmarks</name>
<item>
<name>kernel_1a</name>
<link>kernel_1a.html</link>
</item>
<item>
<name>kernel_1b</name>
<link>kernel_1b.html</link>
</item>
<item>
<name>kernel_1c</name>
<link>kernel_1c.html</link>
</item>
<item>
<name>kernel_1da</name>
<link>kernel_1da.html</link>
</item>
<item>
<name>kernel_1db</name>
<link>kernel_1db.html</link>
</item>
<item>
<name>kernel_1ea</name>
<link>kernel_1ea.html</link>
</item>
<item>
<name>kernel_1eb</name>
<link>kernel_1eb.html</link>
</item>
<item>
<name>kernel_1ec</name>
<link>kernel_1ec.html</link>
</item>
<item>
<name>kernel_2a</name>
<link>kernel_2a.html</link>
</item>
<item>
<name>kernel_3a</name>
<link>kernel_3a.html</link>
</item>
<item>
<name>kernel_3b</name>
<link>kernel_3b.html</link>
</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component>
<name>compress_stream</name>
<file>dlib/compress_stream.h</file>
<spec_file>dlib/compress_stream/compress_stream_kernel_abstract.h</spec_file>
<description>
This object is pretty straight forward. It has no state and just
contains the functions compress and decompress.
They do just what their names imply to iostream objects.
</description>
<examples>
<example>compress_stream_ex.cpp.html</example>
<example>file_to_code_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>compress_stream_kernel_1</name>
<file>dlib/compress_stream/compress_stream_kernel_1.h</file>
<description>
This implementation is done using the <a href="#entropy_encoder_model">entropy_encoder_model</a> and
<a href="#entropy_decoder_model">entropy_decoder_model</a> objects.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_1b and entropy_decoder_model_kernel_1b</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_2b and entropy_decoder_model_kernel_2b </description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_3b and entropy_decoder_model_kernel_3b </description>
</typedef>
<typedef>
<name>kernel_1da</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_4a and entropy_decoder_model_kernel_4a </description>
</typedef>
<typedef>
<name>kernel_1db</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_4b and entropy_decoder_model_kernel_4b </description>
</typedef>
<typedef>
<name>kernel_1ea</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_5a and entropy_decoder_model_kernel_5a </description>
</typedef>
<typedef>
<name>kernel_1eb</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_5b and entropy_decoder_model_kernel_5b </description>
</typedef>
<typedef>
<name>kernel_1ec</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_5c and entropy_decoder_model_kernel_5c </description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>compress_stream_kernel_2</name>
<file>dlib/compress_stream/compress_stream_kernel_2.h</file>
<description>
This implementation is done using the <a href="#entropy_encoder_model">entropy_encoder_model</a> and
<a href="#entropy_decoder_model">entropy_decoder_model</a> objects. It also uses the
<a href="#lz77_buffer">lz77_buffer</a> object. It uses the entropy coder models to
encode symbols when there is no match found by the lz77_buffer.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for compress_stream_kernel_2 which uses entropy_encoder_model_kernel_2b, entropy_decoder_model_kernel_2b, and lz77_buffer_kernel_2a.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>compress_stream_kernel_3</name>
<file>dlib/compress_stream/compress_stream_kernel_3.h</file>
<description>
This implementation is done using the the <a href="#lzp_buffer">lzp_buffer</a> object and
<a href="other.html#crc32">crc32</a> object. It does not use any sort of entropy coding, instead
a byte aligned output method is used.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description>is a typedef for compress_stream_kernel_3 which uses lzp_buffer_kernel_1.</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description>is a typedef for compress_stream_kernel_3 which uses lzp_buffer_kernel_2.</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>conditioning_class</name>
<file>dlib/conditioning_class.h</file>
<spec_file>dlib/conditioning_class/conditioning_class_kernel_abstract.h</spec_file>
<description>
This object represents a conditioning class used for arithmetic style
compression. It maintains the cumulative counts which are needed
by the entropy_encoder and entropy_decoder objects below.
</description>
<implementations>
<implementation>
<name>conditioning_class_kernel_1</name>
<file>dlib/conditioning_class/conditioning_class_kernel_1.h</file>
<description>
This implementation is done using an array to store all the counts and they are summed
whenever the cumulative counts are requested. It's pretty straight forward.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for conditioning_class_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>conditioning_class_kernel_2</name>
<file>dlib/conditioning_class/conditioning_class_kernel_2.h</file>
<description>
This implementation is done using a binary tree where each node in the tree represents one symbol and
contains that symbols count and the sum of all the counts for the nodes to the left. This way
when you request a cumulative count it can be computed by visiting log n nodes where n is the
size of the alphabet.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for conditioning_class_kernel_2</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>conditioning_class_kernel_3</name>
<file>dlib/conditioning_class/conditioning_class_kernel_3.h</file>
<description>
This implementation is done using an array to store all the counts and they are
summed whenever the cumulative counts are requested. The counts are also kept in
semi-sorted order to speed up the calculation of the cumulative count.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description>is a typedef for conditioning_class_kernel_3</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>conditioning_class_kernel_4</name>
<file>dlib/conditioning_class/conditioning_class_kernel_4.h</file>
<description>
This implementation is done using a linked list to store all the counts and they are
summed whenever the cumulative counts are requested. The counts are also kept in
semi-sorted order to speed up the calculation of the cumulative count. This implementation
also uses the <a href="other.html#memory_manager">memory_manager</a> component to create a
memory pool of linked list nodes. This implementation is especially useful for high order
contexts and/or very large and sparce alphabets.
</description>
<typedefs>
<typedef>
<name>kernel_4a</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 10,000 nodes.</description>
</typedef>
<typedef>
<name>kernel_4b</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 100,000 nodes.</description>
</typedef>
<typedef>
<name>kernel_4c</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 1,000,000 nodes.</description>
</typedef>
<typedef>
<name>kernel_4d</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 10,000,000 nodes.</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>entropy_decoder</name>
<file>dlib/entropy_decoder.h</file>
<spec_file>dlib/entropy_decoder/entropy_decoder_kernel_abstract.h</spec_file>
<description>
This object represents an entropy decoder. E.g. the decoding part of
an arithmetic coder.
</description>
<implementations>
<implementation>
<name>entropy_decoder_kernel_1</name>
<file>dlib/entropy_decoder/entropy_decoder_kernel_1.h</file>
<description>
This object is implemented using arithmetic coding and is done in the
straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_decoder_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_kernel_2</name>
<file>dlib/entropy_decoder/entropy_decoder_kernel_2.h</file>
<description>
This object is implemented using "range" coding and is done
in the straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_decoder_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>entropy_encoder</name>
<file>dlib/entropy_encoder.h</file>
<spec_file>dlib/entropy_encoder/entropy_encoder_kernel_abstract.h</spec_file>
<description>
This object represents an entropy encoder. E.g. the encoding part of
an arithmetic coder.
</description>
<implementations>
<implementation>
<name>entropy_encoder_kernel_1</name>
<file>dlib/entropy_encoder/entropy_encoder_kernel_1.h</file>
<description>
This object is implemented using arithmetic coding and is done in the
straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_encoder_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_kernel_2</name>
<file>dlib/entropy_encoder/entropy_encoder_kernel_2.h</file>
<description>
This object is implemented using "range" coding and is done
in the straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_encoder_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>entropy_decoder_model</name>
<file>dlib/entropy_decoder_model.h</file>
<spec_file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_abstract.h</spec_file>
<description>
This object represents some kind of statistical model. You
can use it to read symbols from an entropy_decoder and it will calculate
the cumulative counts/probabilities and manage contexts for you.
</description>
<implementations>
<implementation>
<name>entropy_decoder_model_kernel_1</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_1.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_decoder_model_kernel_1 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for entropy_decoder_model_kernel_1 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for entropy_decoder_model_kernel_1 that uses conditioning_class_kernel_3a</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_2</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_2.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_2b</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_2c</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_3a</description>
</typedef>
<typedef>
<name>kernel_2d</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_2a for its order-0
context and conditioning_class_kernel_4b for its order-1 context.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_3</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_3.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-2-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description> is a typedef for entropy_decoder_model_kernel_3 that uses conditioning_class_kernel_1a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description> is a typedef for entropy_decoder_model_kernel_3 that uses conditioning_class_kernel_2a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3c</name>
<description> is a typedef for entropy_decoder_model_kernel_3 that uses conditioning_class_kernel_3a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_4</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_4.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. For speed,
exclusions are not used. The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_4a</name>
<description> is a typedef for entropy_decoder_model_kernel_4 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_4b</name>
<description> is a typedef for entropy_decoder_model_kernel_4 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_5</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_5.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. Exclusions are used. The escape method used is method D.
This implementation is very much like kernel_4 except it is tuned for higher compression rather than speed.
This also uses Dmitry Shkarin's Information Inheritance scheme.
</description>
<typedefs>
<typedef>
<name>kernel_5a</name>
<description> is a typedef for entropy_decoder_model_kernel_5 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_5b</name>
<description> is a typedef for entropy_decoder_model_kernel_5 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
<typedef>
<name>kernel_5c</name>
<description> is a typedef for entropy_decoder_model_kernel_5 with the max order set to 7 and the max number
of nodes set to 2,500,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_6</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_6.h</file>
<description>
This object just assigns every symbol the same probability. I.e. it uses an <i>order-(-1)</i> model.
</description>
<typedefs>
<typedef>
<name>kernel_6a</name>
<description>is a typedef for entropy_decoder_model_kernel_6</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>entropy_encoder_model</name>
<file>dlib/entropy_encoder_model.h</file>
<spec_file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_abstract.h</spec_file>
<description>
This object represents some kind of statistical model. You
can use it to write symbols to an entropy_encoder and it will calculate
the cumulative counts/probabilities and manage contexts for you.
</description>
<implementations>
<implementation>
<name>entropy_encoder_model_kernel_1</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_1.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_encoder_model_kernel_1 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for entropy_encoder_model_kernel_1 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for entropy_encoder_model_kernel_1 that uses conditioning_class_kernel_3a</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_2</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_2.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_2b</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_2c</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_3a</description>
</typedef>
<typedef>
<name>kernel_2d</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_2a for its order-0
context and conditioning_class_kernel_4b for its order-1 context.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_3</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_3.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-2-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description> is a typedef for entropy_encoder_model_kernel_3 that uses conditioning_class_kernel_1a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description> is a typedef for entropy_encoder_model_kernel_3 that uses conditioning_class_kernel_2a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3c</name>
<description> is a typedef for entropy_encoder_model_kernel_3 that uses conditioning_class_kernel_3a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_4</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_4.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. For speed,
exclusions are not used. The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_4a</name>
<description> is a typedef for entropy_encoder_model_kernel_4 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_4b</name>
<description> is a typedef for entropy_encoder_model_kernel_4 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_5</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_5.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. Exclusions are used. The escape method used is method D.
This implementation is very much like kernel_4 except it is tuned for higher compression rather than speed.
This also uses Dmitry Shkarin's Information Inheritance scheme.
</description>
<typedefs>
<typedef>
<name>kernel_5a</name>
<description> is a typedef for entropy_encoder_model_kernel_5 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_5b</name>
<description> is a typedef for entropy_encoder_model_kernel_5 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
<typedef>
<name>kernel_5c</name>
<description> is a typedef for entropy_encoder_model_kernel_5 with the max order set to 7 and the max number
of nodes set to 2,500,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_6</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_6.h</file>
<description>
This object just assigns every symbol the same probability. I.e. it uses an <i>order-(-1)</i> model.
</description>
<typedefs>
<typedef>
<name>kernel_6a</name>
<description>is a typedef for entropy_encoder_model_kernel_6</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>lz77_buffer</name>
<file>dlib/lz77_buffer.h</file>
<spec_file>dlib/lz77_buffer/lz77_buffer_kernel_abstract.h</spec_file>
<description>
This object represents a pair of buffers (history and lookahead buffers)
used during lz77 style compression.
</description>
<implementations>
<implementation>
<name>lz77_buffer_kernel_1</name>
<file>dlib/lz77_buffer/lz77_buffer_kernel_1.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a> and it
just does simple linear searches of the history buffer to find matches.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for lz77_buffer_kernel_1 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>lz77_buffer_kernel_2</name>
<file>dlib/lz77_buffer/lz77_buffer_kernel_2.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a>. It
finds matches by using a hash table.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for lz77_buffer_kernel_2 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>lzp_buffer</name>
<file>dlib/lzp_buffer.h</file>
<spec_file>dlib/lzp_buffer/lzp_buffer_kernel_abstract.h</spec_file>
<description>
This object represents some varation on the LZP algorithm
described by Charles Bloom in his paper "LZP: a new data
compression algorithm"
</description>
<implementations>
<implementation>
<name>lzp_buffer_kernel_1</name>
<file>dlib/lzp_buffer/lzp_buffer_kernel_1.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a> and uses
an order-3 model to predict matches.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for lzp_buffer_kernel_1 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>lzp_buffer_kernel_2</name>
<file>dlib/lzp_buffer/lzp_buffer_kernel_2.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a> and uses
an order-5-4-3 model to predict matches.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for lzp_buffer_kernel_2 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Data Compression</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
This page contains a bunch of objects that implement various parts of compression algorithms.
They can be put together in different ways to construct many different algorithms.
Note that the <a href="#compress_stream">compress_stream</a> object contains complete compression algorithms. So if you
just want to compress some data then you can easily use that object and not bother with the others.
</p>
<p>
In the column to the right you can see benchmark data for each of the compress_stream
typedefs. The times measured are the time it takes to compress and then
decompress each file. It was run on a 3.0ghz P4. For reference see the Canterbury corpus
<a href="http://corpus.canterbury.ac.nz/">web site</a>.
</p>
</body>
<!-- ************************************************************************* -->
<menu width="200">
<top>
<section>
<name>Objects</name>
<item>compress_stream</item>
<item>conditioning_class</item>
<item>entropy_decoder</item>
<item>entropy_encoder</item>
<item>entropy_decoder_model</item>
<item>entropy_encoder_model</item>
<item>lz77_buffer</item>
<item>lzp_buffer</item>
</section>
<section>
<name>Benchmarks</name>
<item>
<name>kernel_1a</name>
<link>kernel_1a.html</link>
</item>
<item>
<name>kernel_1b</name>
<link>kernel_1b.html</link>
</item>
<item>
<name>kernel_1c</name>
<link>kernel_1c.html</link>
</item>
<item>
<name>kernel_1da</name>
<link>kernel_1da.html</link>
</item>
<item>
<name>kernel_1db</name>
<link>kernel_1db.html</link>
</item>
<item>
<name>kernel_1ea</name>
<link>kernel_1ea.html</link>
</item>
<item>
<name>kernel_1eb</name>
<link>kernel_1eb.html</link>
</item>
<item>
<name>kernel_1ec</name>
<link>kernel_1ec.html</link>
</item>
<item>
<name>kernel_2a</name>
<link>kernel_2a.html</link>
</item>
<item>
<name>kernel_3a</name>
<link>kernel_3a.html</link>
</item>
<item>
<name>kernel_3b</name>
<link>kernel_3b.html</link>
</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component>
<name>compress_stream</name>
<file>dlib/compress_stream.h</file>
<spec_file>dlib/compress_stream/compress_stream_kernel_abstract.h</spec_file>
<description>
This object is pretty straight forward. It has no state and just
contains the functions compress and decompress.
They do just what their names imply to iostream objects.
</description>
<examples>
<example>compress_stream_ex.cpp.html</example>
<example>file_to_code_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>compress_stream_kernel_1</name>
<file>dlib/compress_stream/compress_stream_kernel_1.h</file>
<description>
This implementation is done using the <a href="#entropy_encoder_model">entropy_encoder_model</a> and
<a href="#entropy_decoder_model">entropy_decoder_model</a> objects.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_1b and entropy_decoder_model_kernel_1b</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_2b and entropy_decoder_model_kernel_2b </description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_3b and entropy_decoder_model_kernel_3b </description>
</typedef>
<typedef>
<name>kernel_1da</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_4a and entropy_decoder_model_kernel_4a </description>
</typedef>
<typedef>
<name>kernel_1db</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_4b and entropy_decoder_model_kernel_4b </description>
</typedef>
<typedef>
<name>kernel_1ea</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_5a and entropy_decoder_model_kernel_5a </description>
</typedef>
<typedef>
<name>kernel_1eb</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_5b and entropy_decoder_model_kernel_5b </description>
</typedef>
<typedef>
<name>kernel_1ec</name>
<description>is a typedef for compress_stream_kernel_1 which uses entropy_decoder_model_kernel_5c and entropy_decoder_model_kernel_5c </description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>compress_stream_kernel_2</name>
<file>dlib/compress_stream/compress_stream_kernel_2.h</file>
<description>
This implementation is done using the <a href="#entropy_encoder_model">entropy_encoder_model</a> and
<a href="#entropy_decoder_model">entropy_decoder_model</a> objects. It also uses the
<a href="#lz77_buffer">lz77_buffer</a> object. It uses the entropy coder models to
encode symbols when there is no match found by the lz77_buffer.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for compress_stream_kernel_2 which uses entropy_encoder_model_kernel_2b, entropy_decoder_model_kernel_2b, and lz77_buffer_kernel_2a.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>compress_stream_kernel_3</name>
<file>dlib/compress_stream/compress_stream_kernel_3.h</file>
<description>
This implementation is done using the the <a href="#lzp_buffer">lzp_buffer</a> object and
<a href="other.html#crc32">crc32</a> object. It does not use any sort of entropy coding, instead
a byte aligned output method is used.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description>is a typedef for compress_stream_kernel_3 which uses lzp_buffer_kernel_1.</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description>is a typedef for compress_stream_kernel_3 which uses lzp_buffer_kernel_2.</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>conditioning_class</name>
<file>dlib/conditioning_class.h</file>
<spec_file>dlib/conditioning_class/conditioning_class_kernel_abstract.h</spec_file>
<description>
This object represents a conditioning class used for arithmetic style
compression. It maintains the cumulative counts which are needed
by the entropy_encoder and entropy_decoder objects below.
</description>
<implementations>
<implementation>
<name>conditioning_class_kernel_1</name>
<file>dlib/conditioning_class/conditioning_class_kernel_1.h</file>
<description>
This implementation is done using an array to store all the counts and they are summed
whenever the cumulative counts are requested. It's pretty straight forward.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for conditioning_class_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>conditioning_class_kernel_2</name>
<file>dlib/conditioning_class/conditioning_class_kernel_2.h</file>
<description>
This implementation is done using a binary tree where each node in the tree represents one symbol and
contains that symbols count and the sum of all the counts for the nodes to the left. This way
when you request a cumulative count it can be computed by visiting log n nodes where n is the
size of the alphabet.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for conditioning_class_kernel_2</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>conditioning_class_kernel_3</name>
<file>dlib/conditioning_class/conditioning_class_kernel_3.h</file>
<description>
This implementation is done using an array to store all the counts and they are
summed whenever the cumulative counts are requested. The counts are also kept in
semi-sorted order to speed up the calculation of the cumulative count.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description>is a typedef for conditioning_class_kernel_3</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>conditioning_class_kernel_4</name>
<file>dlib/conditioning_class/conditioning_class_kernel_4.h</file>
<description>
This implementation is done using a linked list to store all the counts and they are
summed whenever the cumulative counts are requested. The counts are also kept in
semi-sorted order to speed up the calculation of the cumulative count. This implementation
also uses the <a href="other.html#memory_manager">memory_manager</a> component to create a
memory pool of linked list nodes. This implementation is especially useful for high order
contexts and/or very large and sparce alphabets.
</description>
<typedefs>
<typedef>
<name>kernel_4a</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 10,000 nodes.</description>
</typedef>
<typedef>
<name>kernel_4b</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 100,000 nodes.</description>
</typedef>
<typedef>
<name>kernel_4c</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 1,000,000 nodes.</description>
</typedef>
<typedef>
<name>kernel_4d</name>
<description>is a typedef for conditioning_class_kernel_4 with a memory pool of 10,000,000 nodes.</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>entropy_decoder</name>
<file>dlib/entropy_decoder.h</file>
<spec_file>dlib/entropy_decoder/entropy_decoder_kernel_abstract.h</spec_file>
<description>
This object represents an entropy decoder. E.g. the decoding part of
an arithmetic coder.
</description>
<implementations>
<implementation>
<name>entropy_decoder_kernel_1</name>
<file>dlib/entropy_decoder/entropy_decoder_kernel_1.h</file>
<description>
This object is implemented using arithmetic coding and is done in the
straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_decoder_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_kernel_2</name>
<file>dlib/entropy_decoder/entropy_decoder_kernel_2.h</file>
<description>
This object is implemented using "range" coding and is done
in the straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_decoder_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>entropy_encoder</name>
<file>dlib/entropy_encoder.h</file>
<spec_file>dlib/entropy_encoder/entropy_encoder_kernel_abstract.h</spec_file>
<description>
This object represents an entropy encoder. E.g. the encoding part of
an arithmetic coder.
</description>
<implementations>
<implementation>
<name>entropy_encoder_kernel_1</name>
<file>dlib/entropy_encoder/entropy_encoder_kernel_1.h</file>
<description>
This object is implemented using arithmetic coding and is done in the
straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_encoder_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_kernel_2</name>
<file>dlib/entropy_encoder/entropy_encoder_kernel_2.h</file>
<description>
This object is implemented using "range" coding and is done
in the straight forward way using integers and fixed precision math.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_encoder_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>entropy_decoder_model</name>
<file>dlib/entropy_decoder_model.h</file>
<spec_file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_abstract.h</spec_file>
<description>
This object represents some kind of statistical model. You
can use it to read symbols from an entropy_decoder and it will calculate
the cumulative counts/probabilities and manage contexts for you.
</description>
<implementations>
<implementation>
<name>entropy_decoder_model_kernel_1</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_1.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_decoder_model_kernel_1 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for entropy_decoder_model_kernel_1 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for entropy_decoder_model_kernel_1 that uses conditioning_class_kernel_3a</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_2</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_2.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_2b</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_2c</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_3a</description>
</typedef>
<typedef>
<name>kernel_2d</name>
<description>is a typedef for entropy_decoder_model_kernel_2 that uses conditioning_class_kernel_2a for its order-0
context and conditioning_class_kernel_4b for its order-1 context.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_3</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_3.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-2-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description> is a typedef for entropy_decoder_model_kernel_3 that uses conditioning_class_kernel_1a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description> is a typedef for entropy_decoder_model_kernel_3 that uses conditioning_class_kernel_2a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3c</name>
<description> is a typedef for entropy_decoder_model_kernel_3 that uses conditioning_class_kernel_3a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_4</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_4.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. For speed,
exclusions are not used. The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_4a</name>
<description> is a typedef for entropy_decoder_model_kernel_4 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_4b</name>
<description> is a typedef for entropy_decoder_model_kernel_4 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_5</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_5.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. Exclusions are used. The escape method used is method D.
This implementation is very much like kernel_4 except it is tuned for higher compression rather than speed.
This also uses Dmitry Shkarin's Information Inheritance scheme.
</description>
<typedefs>
<typedef>
<name>kernel_5a</name>
<description> is a typedef for entropy_decoder_model_kernel_5 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_5b</name>
<description> is a typedef for entropy_decoder_model_kernel_5 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
<typedef>
<name>kernel_5c</name>
<description> is a typedef for entropy_decoder_model_kernel_5 with the max order set to 7 and the max number
of nodes set to 2,500,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_decoder_model_kernel_6</name>
<file>dlib/entropy_decoder_model/entropy_decoder_model_kernel_6.h</file>
<description>
This object just assigns every symbol the same probability. I.e. it uses an <i>order-(-1)</i> model.
</description>
<typedefs>
<typedef>
<name>kernel_6a</name>
<description>is a typedef for entropy_decoder_model_kernel_6</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>entropy_encoder_model</name>
<file>dlib/entropy_encoder_model.h</file>
<spec_file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_abstract.h</spec_file>
<description>
This object represents some kind of statistical model. You
can use it to write symbols to an entropy_encoder and it will calculate
the cumulative counts/probabilities and manage contexts for you.
</description>
<implementations>
<implementation>
<name>entropy_encoder_model_kernel_1</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_1.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for entropy_encoder_model_kernel_1 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for entropy_encoder_model_kernel_1 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for entropy_encoder_model_kernel_1 that uses conditioning_class_kernel_3a</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_2</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_2.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_1a</description>
</typedef>
<typedef>
<name>kernel_2b</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_2a</description>
</typedef>
<typedef>
<name>kernel_2c</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_3a</description>
</typedef>
<typedef>
<name>kernel_2d</name>
<description>is a typedef for entropy_encoder_model_kernel_2 that uses conditioning_class_kernel_2a for its order-0
context and conditioning_class_kernel_4b for its order-1 context.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_3</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_3.h</file>
<description>
This object is implemented using the <a href="#conditioning_class">conditioning_class</a> component.
It implements an <i>order-2-1-0</i> finite context model and uses lazy exclusions and update exclusions.
The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description> is a typedef for entropy_encoder_model_kernel_3 that uses conditioning_class_kernel_1a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description> is a typedef for entropy_encoder_model_kernel_3 that uses conditioning_class_kernel_2a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
<typedef>
<name>kernel_3c</name>
<description> is a typedef for entropy_encoder_model_kernel_3 that uses conditioning_class_kernel_3a for orders 0 and 1
and conditioning_class_kernel_4b for order-2.</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_4</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_4.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. For speed,
exclusions are not used. The escape method used is method D.
</description>
<typedefs>
<typedef>
<name>kernel_4a</name>
<description> is a typedef for entropy_encoder_model_kernel_4 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_4b</name>
<description> is a typedef for entropy_encoder_model_kernel_4 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_5</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_5.h</file>
<description>
This object is implemented using a variation of the PPM algorithm described by Alistair Moffat in his paper "Implementing
the PPM data compression scheme."
It provides template arguments to select the maximum order and maximum memory to use. Exclusions are used. The escape method used is method D.
This implementation is very much like kernel_4 except it is tuned for higher compression rather than speed.
This also uses Dmitry Shkarin's Information Inheritance scheme.
</description>
<typedefs>
<typedef>
<name>kernel_5a</name>
<description> is a typedef for entropy_encoder_model_kernel_5 with the max order set to 4 and the max number
of nodes set to 200,000</description>
</typedef>
<typedef>
<name>kernel_5b</name>
<description> is a typedef for entropy_encoder_model_kernel_5 with the max order set to 5 and the max number
of nodes set to 1,000,000</description>
</typedef>
<typedef>
<name>kernel_5c</name>
<description> is a typedef for entropy_encoder_model_kernel_5 with the max order set to 7 and the max number
of nodes set to 2,500,000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>entropy_encoder_model_kernel_6</name>
<file>dlib/entropy_encoder_model/entropy_encoder_model_kernel_6.h</file>
<description>
This object just assigns every symbol the same probability. I.e. it uses an <i>order-(-1)</i> model.
</description>
<typedefs>
<typedef>
<name>kernel_6a</name>
<description>is a typedef for entropy_encoder_model_kernel_6</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>lz77_buffer</name>
<file>dlib/lz77_buffer.h</file>
<spec_file>dlib/lz77_buffer/lz77_buffer_kernel_abstract.h</spec_file>
<description>
This object represents a pair of buffers (history and lookahead buffers)
used during lz77 style compression.
</description>
<implementations>
<implementation>
<name>lz77_buffer_kernel_1</name>
<file>dlib/lz77_buffer/lz77_buffer_kernel_1.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a> and it
just does simple linear searches of the history buffer to find matches.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for lz77_buffer_kernel_1 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>lz77_buffer_kernel_2</name>
<file>dlib/lz77_buffer/lz77_buffer_kernel_2.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a>. It
finds matches by using a hash table.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for lz77_buffer_kernel_2 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>lzp_buffer</name>
<file>dlib/lzp_buffer.h</file>
<spec_file>dlib/lzp_buffer/lzp_buffer_kernel_abstract.h</spec_file>
<description>
This object represents some varation on the LZP algorithm
described by Charles Bloom in his paper "LZP: a new data
compression algorithm"
</description>
<implementations>
<implementation>
<name>lzp_buffer_kernel_1</name>
<file>dlib/lzp_buffer/lzp_buffer_kernel_1.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a> and uses
an order-3 model to predict matches.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for lzp_buffer_kernel_1 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>lzp_buffer_kernel_2</name>
<file>dlib/lzp_buffer/lzp_buffer_kernel_2.h</file>
<description>
This object is implemented using the <a href="containers.html#sliding_buffer">sliding_buffer</a> and uses
an order-5-4-3 model to predict matches.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for lzp_buffer_kernel_2 that uses sliding_buffer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<!-- ************************************************************************* -->
<body>
<center><h1>dlib C++ library</h1></center>
<br/><br/>
<p>
<web>Welcome to the dlib C++ library's homepage. </web>
<chm>Welcome to the dlib C++ library documentation.</chm>
It is a modern C++ library with a focus on portability
and program correctness. It strives to be easy to use right and hard to use wrong.
Thus, it comes with extensive documentation and thorough debugging modes.
</p>
<p>
The library is open source software and is licensed
under the <a href="license.html">Boost Software License</a>.
The <a href="intro.html">introduction</a> contains everything you need to know to get
started using the library. However, if you have any questions, comments, or complaints feel free to
<a href='mailto:davisking@users.sourceforge.net'>email me</a><web> or post in the
sourceforge <a href='http://sourceforge.net/forum/?group_id=130373'>Forums</a></web>.
</p>
<chm>
<p>
For updates to this project check its sourceforge page at <a href="http://dclib.sourceforge.net">http://dclib.sourceforge.net</a>.
</p>
</chm>
<br/>
<p>
<h2>Major Features</h2>
<ul>
<li><b>Documentation</b>
<ul>
<li>Unlike a lot of open source projects, this one provides complete and precise
documentation for every class and function. There are also debugging modes that check the
documented preconditions for functions. When this is enabled it will catch the vast majority of
bugs caused by calling functions incorrectly or using objects in an incorrect manner.
</li>
<li>Lots of example programs are provided</li>
<li><i>I consider the documentation to be the most important part of the library</i>. So if you find anything
that isn't documented, isn't clear, or has out of date documentation, tell me and I will fix it.
</li>
</ul>
</li>
<li><b>Portable Code</b>
<ul>
<li>All non ISO C++ code is isolated inside the OS abstraction layers which are kept as small as possible.
The rest of the library is either layered on top of the OS
abstraction layers or is pure ISO C++. </li>
<li>Big/little endian agnostic</li>
<li>No other packages are required to use the library. Only APIs that are
provided by an out of the box OS are used. </li>
<li>The library is tested regularly on win32, Linux, and Mac OS X systems. However, it should
work on any POSIX system and has been tested on Solaris, HPUX, and the BSDs.</li>
</ul>
</li>
<li><b>Threading</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#threads">threading API</a></li>
<li>A <a href="other.html#pipe">pipe</a> for inter-thread communication</li>
<li>A <a href="other.html#timer">timer</a> object capable of generating events that are regularly spaced in time</li>
<li><a href="api.html#thread_specific_data">Thread specific data</a></li>
<li><a href="api.html#threaded_object">Threaded objects</a></li>
<li><a href="api.html#thread_function">Threaded functions</a></li>
</ul>
</li>
<li><b>Networking</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#sockets">TCP sockets API</a></li>
<li>An object to help you make TCP based <a href="network.html#server">servers</a></li>
<li>A <a href="network.html#sockstreambuf">streambuf</a> object that enables TCP sockets
to interoperate with the C++ iostreams library </li>
<li>A simple <a href="network.html#http">HTTP server</a> object you can use to embed a
web server into your applications</li>
</ul>
</li>
<li><b>Graphical User Interfaces</b>
<ul>
<li>The library provides a portable and simple core <a href="api.html#gui_core">GUI API</a></li>
<li>Implemented on top of the core GUI API are numerous <a href="api.html#gui_widgets">widgets</a></li>
<li>Unlike many other GUI toolkits, the entire dlib GUI toolkit is threadsafe</li>
</ul>
</li>
<li><b>Numerical Algorithms</b>
<ul>
<li>A fast <a href="containers.html#matrix">matrix</a> object implemented using the expression templates technique</li>
<li>Numerous linear algebra and mathematical operations are defined for the matrix object such as the
<a href="dlib/matrix/matrix_utilities_abstract.h.html#svd">singular value decomposition</a>,
<a href="dlib/matrix/matrix_utilities_abstract.h.html#trans">transpose</a>,
<a href="dlib/matrix/matrix_math_functions_abstract.h.html#sin">trig functions</a>, etc...</li>
<li>Unconstrained optimization algorithms such as
<a href="algorithms.html#find_min_conjugate_gradient">conjugate gradient</a> and <a href="algorithms.html#find_min_quasi_newton">quasi newton</a> techniques</li>
<li>A <a href="algorithms.html#bigint">big integer</a> object</li>
<li>A <a href="algorithms.html#rand">random number</a> object</li>
</ul>
</li>
<li><b>Machine Learning Algorithms</b>
<ul>
<li><a href="algorithms.html#mlp">multi layer perceptrons</a> </li>
<li><a href="algorithms.html#svm_nu_train">nu support vector machines</a> for classification</li>
<li>An online <a href="algorithms.html#krls">kernel RLS regression</a> algorithm</li>
<li>An online kernelized <a href="algorithms.html#kcentroid">centroid estimator</a></li>
<li>A kernelized <a href="algorithms.html#kkmeans">k-means</a> clustering algorithm</li>
<li>Bayesian Network inference algorithms such as the
<a href="algorithms.html#bayesian_network_join_tree">join tree</a> algorithm and
<a href="algorithms.html#bayesian_network_gibbs_sampler">Gibbs sampler</a> Markov Chain Monte Carlo algorithm</li>
</ul>
</li>
<li><b>Image Processing</b>
<ul>
<li>Windows BMP <a href="imaging.html#load_bmp">read</a> and <a href="imaging.html#save_bmp">write</a> support</li>
<li>Automatic color space conversion between various pixel types</li>
<li>Common image operations such as edge finding and morphological operations</li>
</ul>
</li>
<li><b>Data Compression and Integrity Algorithms</b>
<ul>
<li>A <a href="algorithms.html#crc32">CRC 32</a> object</li>
<li><a href="algorithms.html#md5">MD5</a> functions</li>
<li>Various abstracted objects representing parts of <a href="compression.html">data compression</a>
algorithms. Many forms of the PPM algorithm are included. </li>
</ul>
</li>
<li><b>Testing</b>
<ul>
<li>A thread safe <a href="other.html#logger">logger</a> object styled after the popular Java logger log4j</li>
<li>A modular <a href="other.html#dlib_testing_suite">unit testing framework</a></li>
<li>Various <a href="metaprogramming.html">assert</a> macros useful for testing preconditions</li>
</ul>
</li>
<li><b>General Utilities</b>
<ul>
<li>A type-safe <a href="other.html#byte_orderer">object</a> to convert between big and little endian byte orderings</li>
<li>A <a href="parsing.html#cmd_line_parser">command line parser</a> with the ability to
parse and validate command lines with various types of arguments and options</li>
<li>An <a href="parsing.html#xml_parser">XML parser</a></li>
<li>An object that can perform <a href="parsing.html#base64">base64</a> conversions</li>
<li>Many <a href="containers.html">container classes</a></li>
<li><a href="other.html#serialize">Serialization support</a></li>
<li>Many <a href="other.html#memory_manager">memory manager</a> objects that implement
differnt memory pooling strategies</li>
</ul>
</li>
</ul>
</p>
</body>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<!-- ************************************************************************* -->
<body>
<center><h1>dlib C++ library</h1></center>
<br/><br/>
<p>
<web>Welcome to the dlib C++ library's homepage. </web>
<chm>Welcome to the dlib C++ library documentation.</chm>
It is a modern C++ library with a focus on portability
and program correctness. It strives to be easy to use right and hard to use wrong.
Thus, it comes with extensive documentation and thorough debugging modes.
</p>
<p>
The library is open source software and is licensed
under the <a href="license.html">Boost Software License</a>.
The <a href="intro.html">introduction</a> contains everything you need to know to get
started using the library. However, if you have any questions, comments, or complaints feel free to
<a href='mailto:davisking@users.sourceforge.net'>email me</a><web> or post in the
sourceforge <a href='http://sourceforge.net/forum/?group_id=130373'>Forums</a></web>.
</p>
<chm>
<p>
For updates to this project check its sourceforge page at <a href="http://dclib.sourceforge.net">http://dclib.sourceforge.net</a>.
</p>
</chm>
<br/>
<p>
<h2>Major Features</h2>
<ul>
<li><b>Documentation</b>
<ul>
<li>Unlike a lot of open source projects, this one provides complete and precise
documentation for every class and function. There are also debugging modes that check the
documented preconditions for functions. When this is enabled it will catch the vast majority of
bugs caused by calling functions incorrectly or using objects in an incorrect manner.
</li>
<li>Lots of example programs are provided</li>
<li><i>I consider the documentation to be the most important part of the library</i>. So if you find anything
that isn't documented, isn't clear, or has out of date documentation, tell me and I will fix it.
</li>
</ul>
</li>
<li><b>Portable Code</b>
<ul>
<li>All non ISO C++ code is isolated inside the OS abstraction layers which are kept as small as possible.
The rest of the library is either layered on top of the OS
abstraction layers or is pure ISO C++. </li>
<li>Big/little endian agnostic</li>
<li>No other packages are required to use the library. Only APIs that are
provided by an out of the box OS are used. </li>
<li>The library is tested regularly on win32, Linux, and Mac OS X systems. However, it should
work on any POSIX system and has been tested on Solaris, HPUX, and the BSDs.</li>
</ul>
</li>
<li><b>Threading</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#threads">threading API</a></li>
<li>A <a href="other.html#pipe">pipe</a> for inter-thread communication</li>
<li>A <a href="other.html#timer">timer</a> object capable of generating events that are regularly spaced in time</li>
<li><a href="api.html#thread_specific_data">Thread specific data</a></li>
<li><a href="api.html#threaded_object">Threaded objects</a></li>
<li><a href="api.html#thread_function">Threaded functions</a></li>
</ul>
</li>
<li><b>Networking</b>
<ul>
<li>The library provides a portable and simple <a href="api.html#sockets">TCP sockets API</a></li>
<li>An object to help you make TCP based <a href="network.html#server">servers</a></li>
<li>A <a href="network.html#sockstreambuf">streambuf</a> object that enables TCP sockets
to interoperate with the C++ iostreams library </li>
<li>A simple <a href="network.html#http">HTTP server</a> object you can use to embed a
web server into your applications</li>
</ul>
</li>
<li><b>Graphical User Interfaces</b>
<ul>
<li>The library provides a portable and simple core <a href="api.html#gui_core">GUI API</a></li>
<li>Implemented on top of the core GUI API are numerous <a href="api.html#gui_widgets">widgets</a></li>
<li>Unlike many other GUI toolkits, the entire dlib GUI toolkit is threadsafe</li>
</ul>
</li>
<li><b>Numerical Algorithms</b>
<ul>
<li>A fast <a href="containers.html#matrix">matrix</a> object implemented using the expression templates technique</li>
<li>Numerous linear algebra and mathematical operations are defined for the matrix object such as the
<a href="dlib/matrix/matrix_utilities_abstract.h.html#svd">singular value decomposition</a>,
<a href="dlib/matrix/matrix_utilities_abstract.h.html#trans">transpose</a>,
<a href="dlib/matrix/matrix_math_functions_abstract.h.html#sin">trig functions</a>, etc...</li>
<li>Unconstrained optimization algorithms such as
<a href="algorithms.html#find_min_conjugate_gradient">conjugate gradient</a> and <a href="algorithms.html#find_min_quasi_newton">quasi newton</a> techniques</li>
<li>A <a href="algorithms.html#bigint">big integer</a> object</li>
<li>A <a href="algorithms.html#rand">random number</a> object</li>
</ul>
</li>
<li><b>Machine Learning Algorithms</b>
<ul>
<li><a href="algorithms.html#mlp">multi layer perceptrons</a> </li>
<li><a href="algorithms.html#svm_nu_train">nu support vector machines</a> for classification</li>
<li>An online <a href="algorithms.html#krls">kernel RLS regression</a> algorithm</li>
<li>An online kernelized <a href="algorithms.html#kcentroid">centroid estimator</a></li>
<li>A kernelized <a href="algorithms.html#kkmeans">k-means</a> clustering algorithm</li>
<li>Bayesian Network inference algorithms such as the
<a href="algorithms.html#bayesian_network_join_tree">join tree</a> algorithm and
<a href="algorithms.html#bayesian_network_gibbs_sampler">Gibbs sampler</a> Markov Chain Monte Carlo algorithm</li>
</ul>
</li>
<li><b>Image Processing</b>
<ul>
<li>Windows BMP <a href="imaging.html#load_bmp">read</a> and <a href="imaging.html#save_bmp">write</a> support</li>
<li>Automatic color space conversion between various pixel types</li>
<li>Common image operations such as edge finding and morphological operations</li>
</ul>
</li>
<li><b>Data Compression and Integrity Algorithms</b>
<ul>
<li>A <a href="algorithms.html#crc32">CRC 32</a> object</li>
<li><a href="algorithms.html#md5">MD5</a> functions</li>
<li>Various abstracted objects representing parts of <a href="compression.html">data compression</a>
algorithms. Many forms of the PPM algorithm are included. </li>
</ul>
</li>
<li><b>Testing</b>
<ul>
<li>A thread safe <a href="other.html#logger">logger</a> object styled after the popular Java logger log4j</li>
<li>A modular <a href="other.html#dlib_testing_suite">unit testing framework</a></li>
<li>Various <a href="metaprogramming.html">assert</a> macros useful for testing preconditions</li>
</ul>
</li>
<li><b>General Utilities</b>
<ul>
<li>A type-safe <a href="other.html#byte_orderer">object</a> to convert between big and little endian byte orderings</li>
<li>A <a href="parsing.html#cmd_line_parser">command line parser</a> with the ability to
parse and validate command lines with various types of arguments and options</li>
<li>An <a href="parsing.html#xml_parser">XML parser</a></li>
<li>An object that can perform <a href="parsing.html#base64">base64</a> conversions</li>
<li>Many <a href="containers.html">container classes</a></li>
<li><a href="other.html#serialize">Serialization support</a></li>
<li>Many <a href="other.html#memory_manager">memory manager</a> objects that implement
differnt memory pooling strategies</li>
</ul>
</li>
</ul>
</p>
</body>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Introduction</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<!-- **************************** OVERVIEW SECTION **************************** -->
<h1>Overview</h1>
<p>
This library is a collection of various C++ objects I have created and found to be useful
over the last few years. Generally speaking, there is no focus on any specific domain
in the library, it mostly contains general utility sorts of things. One of the bigger
and more notable features is the API abstraction layer which allows you to create portable applications
that make use of TCP sockets, threads, file browsing, and simple graphical user interfaces. There
is, however, much more than just that.
</p>
<p>
This library also aims to be simple, portable, and modern. Everything is developed with the
<a href="http://en.wikipedia.org/wiki/Design_by_contract">Design by Contract</a>
methodology. You can read about Design by Contract on the internet
for more information but from
the point of view of a user of this library it basically means that there exists complete and precise
documentation and aggressive debugging modes that can be enabled.
</p>
<p>
I always try to make sure everything is as portable as possible. All platform specific code is
confined inside the API wrappers. Everything else is either layered on top of those wrappers
or is written in pure ISO standard C++. Currently the library is known to work on OS X,
MS Windows, Linux, Solaris, the BSDs, and HP-UX. It should work on any POSIX platform but I
haven't had the opportunity to test it on any others (if you have access to other platforms and
would like to help increase this list then let me know).
</p>
<p>
The rest of this page explains everything you need to know to get started using the library. It
explains where to find the documentation for each object/function and how to interpret
what you find there. For help compiling with dlib check out the <a href="compile.html">how to compile</a>
page. Or if you are having trouble finding where a particular object's documentation is located you may
be able to find it by consulting the <a href="term_index.html">index</a>.</p>
<p>
The library is also covered by the very liberal Boost Software License so feel free to use it
however you like.
</p>
<p>
Much of the organization and notation used in this library I learned from the
<a href="http://www.cse.ohio-state.edu/~weide/sce/now/">Software Component Engineering</a>
course sequence at OSU. As such, this library is heavily influenced by the Design by Contract and
generic programming methodologies.
</p>
<!-- **************************** NOTATION SECTION **************************** -->
<h1>Notation</h1>
<p>
For the most part I try to document my code in a way that any C++ programmer would understand
but for the sake of brevity I use some of the following uncommon notation.
</p>
<ul>
<li/><b> kernel, extension, and abstract </b>
<ul>
Each component of the library has a specification which defines its core behavior and interface. This
specification defines what is called the component's kernel. Additionally, each component may have any number of
extensions. An extension is essentially a specification for something that layers functionality on top of the
kernel of a component.
<br/>
<br/> In the naming of files I use the word abstract to indicate that a file
contains a specification of a kernel component or extension rather than an actual implementation.
</ul>
<br/><li/><b>/*! comments like this !*/</b>
<ul>
This is just for "formal comments." Generally these appear after a function prototype and contain
the requires/ensures stuff or at the top of a class and tell you general things about the class.
</ul>
<br/><li/> <b> requires/ensures/throws </b>
<ul>
These words appear in the formal comment following function prototypes and have the following meanings.
<br/><u>requires</u>: This defines a list of requirements for calling the function. These requirements
MUST be met or a call to the function has undefined results. (note that when the checking/debugging modes
are enabled on an object then it will throw the dlib::fatal_error exception with fatal_error::type == EBROKEN_ASSERT when the requires clause is
broken rather than causing "undefined results")
<br/><u>ensures</u>: This defines what the function does. It is a list of conditions that will be
true after the function finishes executing. Note that if an exception is thrown or the function returns
indicating an error occurred then nothing in the ensures clause is guaranteed to be true.
<br/><u>throws</u>: This defines what exceptions may be thrown by this function. It generally
tells you why the exception might be thrown. It also tells you what the function does in this event:
Does it have no effect at all? Does it corrupt any objects? etc...
<br/>
<br/>
Sometimes these blocks do not appear in the formal comment. The meanings in these cases are as follows:
<br/><u>missing requires</u>: There are no requirements, you may put anything in the function arguments.
<br/><u>missing ensures</u>: This means that the effects of the function are unspecified. This is often used
for call backs where the client programmer implements the actual function.
<br/><u>missing throws</u>: This means that the function does not throw anything.
<br/>
<br/>
So in summary, the requires clause must always be satisfied, the ensures clause tells you what the
function does when it does <i>not</i> throw or return an error, and the throws clause tells you what happens when the function
<i>does</i> throw.
</ul>
<br/><li/> <anchor>meaning_of_hash</anchor> <b> meaning of # symbol </b>
<ul>
I use this as a prefix on identifiers to make reference to the value of the identifier "after"
some event has occurred.
<br/><br/>
The most common place I use this notation is inside the formal comment following a function prototype.
If the # symbol appears in a requires/ensures/throws block then it means the value of
the identifier after the function has finished, otherwise all references to an identifier
refer to its value before the function was called.
<br/><br/>
An example will make it clear.
<pre><font color='#3333FF'>int</font> <b>funct</b><font face="Lucida Console">(</font>
<font color='#3333FF'> int</font>&amp; something
<font face="Lucida Console">);</font>
<font color='#009900'>/*!
requires
- something &gt; 4
ensures
- #some_other_function() == 9
- #funct() == something
- #something == something + 1
!*/</font>
</pre>
This says that funct() requires that "something" be greater than 4, that funct() will increment "something"
by 1, and funct() returns the original value of something. It also says that
<i>after</i> the call to funct() ends a call to some_other_function() will return the value 9.
</ul>
<br/><li/> <anchor>CONVENTION</anchor> <b> CONVENTION </b>
<ul>
This is a section of the formal comment which appears at the top of all classes which are
actual implementations (as opposed to specifications). This section of the comment contains
a list of invariants that tell you what the member variables are used for. It also relates
the state of the member variables to the class interface.
<br/>
<br/>
For example, you might see a line in this section that says "my_size == size()". This just means
that the member variable my_size always contains the value returned by the size() function.
</ul>
<br/><li/> <b> "initial value for its type" </b>
<ul>
I frequently say that after a function executes some variable or argument will have an
initial value for its type. This makes sense for objects with a user defined constructor,
but for anything else not so much. Therefore the initial value of a type with no user defined
constructor is undefined.
</ul>
</ul>
<!-- **************************** ORGANIZATION SECTION **************************** -->
<h1>Organization</h1>
<p>
The library can be thought of as a collection of components.
Each component consists of one "kernel" specification that defines exactly what the
component's interface looks like and what it does. Additionally each component may
have extensions to its kernel. Each kernel and extension specification can have many implementations.
</p>
<ul>
<li/> <b>File organization</b>
<ul>
Each component gets its own folder and one file in the root of the directory tree.
<br/><br/>
I will use the <a href="containers.html#queue">queue</a> object as a typical example and
explain what each of its files contain.
Below is the directory structure and all the files related to the queue component.
<br/><br/>
<ul><li/> <b> file tree </b>
<ul>
<li/> dlib/
<ul>
<li/> queue.h
<li/> queue/
<ul>
<li/> queue_kernel_abstract.h
<li/> queue_kernel_1.h
<li/> queue_kernel_2.h
<li/> queue_kernel_c.h
<li/> queue_sort_abstract.h
<li/> queue_sort_1.h
</ul>
</ul>
</ul>
<br/>
<li/> <a href="dlib/queue.h.html">queue.h</a>
<ul> This file does not contain any executable code. All it does is define the typedefs such as
kernel_1a, kernel_1a_c, etc... for the queue object. See the <a href="#creating_objects">Creating Objects</a>
section to learn what these typedefs are for.
</ul>
<li/> <a href="dlib/queue/queue_kernel_abstract.h.html"> queue_kernel_abstract.h </a>
<ul>
This file does not contain any code. It even has preprocessor directives that prevent
any of its contents from being included.
<br/>
<br/>
The purpose of this file is to define exactly what a queue object does and what its
interface is.
</ul>
<li/> <a href="dlib/queue/queue_sort_abstract.h.html"> queue_sort_abstract.h </a>
<ul>
This file also doesn't contain any code. Its only purpose is to define the sort
extension to queue objects.
</ul>
<li/> <a href="dlib/queue/queue_kernel_1.h.html"> queue_kernel_1.h </a>
<ul>
This file contains an implementation of the queue kernel specification found
in queue_kernel_abstract.h
</ul>
<li/> <a href="dlib/queue/queue_kernel_2.h.html"> queue_kernel_2.h </a>
<ul>
This file contains another implementation of the queue kernel specification found
in queue_kernel_abstract.h
</ul>
<li/> <a href="dlib/queue/queue_sort_1.h.html"> queue_sort_1.h </a>
<ul>
This file contains an implementation of the queue sort extension specification found
in queue_sort_abstract.h
</ul>
<li/> <a href="dlib/queue/queue_kernel_c.h.html"> queue_kernel_c.h </a>
<ul>
This file contains a templated class which wraps any implementation of the queue kernel
specification. It is used during debugging to check that the requires clauses are never
violated.
</ul>
</ul>
</ul>
</ul>
<!-- **************************** CREATING OBJECTS SECTION **************************** -->
<anchor>creating_objects</anchor>
<h1>Creating Objects</h1>
<p>
To create many of the objects in this library you need to choose which kernel implementation you would like and if you
want the checking version or any extensions.
</p>
<p>
To make this easy there are header files which define typedefs of all this stuff. For
example, to create a queue of ints using queue kernel implementation 1 you would type
<tt>dlib::queue&lt;int&gt;::kernel_1a my_queue;</tt>. Or to get the debugging/checking version you
would type <tt>dlib::queue&lt;int&gt;::kernel_1a_c my_queue;</tt>.
</p>
<p>
There can be a lot of different typedefs for each component. You can find a list of them
in the section for the component in question. For the queue component they can be found
<a href="containers.html#queue">here</a>.
</p>
<p>
None of the above applies to the API components (or any global functions or objects that don't list multiple implemenations
in their documenation). To use/create them you just need to include
the appropriate headers. For example, to create a mutex object from the <a href="api.html#threads">
threads</a> component you would simply type <tt>dlib::mutex my_mutex;</tt>. There is no
need to specify which kernel implementation. The correct kernel implementation
is determined by which platform you compile under. There are also no explicit checking versions
of the API components. However, there are <a href="metaprogramming.html#DLIB_ASSERT">DLIB_ASSERT</a> statements that perform checking and you can
enable them by #defining DEBUG or ENABLE_ASSERTS.
</p>
<!-- **************************** ASSUMPTIONS SECTION **************************** -->
<h1>Assumptions</h1>
There are some restrictions on the behavior of certain objects or functions.
Rather than replicating these restrictions all over the place in my documentation they
are listed here.
<ul>
<li/> <b> global swap() </b>
<ul>
It is assumed that this operator does not throw. Undefined behavior results if it does.
Note that std::swap() for all intrinsics and std::string does not throw.
</ul>
<br/><li/> <b> operator&lt;() </b>
<ul>
It is assumed that this operator (or std::less or any similar functor supplied by you to the library)
does not throw. Undefined behavior results if it does.
</ul>
<br/><li/> <b> dlib::general_hash </b>
<ul>
It is assumed that general_hash does not throw. Undefined behavior results if it does.
This is actually noted in the general hash spec file but I'm listing it here also for good measure.
</ul>
</ul>
<!-- **************************** THREAD SAFETY SECTION **************************** -->
<anchor>thread_safety</anchor>
<h1>Thread Safety</h1>
<p>
In the library there are three kinds of objects with regards to threading. There are objects
that are completely thread safe. Then there are objects that are not thread safe but can be
used if access to them is serialized using a mutex. Lastly, there are objects which share
some kind of global resource or are reference counted. The last kind of object is
extremely thread unfriendly and can only be used in a threaded program with great care.
</p>
<p>
How do you know which components/objects are thread safe and which aren't? The rule is that if
the specification for the component doesn't mention threading or thread safety then
it is ok to use as long as you serialize access to it. If the component might have
some global resources or be reference counted then the specifications will tell you this.
And lastly if the component is thread safe then the specification will tell you this also.
</p>
</body>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Introduction</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<!-- **************************** OVERVIEW SECTION **************************** -->
<h1>Overview</h1>
<p>
This library is a collection of various C++ objects I have created and found to be useful
over the last few years. Generally speaking, there is no focus on any specific domain
in the library, it mostly contains general utility sorts of things. One of the bigger
and more notable features is the API abstraction layer which allows you to create portable applications
that make use of TCP sockets, threads, file browsing, and simple graphical user interfaces. There
is, however, much more than just that.
</p>
<p>
This library also aims to be simple, portable, and modern. Everything is developed with the
<a href="http://en.wikipedia.org/wiki/Design_by_contract">Design by Contract</a>
methodology. You can read about Design by Contract on the internet
for more information but from
the point of view of a user of this library it basically means that there exists complete and precise
documentation and aggressive debugging modes that can be enabled.
</p>
<p>
I always try to make sure everything is as portable as possible. All platform specific code is
confined inside the API wrappers. Everything else is either layered on top of those wrappers
or is written in pure ISO standard C++. Currently the library is known to work on OS X,
MS Windows, Linux, Solaris, the BSDs, and HP-UX. It should work on any POSIX platform but I
haven't had the opportunity to test it on any others (if you have access to other platforms and
would like to help increase this list then let me know).
</p>
<p>
The rest of this page explains everything you need to know to get started using the library. It
explains where to find the documentation for each object/function and how to interpret
what you find there. For help compiling with dlib check out the <a href="compile.html">how to compile</a>
page. Or if you are having trouble finding where a particular object's documentation is located you may
be able to find it by consulting the <a href="term_index.html">index</a>.</p>
<p>
The library is also covered by the very liberal Boost Software License so feel free to use it
however you like.
</p>
<p>
Much of the organization and notation used in this library I learned from the
<a href="http://www.cse.ohio-state.edu/~weide/sce/now/">Software Component Engineering</a>
course sequence at OSU. As such, this library is heavily influenced by the Design by Contract and
generic programming methodologies.
</p>
<!-- **************************** NOTATION SECTION **************************** -->
<h1>Notation</h1>
<p>
For the most part I try to document my code in a way that any C++ programmer would understand
but for the sake of brevity I use some of the following uncommon notation.
</p>
<ul>
<li/><b> kernel, extension, and abstract </b>
<ul>
Each component of the library has a specification which defines its core behavior and interface. This
specification defines what is called the component's kernel. Additionally, each component may have any number of
extensions. An extension is essentially a specification for something that layers functionality on top of the
kernel of a component.
<br/>
<br/> In the naming of files I use the word abstract to indicate that a file
contains a specification of a kernel component or extension rather than an actual implementation.
</ul>
<br/><li/><b>/*! comments like this !*/</b>
<ul>
This is just for "formal comments." Generally these appear after a function prototype and contain
the requires/ensures stuff or at the top of a class and tell you general things about the class.
</ul>
<br/><li/> <b> requires/ensures/throws </b>
<ul>
These words appear in the formal comment following function prototypes and have the following meanings.
<br/><u>requires</u>: This defines a list of requirements for calling the function. These requirements
MUST be met or a call to the function has undefined results. (note that when the checking/debugging modes
are enabled on an object then it will throw the dlib::fatal_error exception with fatal_error::type == EBROKEN_ASSERT when the requires clause is
broken rather than causing "undefined results")
<br/><u>ensures</u>: This defines what the function does. It is a list of conditions that will be
true after the function finishes executing. Note that if an exception is thrown or the function returns
indicating an error occurred then nothing in the ensures clause is guaranteed to be true.
<br/><u>throws</u>: This defines what exceptions may be thrown by this function. It generally
tells you why the exception might be thrown. It also tells you what the function does in this event:
Does it have no effect at all? Does it corrupt any objects? etc...
<br/>
<br/>
Sometimes these blocks do not appear in the formal comment. The meanings in these cases are as follows:
<br/><u>missing requires</u>: There are no requirements, you may put anything in the function arguments.
<br/><u>missing ensures</u>: This means that the effects of the function are unspecified. This is often used
for call backs where the client programmer implements the actual function.
<br/><u>missing throws</u>: This means that the function does not throw anything.
<br/>
<br/>
So in summary, the requires clause must always be satisfied, the ensures clause tells you what the
function does when it does <i>not</i> throw or return an error, and the throws clause tells you what happens when the function
<i>does</i> throw.
</ul>
<br/><li/> <anchor>meaning_of_hash</anchor> <b> meaning of # symbol </b>
<ul>
I use this as a prefix on identifiers to make reference to the value of the identifier "after"
some event has occurred.
<br/><br/>
The most common place I use this notation is inside the formal comment following a function prototype.
If the # symbol appears in a requires/ensures/throws block then it means the value of
the identifier after the function has finished, otherwise all references to an identifier
refer to its value before the function was called.
<br/><br/>
An example will make it clear.
<pre><font color='#3333FF'>int</font> <b>funct</b><font face="Lucida Console">(</font>
<font color='#3333FF'> int</font>&amp; something
<font face="Lucida Console">);</font>
<font color='#009900'>/*!
requires
- something &gt; 4
ensures
- #some_other_function() == 9
- #funct() == something
- #something == something + 1
!*/</font>
</pre>
This says that funct() requires that "something" be greater than 4, that funct() will increment "something"
by 1, and funct() returns the original value of something. It also says that
<i>after</i> the call to funct() ends a call to some_other_function() will return the value 9.
</ul>
<br/><li/> <anchor>CONVENTION</anchor> <b> CONVENTION </b>
<ul>
This is a section of the formal comment which appears at the top of all classes which are
actual implementations (as opposed to specifications). This section of the comment contains
a list of invariants that tell you what the member variables are used for. It also relates
the state of the member variables to the class interface.
<br/>
<br/>
For example, you might see a line in this section that says "my_size == size()". This just means
that the member variable my_size always contains the value returned by the size() function.
</ul>
<br/><li/> <b> "initial value for its type" </b>
<ul>
I frequently say that after a function executes some variable or argument will have an
initial value for its type. This makes sense for objects with a user defined constructor,
but for anything else not so much. Therefore the initial value of a type with no user defined
constructor is undefined.
</ul>
</ul>
<!-- **************************** ORGANIZATION SECTION **************************** -->
<h1>Organization</h1>
<p>
The library can be thought of as a collection of components.
Each component consists of one "kernel" specification that defines exactly what the
component's interface looks like and what it does. Additionally each component may
have extensions to its kernel. Each kernel and extension specification can have many implementations.
</p>
<ul>
<li/> <b>File organization</b>
<ul>
Each component gets its own folder and one file in the root of the directory tree.
<br/><br/>
I will use the <a href="containers.html#queue">queue</a> object as a typical example and
explain what each of its files contain.
Below is the directory structure and all the files related to the queue component.
<br/><br/>
<ul><li/> <b> file tree </b>
<ul>
<li/> dlib/
<ul>
<li/> queue.h
<li/> queue/
<ul>
<li/> queue_kernel_abstract.h
<li/> queue_kernel_1.h
<li/> queue_kernel_2.h
<li/> queue_kernel_c.h
<li/> queue_sort_abstract.h
<li/> queue_sort_1.h
</ul>
</ul>
</ul>
<br/>
<li/> <a href="dlib/queue.h.html">queue.h</a>
<ul> This file does not contain any executable code. All it does is define the typedefs such as
kernel_1a, kernel_1a_c, etc... for the queue object. See the <a href="#creating_objects">Creating Objects</a>
section to learn what these typedefs are for.
</ul>
<li/> <a href="dlib/queue/queue_kernel_abstract.h.html"> queue_kernel_abstract.h </a>
<ul>
This file does not contain any code. It even has preprocessor directives that prevent
any of its contents from being included.
<br/>
<br/>
The purpose of this file is to define exactly what a queue object does and what its
interface is.
</ul>
<li/> <a href="dlib/queue/queue_sort_abstract.h.html"> queue_sort_abstract.h </a>
<ul>
This file also doesn't contain any code. Its only purpose is to define the sort
extension to queue objects.
</ul>
<li/> <a href="dlib/queue/queue_kernel_1.h.html"> queue_kernel_1.h </a>
<ul>
This file contains an implementation of the queue kernel specification found
in queue_kernel_abstract.h
</ul>
<li/> <a href="dlib/queue/queue_kernel_2.h.html"> queue_kernel_2.h </a>
<ul>
This file contains another implementation of the queue kernel specification found
in queue_kernel_abstract.h
</ul>
<li/> <a href="dlib/queue/queue_sort_1.h.html"> queue_sort_1.h </a>
<ul>
This file contains an implementation of the queue sort extension specification found
in queue_sort_abstract.h
</ul>
<li/> <a href="dlib/queue/queue_kernel_c.h.html"> queue_kernel_c.h </a>
<ul>
This file contains a templated class which wraps any implementation of the queue kernel
specification. It is used during debugging to check that the requires clauses are never
violated.
</ul>
</ul>
</ul>
</ul>
<!-- **************************** CREATING OBJECTS SECTION **************************** -->
<anchor>creating_objects</anchor>
<h1>Creating Objects</h1>
<p>
To create many of the objects in this library you need to choose which kernel implementation you would like and if you
want the checking version or any extensions.
</p>
<p>
To make this easy there are header files which define typedefs of all this stuff. For
example, to create a queue of ints using queue kernel implementation 1 you would type
<tt>dlib::queue&lt;int&gt;::kernel_1a my_queue;</tt>. Or to get the debugging/checking version you
would type <tt>dlib::queue&lt;int&gt;::kernel_1a_c my_queue;</tt>.
</p>
<p>
There can be a lot of different typedefs for each component. You can find a list of them
in the section for the component in question. For the queue component they can be found
<a href="containers.html#queue">here</a>.
</p>
<p>
None of the above applies to the API components (or any global functions or objects that don't list multiple implemenations
in their documenation). To use/create them you just need to include
the appropriate headers. For example, to create a mutex object from the <a href="api.html#threads">
threads</a> component you would simply type <tt>dlib::mutex my_mutex;</tt>. There is no
need to specify which kernel implementation. The correct kernel implementation
is determined by which platform you compile under. There are also no explicit checking versions
of the API components. However, there are <a href="metaprogramming.html#DLIB_ASSERT">DLIB_ASSERT</a> statements that perform checking and you can
enable them by #defining DEBUG or ENABLE_ASSERTS.
</p>
<!-- **************************** ASSUMPTIONS SECTION **************************** -->
<h1>Assumptions</h1>
There are some restrictions on the behavior of certain objects or functions.
Rather than replicating these restrictions all over the place in my documentation they
are listed here.
<ul>
<li/> <b> global swap() </b>
<ul>
It is assumed that this operator does not throw. Undefined behavior results if it does.
Note that std::swap() for all intrinsics and std::string does not throw.
</ul>
<br/><li/> <b> operator&lt;() </b>
<ul>
It is assumed that this operator (or std::less or any similar functor supplied by you to the library)
does not throw. Undefined behavior results if it does.
</ul>
<br/><li/> <b> dlib::general_hash </b>
<ul>
It is assumed that general_hash does not throw. Undefined behavior results if it does.
This is actually noted in the general hash spec file but I'm listing it here also for good measure.
</ul>
</ul>
<!-- **************************** THREAD SAFETY SECTION **************************** -->
<anchor>thread_safety</anchor>
<h1>Thread Safety</h1>
<p>
In the library there are three kinds of objects with regards to threading. There are objects
that are completely thread safe. Then there are objects that are not thread safe but can be
used if access to them is serialized using a mutex. Lastly, there are objects which share
some kind of global resource or are reference counted. The last kind of object is
extremely thread unfriendly and can only be used in a threaded program with great care.
</p>
<p>
How do you know which components/objects are thread safe and which aren't? The rule is that if
the specification for the component doesn't mention threading or thread safety then
it is ok to use as long as you serialize access to it. If the component might have
some global resources or be reference counted then the specifications will tell you this.
And lastly if the component is thread safe then the specification will tell you this also.
</p>
</body>
<!-- ************************************************************************* -->
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 86995 4.576 no
play: 125179 75430 4.82062 no
html: 24603 16209 5.27058 no
Csrc: 11150 7084 5.08269 no
list: 3721 2224 4.78151 no
Excl: 1029744 440758 3.42421 no
tech: 426754 248345 4.65552 no
poem: 481861 273394 4.53897 no
fax: 513216 75036 1.16966 no
SPRC: 38240 25660 5.3682 no
man: 4227 2663 5.03998 no
average: 4.42981
time: 875ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 72533 5.21534 no
book1: 768771 435527 4.53219 no
book2: 610856 364597 4.7749 no
geo: 102400 72600 5.67188 no
news: 377109 244377 5.18422 no
obj1: 21504 16183 6.02046 no
obj2: 246814 189902 6.15531 no
paper1: 53161 33144 4.98772 no
paper2: 82199 47398 4.613 no
pic: 513216 75036 1.16966 no
progc: 39611 25885 5.22784 no
progl: 71646 42688 4.76655 no
progp: 49379 30180 4.88953 no
trans: 93695 64603 5.51603 no
average: 4.9089
time: 1.11sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 20 0.0016 no
alphabet: 100000 58912 4.71296 no
random: 100000 75202 6.01616 no
average: 16.6827
time: 93ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1162352 2.00462 no
bible: 4047392 2194059 4.33674 no
word: 2473400 1542086 4.98774 no
average: 3.77637
time: 3.766sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 86995 4.576 no
play: 125179 75430 4.82062 no
html: 24603 16209 5.27058 no
Csrc: 11150 7084 5.08269 no
list: 3721 2224 4.78151 no
Excl: 1029744 440758 3.42421 no
tech: 426754 248345 4.65552 no
poem: 481861 273394 4.53897 no
fax: 513216 75036 1.16966 no
SPRC: 38240 25660 5.3682 no
man: 4227 2663 5.03998 no
average: 4.42981
time: 875ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 72533 5.21534 no
book1: 768771 435527 4.53219 no
book2: 610856 364597 4.7749 no
geo: 102400 72600 5.67188 no
news: 377109 244377 5.18422 no
obj1: 21504 16183 6.02046 no
obj2: 246814 189902 6.15531 no
paper1: 53161 33144 4.98772 no
paper2: 82199 47398 4.613 no
pic: 513216 75036 1.16966 no
progc: 39611 25885 5.22784 no
progl: 71646 42688 4.76655 no
progp: 49379 30180 4.88953 no
trans: 93695 64603 5.51603 no
average: 4.9089
time: 1.11sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 20 0.0016 no
alphabet: 100000 58912 4.71296 no
random: 100000 75202 6.01616 no
average: 16.6827
time: 93ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1162352 2.00462 no
bible: 4047392 2194059 4.33674 no
word: 2473400 1542086 4.98774 no
average: 3.77637
time: 3.766sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1a</title>
<body from_file="kernel_1a.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1a</title>
<body from_file="kernel_1a.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 66165 3.48033 no
play: 125179 54572 3.48761 no
html: 24603 11661 3.79173 no
Csrc: 11150 4733 3.39587 no
list: 3721 1629 3.50228 no
Excl: 1029744 343447 2.66821 no
tech: 426754 188332 3.5305 no
poem: 481861 204240 3.39085 no
fax: 513216 54127 0.843731 no
SPRC: 38240 18307 3.82992 no
man: 4227 2100 3.97445 no
average: 3.26323
time: 844ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 48130 3.46069 no
book1: 768771 346572 3.6065 no
book2: 610856 288605 3.77968 no
geo: 102400 61124 4.77531 no
news: 377109 196085 4.15975 no
obj1: 21504 12445 4.62984 no
obj2: 246814 127142 4.12106 no
paper1: 53161 25438 3.82807 no
paper2: 82199 37295 3.62973 no
pic: 513216 54127 0.843731 no
progc: 39611 19090 3.85549 no
progl: 71646 29773 3.32446 no
progp: 49379 20795 3.36904 no
trans: 93695 40922 3.49406 no
average: 3.6341
time: 1.109sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 20 0.0016 no
alphabet: 100000 83 0.00664 no
random: 100000 77775 6.222 no
average: 15.5576
time: 94ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1151913 1.98662 no
bible: 4047392 1651476 3.26428 no
word: 2473400 1133090 3.66488 no
average: 2.97193
time: 3.672sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 66165 3.48033 no
play: 125179 54572 3.48761 no
html: 24603 11661 3.79173 no
Csrc: 11150 4733 3.39587 no
list: 3721 1629 3.50228 no
Excl: 1029744 343447 2.66821 no
tech: 426754 188332 3.5305 no
poem: 481861 204240 3.39085 no
fax: 513216 54127 0.843731 no
SPRC: 38240 18307 3.82992 no
man: 4227 2100 3.97445 no
average: 3.26323
time: 844ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 48130 3.46069 no
book1: 768771 346572 3.6065 no
book2: 610856 288605 3.77968 no
geo: 102400 61124 4.77531 no
news: 377109 196085 4.15975 no
obj1: 21504 12445 4.62984 no
obj2: 246814 127142 4.12106 no
paper1: 53161 25438 3.82807 no
paper2: 82199 37295 3.62973 no
pic: 513216 54127 0.843731 no
progc: 39611 19090 3.85549 no
progl: 71646 29773 3.32446 no
progp: 49379 20795 3.36904 no
trans: 93695 40922 3.49406 no
average: 3.6341
time: 1.109sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 20 0.0016 no
alphabet: 100000 83 0.00664 no
random: 100000 77775 6.222 no
average: 15.5576
time: 94ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1151913 1.98662 no
bible: 4047392 1651476 3.26428 no
word: 2473400 1133090 3.66488 no
average: 2.97193
time: 3.672sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1b</title>
<body from_file="kernel_1b.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1b</title>
<body from_file="kernel_1b.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 51810 2.72525 no
play: 125179 44002 2.8121 no
html: 24603 8602 2.79706 no
Csrc: 11150 3399 2.43874 no
list: 3721 1272 2.73475 no
Excl: 1029744 237165 1.84252 no
tech: 426754 147090 2.75737 no
poem: 481861 169981 2.82208 no
fax: 513216 54230 0.845336 no
SPRC: 38240 15190 3.17782 no
man: 4227 1763 3.33665 no
average: 2.57179
time: 1.031sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 37264 2.67939 no
book1: 768771 280052 2.91428 no
book2: 610856 221616 2.90237 no
geo: 102400 62115 4.85273 no
news: 377109 155282 3.29416 no
obj1: 21504 11235 4.17969 no
obj2: 246814 97319 3.15441 no
paper1: 53161 19664 2.95916 no
paper2: 82199 29837 2.90388 no
pic: 513216 54230 0.845336 no
progc: 39611 14610 2.9507 no
progl: 71646 21637 2.41599 no
progp: 49379 14204 2.30122 no
trans: 93695 27848 2.37776 no
average: 2.90936
time: 1.297sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 18 0.00144 no
alphabet: 100000 65 0.0052 no
random: 100000 90704 7.25632 no
average: 15.8157
time: 203ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1141437 1.96855 no
bible: 4047392 1263237 2.49689 no
word: 2473400 876621 2.83536 no
average: 2.4336
time: 3.391sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 51810 2.72525 no
play: 125179 44002 2.8121 no
html: 24603 8602 2.79706 no
Csrc: 11150 3399 2.43874 no
list: 3721 1272 2.73475 no
Excl: 1029744 237165 1.84252 no
tech: 426754 147090 2.75737 no
poem: 481861 169981 2.82208 no
fax: 513216 54230 0.845336 no
SPRC: 38240 15190 3.17782 no
man: 4227 1763 3.33665 no
average: 2.57179
time: 1.031sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 37264 2.67939 no
book1: 768771 280052 2.91428 no
book2: 610856 221616 2.90237 no
geo: 102400 62115 4.85273 no
news: 377109 155282 3.29416 no
obj1: 21504 11235 4.17969 no
obj2: 246814 97319 3.15441 no
paper1: 53161 19664 2.95916 no
paper2: 82199 29837 2.90388 no
pic: 513216 54230 0.845336 no
progc: 39611 14610 2.9507 no
progl: 71646 21637 2.41599 no
progp: 49379 14204 2.30122 no
trans: 93695 27848 2.37776 no
average: 2.90936
time: 1.297sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 18 0.00144 no
alphabet: 100000 65 0.0052 no
random: 100000 90704 7.25632 no
average: 15.8157
time: 203ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1141437 1.96855 no
bible: 4047392 1263237 2.49689 no
word: 2473400 876621 2.83536 no
average: 2.4336
time: 3.391sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1c</title>
<body from_file="kernel_1c.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1c</title>
<body from_file="kernel_1c.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 45580 2.39754 no
play: 125179 42432 2.71176 no
html: 24603 7745 2.51839 no
Csrc: 11150 3165 2.27085 no
list: 3721 1238 2.66165 no
Excl: 1029744 194875 1.51397 no
tech: 426754 111838 2.09653 no
poem: 481861 148110 2.45897 no
fax: 513216 56075 0.874096 no
SPRC: 38240 14248 2.98075 no
man: 4227 1736 3.28555 no
average: 2.34273
time: 1.812sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 29161 2.09676 no
book1: 768771 235667 2.4524 no
book2: 610856 165032 2.16132 no
geo: 102400 67663 5.28617 no
news: 377109 128148 2.71853 no
obj1: 21504 10750 3.99926 no
obj2: 246814 82894 2.68685 no
paper1: 53161 17398 2.61816 no
paper2: 82199 26449 2.57414 no
pic: 513216 56075 0.874096 no
progc: 39611 13188 2.6635 no
progl: 71646 17135 1.9133 no
progp: 49379 11764 1.90591 no
trans: 93695 19602 1.67369 no
average: 2.54458
time: 2.36sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 6 48 no
aaa: 100000 19 0.00152 no
alphabet: 100000 66 0.00528 no
random: 100000 89652 7.17216 no
average: 13.7947
time: 375ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1130363 1.94945 no
bible: 4047392 871537 1.72266 no
word: 2473400 589688 1.9073 no
average: 1.8598
time: 4.484sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 45580 2.39754 no
play: 125179 42432 2.71176 no
html: 24603 7745 2.51839 no
Csrc: 11150 3165 2.27085 no
list: 3721 1238 2.66165 no
Excl: 1029744 194875 1.51397 no
tech: 426754 111838 2.09653 no
poem: 481861 148110 2.45897 no
fax: 513216 56075 0.874096 no
SPRC: 38240 14248 2.98075 no
man: 4227 1736 3.28555 no
average: 2.34273
time: 1.812sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 29161 2.09676 no
book1: 768771 235667 2.4524 no
book2: 610856 165032 2.16132 no
geo: 102400 67663 5.28617 no
news: 377109 128148 2.71853 no
obj1: 21504 10750 3.99926 no
obj2: 246814 82894 2.68685 no
paper1: 53161 17398 2.61816 no
paper2: 82199 26449 2.57414 no
pic: 513216 56075 0.874096 no
progc: 39611 13188 2.6635 no
progl: 71646 17135 1.9133 no
progp: 49379 11764 1.90591 no
trans: 93695 19602 1.67369 no
average: 2.54458
time: 2.36sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 6 48 no
aaa: 100000 19 0.00152 no
alphabet: 100000 66 0.00528 no
random: 100000 89652 7.17216 no
average: 13.7947
time: 375ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1130363 1.94945 no
bible: 4047392 871537 1.72266 no
word: 2473400 589688 1.9073 no
average: 1.8598
time: 4.484sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1da</title>
<body from_file="kernel_1da.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1da</title>
<body from_file="kernel_1da.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 47843 2.51658 no
play: 125179 45069 2.88029 no
html: 24603 7914 2.57334 no
Csrc: 11150 3279 2.35265 no
list: 3721 1281 2.7541 no
Excl: 1029744 210286 1.6337 no
tech: 426754 115826 2.17129 no
poem: 481861 157348 2.61234 no
fax: 513216 56477 0.880362 no
SPRC: 38240 14466 3.02636 no
man: 4227 1780 3.36882 no
average: 2.43362
time: 2.296sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 29758 2.13969 no
book1: 768771 247700 2.57762 no
book2: 610856 168694 2.20928 no
geo: 102400 67817 5.2982 no
news: 377109 126675 2.68729 no
obj1: 21504 10871 4.04427 no
obj2: 246814 82948 2.6886 no
paper1: 53161 18113 2.72576 no
paper2: 82199 27700 2.6959 no
pic: 513216 56477 0.880362 no
progc: 39611 13622 2.75115 no
progl: 71646 17263 1.92759 no
progp: 49379 12032 1.94933 no
trans: 93695 19505 1.6654 no
average: 2.5886
time: 2.86sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 6 48 no
aaa: 100000 20 0.0016 no
alphabet: 100000 66 0.00528 no
random: 100000 88475 7.078 no
average: 13.7712
time: 531ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1130433 1.94957 no
bible: 4047392 844807 1.66983 no
word: 2473400 504129 1.63056 no
average: 1.74999
time: 5.266sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 47843 2.51658 no
play: 125179 45069 2.88029 no
html: 24603 7914 2.57334 no
Csrc: 11150 3279 2.35265 no
list: 3721 1281 2.7541 no
Excl: 1029744 210286 1.6337 no
tech: 426754 115826 2.17129 no
poem: 481861 157348 2.61234 no
fax: 513216 56477 0.880362 no
SPRC: 38240 14466 3.02636 no
man: 4227 1780 3.36882 no
average: 2.43362
time: 2.296sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 29758 2.13969 no
book1: 768771 247700 2.57762 no
book2: 610856 168694 2.20928 no
geo: 102400 67817 5.2982 no
news: 377109 126675 2.68729 no
obj1: 21504 10871 4.04427 no
obj2: 246814 82948 2.6886 no
paper1: 53161 18113 2.72576 no
paper2: 82199 27700 2.6959 no
pic: 513216 56477 0.880362 no
progc: 39611 13622 2.75115 no
progl: 71646 17263 1.92759 no
progp: 49379 12032 1.94933 no
trans: 93695 19505 1.6654 no
average: 2.5886
time: 2.86sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 6 48 no
aaa: 100000 20 0.0016 no
alphabet: 100000 66 0.00528 no
random: 100000 88475 7.078 no
average: 13.7712
time: 531ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1130433 1.94957 no
bible: 4047392 844807 1.66983 no
word: 2473400 504129 1.63056 no
average: 1.74999
time: 5.266sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1db</title>
<body from_file="kernel_1db.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1db</title>
<body from_file="kernel_1db.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 40695 2.14059 no
play: 125179 37421 2.39152 no
html: 24603 6859 2.2303 no
Csrc: 11150 2792 2.00323 no
list: 3721 1084 2.33056 no
Excl: 1029744 156897 1.21892 no
tech: 426754 102805 1.9272 no
poem: 481861 136664 2.26894 no
fax: 513216 51109 0.796686 no
SPRC: 38240 12590 2.63389 no
man: 4227 1530 2.89567 no
average: 2.07614
time: 3.062sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 26039 1.87228 no
book1: 768771 218772 2.27659 no
book2: 610856 151985 1.99045 no
geo: 102400 59371 4.63836 no
news: 377109 115334 2.4467 no
obj1: 21504 9832 3.65774 no
obj2: 246814 75065 2.43309 no
paper1: 53161 15263 2.29687 no
paper2: 82199 23368 2.27429 no
pic: 513216 51109 0.796686 no
progc: 39611 11549 2.33248 no
progl: 71646 15297 1.70806 no
progp: 49379 10447 1.69254 no
trans: 93695 17677 1.50932 no
average: 2.28039
time: 4.172sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 17 0.00136 no
alphabet: 100000 65 0.0052 no
random: 100000 82599 6.60792 no
average: 15.6536
time: 672ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1130095 1.94899 no
bible: 4047392 848956 1.67803 no
word: 2473400 542983 1.75623 no
average: 1.79442
time: 6.516sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 40695 2.14059 no
play: 125179 37421 2.39152 no
html: 24603 6859 2.2303 no
Csrc: 11150 2792 2.00323 no
list: 3721 1084 2.33056 no
Excl: 1029744 156897 1.21892 no
tech: 426754 102805 1.9272 no
poem: 481861 136664 2.26894 no
fax: 513216 51109 0.796686 no
SPRC: 38240 12590 2.63389 no
man: 4227 1530 2.89567 no
average: 2.07614
time: 3.062sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 26039 1.87228 no
book1: 768771 218772 2.27659 no
book2: 610856 151985 1.99045 no
geo: 102400 59371 4.63836 no
news: 377109 115334 2.4467 no
obj1: 21504 9832 3.65774 no
obj2: 246814 75065 2.43309 no
paper1: 53161 15263 2.29687 no
paper2: 82199 23368 2.27429 no
pic: 513216 51109 0.796686 no
progc: 39611 11549 2.33248 no
progl: 71646 15297 1.70806 no
progp: 49379 10447 1.69254 no
trans: 93695 17677 1.50932 no
average: 2.28039
time: 4.172sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 17 0.00136 no
alphabet: 100000 65 0.0052 no
random: 100000 82599 6.60792 no
average: 15.6536
time: 672ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1130095 1.94899 no
bible: 4047392 848956 1.67803 no
word: 2473400 542983 1.75623 no
average: 1.79442
time: 6.516sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1ea</title>
<body from_file="kernel_1ea.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1ea</title>
<body from_file="kernel_1ea.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 40220 2.1156 no
play: 125179 37451 2.39344 no
html: 24603 6819 2.21729 no
Csrc: 11150 2770 1.98744 no
list: 3721 1085 2.33271 no
Excl: 1029744 158436 1.23088 no
tech: 426754 100243 1.87917 no
poem: 481861 136151 2.26042 no
fax: 513216 50374 0.785229 no
SPRC: 38240 12387 2.59142 no
man: 4227 1528 2.89189 no
average: 2.06232
time: 4.875sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 25279 1.81764 no
book1: 768771 216389 2.25179 no
book2: 610856 146986 1.92498 no
geo: 102400 58768 4.59125 no
news: 377109 109292 2.31852 no
obj1: 21504 9819 3.6529 no
obj2: 246814 72662 2.3552 no
paper1: 53161 15128 2.27656 no
paper2: 82199 23186 2.25657 no
pic: 513216 50374 0.785229 no
progc: 39611 11434 2.30926 no
progl: 71646 14712 1.64274 no
progp: 49379 10210 1.65414 no
trans: 93695 16885 1.4417 no
average: 2.23418
time: 5.421sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 17 0.00136 no
alphabet: 100000 64 0.00512 no
random: 100000 81881 6.55048 no
average: 15.6392
time: 907ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1129161 1.94738 no
bible: 4047392 794809 1.571 no
word: 2473400 454450 1.46988 no
average: 1.66275
time: 7.39sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 40220 2.1156 no
play: 125179 37451 2.39344 no
html: 24603 6819 2.21729 no
Csrc: 11150 2770 1.98744 no
list: 3721 1085 2.33271 no
Excl: 1029744 158436 1.23088 no
tech: 426754 100243 1.87917 no
poem: 481861 136151 2.26042 no
fax: 513216 50374 0.785229 no
SPRC: 38240 12387 2.59142 no
man: 4227 1528 2.89189 no
average: 2.06232
time: 4.875sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 25279 1.81764 no
book1: 768771 216389 2.25179 no
book2: 610856 146986 1.92498 no
geo: 102400 58768 4.59125 no
news: 377109 109292 2.31852 no
obj1: 21504 9819 3.6529 no
obj2: 246814 72662 2.3552 no
paper1: 53161 15128 2.27656 no
paper2: 82199 23186 2.25657 no
pic: 513216 50374 0.785229 no
progc: 39611 11434 2.30926 no
progl: 71646 14712 1.64274 no
progp: 49379 10210 1.65414 no
trans: 93695 16885 1.4417 no
average: 2.23418
time: 5.421sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 17 0.00136 no
alphabet: 100000 64 0.00512 no
random: 100000 81881 6.55048 no
average: 15.6392
time: 907ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1129161 1.94738 no
bible: 4047392 794809 1.571 no
word: 2473400 454450 1.46988 no
average: 1.66275
time: 7.39sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1eb</title>
<body from_file="kernel_1eb.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1eb</title>
<body from_file="kernel_1eb.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 40367 2.12334 no
play: 125179 37785 2.41478 no
html: 24603 6828 2.22022 no
Csrc: 11150 2710 1.94439 no
list: 3721 1084 2.33056 no
Excl: 1029744 162760 1.26447 no
tech: 426754 100488 1.88376 no
poem: 481861 139110 2.30955 no
fax: 513216 50276 0.783701 no
SPRC: 38240 12219 2.55628 no
man: 4227 1533 2.90135 no
average: 2.06658
time: 5.484sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 25153 1.80858 no
book1: 768771 220128 2.2907 no
book2: 610856 146040 1.91259 no
geo: 102400 58737 4.58883 no
news: 377109 108774 2.30753 no
obj1: 21504 9823 3.65439 no
obj2: 246814 71148 2.30613 no
paper1: 53161 15116 2.27475 no
paper2: 82199 23346 2.27214 no
pic: 513216 50276 0.783701 no
progc: 39611 11351 2.29249 no
progl: 71646 14125 1.5772 no
progp: 49379 9966 1.61461 no
trans: 93695 16068 1.37194 no
average: 2.21826
time: 6.188sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 17 0.00136 no
alphabet: 100000 65 0.0052 no
random: 100000 81869 6.54952 no
average: 15.639
time: 1.109sec
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1160064 2.00068 no
bible: 4047392 760498 1.50319 no
word: 2473400 422419 1.36628 no
average: 1.62338
time: 11.203sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 40367 2.12334 no
play: 125179 37785 2.41478 no
html: 24603 6828 2.22022 no
Csrc: 11150 2710 1.94439 no
list: 3721 1084 2.33056 no
Excl: 1029744 162760 1.26447 no
tech: 426754 100488 1.88376 no
poem: 481861 139110 2.30955 no
fax: 513216 50276 0.783701 no
SPRC: 38240 12219 2.55628 no
man: 4227 1533 2.90135 no
average: 2.06658
time: 5.484sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 25153 1.80858 no
book1: 768771 220128 2.2907 no
book2: 610856 146040 1.91259 no
geo: 102400 58737 4.58883 no
news: 377109 108774 2.30753 no
obj1: 21504 9823 3.65439 no
obj2: 246814 71148 2.30613 no
paper1: 53161 15116 2.27475 no
paper2: 82199 23346 2.27214 no
pic: 513216 50276 0.783701 no
progc: 39611 11351 2.29249 no
progl: 71646 14125 1.5772 no
progp: 49379 9966 1.61461 no
trans: 93695 16068 1.37194 no
average: 2.21826
time: 6.188sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 7 56 no
aaa: 100000 17 0.00136 no
alphabet: 100000 65 0.0052 no
random: 100000 81869 6.54952 no
average: 15.639
time: 1.109sec
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1160064 2.00068 no
bible: 4047392 760498 1.50319 no
word: 2473400 422419 1.36628 no
average: 1.62338
time: 11.203sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1ec</title>
<body from_file="kernel_1ec.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_1ec</title>
<body from_file="kernel_1ec.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 55655 2.9275 no
play: 125179 49648 3.17293 no
html: 24603 8345 2.71349 no
Csrc: 11150 3514 2.52126 no
list: 3721 1379 2.96479 no
Excl: 1029744 72617 0.564156 no
tech: 426754 145403 2.72575 no
poem: 481861 196109 3.25586 no
fax: 513216 49740 0.775346 no
SPRC: 38240 13253 2.77259 no
man: 4227 1857 3.51455 no
average: 2.53711
time: 4.641sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 35687 2.566 no
book1: 768771 313140 3.2586 no
book2: 610856 210661 2.7589 no
geo: 102400 61070 4.77109 no
news: 377109 143307 3.04012 no
obj1: 21504 11004 4.09375 no
obj2: 246814 83289 2.69965 no
paper1: 53161 19433 2.9244 no
paper2: 82199 30671 2.98505 no
pic: 513216 49740 0.775346 no
progc: 39611 14142 2.85618 no
progl: 71646 17196 1.92011 no
progp: 49379 12045 1.95144 no
trans: 93695 19849 1.69478 no
average: 2.73539
time: 4.89sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 6 48 no
aaa: 100000 58 0.00464 no
alphabet: 100000 87 0.00696 no
random: 100000 77815 6.2252 no
average: 13.5592
time: 235ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1349400 2.32721 no
bible: 4047392 1206327 2.3844 no
word: 2473400 703195 2.27442 no
average: 2.32868
time: 8.75sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 55655 2.9275 no
play: 125179 49648 3.17293 no
html: 24603 8345 2.71349 no
Csrc: 11150 3514 2.52126 no
list: 3721 1379 2.96479 no
Excl: 1029744 72617 0.564156 no
tech: 426754 145403 2.72575 no
poem: 481861 196109 3.25586 no
fax: 513216 49740 0.775346 no
SPRC: 38240 13253 2.77259 no
man: 4227 1857 3.51455 no
average: 2.53711
time: 4.641sec
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 35687 2.566 no
book1: 768771 313140 3.2586 no
book2: 610856 210661 2.7589 no
geo: 102400 61070 4.77109 no
news: 377109 143307 3.04012 no
obj1: 21504 11004 4.09375 no
obj2: 246814 83289 2.69965 no
paper1: 53161 19433 2.9244 no
paper2: 82199 30671 2.98505 no
pic: 513216 49740 0.775346 no
progc: 39611 14142 2.85618 no
progl: 71646 17196 1.92011 no
progp: 49379 12045 1.95144 no
trans: 93695 19849 1.69478 no
average: 2.73539
time: 4.89sec
The Artificial Corpus
file size packed size bpb corruption
a: 1 6 48 no
aaa: 100000 58 0.00464 no
alphabet: 100000 87 0.00696 no
random: 100000 77815 6.2252 no
average: 13.5592
time: 235ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 1349400 2.32721 no
bible: 4047392 1206327 2.3844 no
word: 2473400 703195 2.27442 no
average: 2.32868
time: 8.75sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_2a</title>
<body from_file="kernel_2a.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_2a</title>
<body from_file="kernel_2a.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 118620 6.2395 no
play: 125179 103761 6.63121 no
html: 24603 14067 4.57408 no
Csrc: 11150 5805 4.16502 no
list: 3721 2142 4.60521 no
Excl: 1029744 390978 3.03748 no
tech: 426754 310347 5.81782 no
poem: 481861 435150 7.22449 no
fax: 513216 116298 1.81285 no
SPRC: 38240 23076 4.82762 no
man: 4227 3177 6.01278 no
average: 4.99528
time: 547ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 68949 4.95764 no
book1: 768771 683415 7.11177 no
book2: 610856 435186 5.69936 no
geo: 102400 105111 8.2118 no
news: 377109 266382 5.65103 no
obj1: 21504 15714 5.84598 no
obj2: 246814 139671 4.52717 no
paper1: 53161 37476 5.63962 no
paper2: 82199 63198 6.15073 no
pic: 513216 116298 1.81285 no
progc: 39611 25398 5.12948 no
progl: 71646 31905 3.56252 no
progp: 49379 20943 3.39302 no
trans: 93695 34056 2.90782 no
average: 5.04291
time: 610ms
The Artificial Corpus
file size packed size bpb corruption
a: 1 9 72 no
aaa: 100000 3771 0.30168 no
alphabet: 100000 486 0.03888 no
random: 100000 112491 8.99928 no
average: 20.335
time: 47ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 4752396 8.1961 no
bible: 4047392 2649303 5.23656 no
word: 2473400 1452177 4.69694 no
average: 6.0432
time: 2.5sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 118620 6.2395 no
play: 125179 103761 6.63121 no
html: 24603 14067 4.57408 no
Csrc: 11150 5805 4.16502 no
list: 3721 2142 4.60521 no
Excl: 1029744 390978 3.03748 no
tech: 426754 310347 5.81782 no
poem: 481861 435150 7.22449 no
fax: 513216 116298 1.81285 no
SPRC: 38240 23076 4.82762 no
man: 4227 3177 6.01278 no
average: 4.99528
time: 547ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 68949 4.95764 no
book1: 768771 683415 7.11177 no
book2: 610856 435186 5.69936 no
geo: 102400 105111 8.2118 no
news: 377109 266382 5.65103 no
obj1: 21504 15714 5.84598 no
obj2: 246814 139671 4.52717 no
paper1: 53161 37476 5.63962 no
paper2: 82199 63198 6.15073 no
pic: 513216 116298 1.81285 no
progc: 39611 25398 5.12948 no
progl: 71646 31905 3.56252 no
progp: 49379 20943 3.39302 no
trans: 93695 34056 2.90782 no
average: 5.04291
time: 610ms
The Artificial Corpus
file size packed size bpb corruption
a: 1 9 72 no
aaa: 100000 3771 0.30168 no
alphabet: 100000 486 0.03888 no
random: 100000 112491 8.99928 no
average: 20.335
time: 47ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 4752396 8.1961 no
bible: 4047392 2649303 5.23656 no
word: 2473400 1452177 4.69694 no
average: 6.0432
time: 2.5sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_3a</title>
<body from_file="kernel_3a.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_3a</title>
<body from_file="kernel_3a.txt"/>
<menu from_file="compression.xml"/>
</doc>
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 111537 5.86693 no
play: 125179 101457 6.48396 no
html: 24603 13914 4.52433 no
Csrc: 11150 5760 4.13274 no
list: 3721 2160 4.64391 no
Excl: 1029744 407466 3.16557 no
tech: 426754 291483 5.46419 no
poem: 481861 417897 6.93805 no
fax: 513216 114138 1.77918 no
SPRC: 38240 23184 4.85021 no
man: 4227 3159 5.97871 no
average: 4.89343
time: 734ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 63729 4.58231 no
book1: 768771 655227 6.81844 no
book2: 610856 409392 5.36155 no
geo: 102400 108099 8.44523 no
news: 377109 259065 5.49581 no
obj1: 21504 15768 5.86607 no
obj2: 246814 138564 4.49128 no
paper1: 53161 35901 5.40261 no
paper2: 82199 60291 5.86781 no
pic: 513216 114138 1.77918 no
progc: 39611 24984 5.04587 no
progl: 71646 31113 3.47408 no
progp: 49379 20772 3.36532 no
trans: 93695 33093 2.82559 no
average: 4.9158
time: 907ms
The Artificial Corpus
file size packed size bpb corruption
a: 1 9 72 no
aaa: 100000 3771 0.30168 no
alphabet: 100000 486 0.03888 no
random: 100000 112509 9.00072 no
average: 20.3353
time: 78ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 4747257 8.18724 no
bible: 4047392 2466675 4.87558 no
word: 2473400 1301805 4.21058 no
average: 5.7578
time: 3.25sec
<text>
The Canterbury Corpus
file size packed size bpb corruption
text: 152089 111537 5.86693 no
play: 125179 101457 6.48396 no
html: 24603 13914 4.52433 no
Csrc: 11150 5760 4.13274 no
list: 3721 2160 4.64391 no
Excl: 1029744 407466 3.16557 no
tech: 426754 291483 5.46419 no
poem: 481861 417897 6.93805 no
fax: 513216 114138 1.77918 no
SPRC: 38240 23184 4.85021 no
man: 4227 3159 5.97871 no
average: 4.89343
time: 734ms
The Calgary Corpus
file size packed size bpb corruption
bib: 111261 63729 4.58231 no
book1: 768771 655227 6.81844 no
book2: 610856 409392 5.36155 no
geo: 102400 108099 8.44523 no
news: 377109 259065 5.49581 no
obj1: 21504 15768 5.86607 no
obj2: 246814 138564 4.49128 no
paper1: 53161 35901 5.40261 no
paper2: 82199 60291 5.86781 no
pic: 513216 114138 1.77918 no
progc: 39611 24984 5.04587 no
progl: 71646 31113 3.47408 no
progp: 49379 20772 3.36532 no
trans: 93695 33093 2.82559 no
average: 4.9158
time: 907ms
The Artificial Corpus
file size packed size bpb corruption
a: 1 9 72 no
aaa: 100000 3771 0.30168 no
alphabet: 100000 486 0.03888 no
random: 100000 112509 9.00072 no
average: 20.3353
time: 78ms
The Large Corpus
file size packed size bpb corruption
E.coli: 4638690 4747257 8.18724 no
bible: 4047392 2466675 4.87558 no
word: 2473400 1301805 4.21058 no
average: 5.7578
time: 3.25sec
</text>
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_3b</title>
<body from_file="kernel_3b.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>kernel_3b</title>
<body from_file="kernel_3b.txt"/>
<menu from_file="compression.xml"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>License</title>
<body><pre>
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</pre></body>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>License</title>
<body><pre>
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</pre></body>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Networking</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
To use any of these objects all you need to do is #include the file indicated in the
short section about the component you would like to use. Pick which implementation you
would like and typedef it to something nice. Here is an example of creating a typedef for
a linker using the first kernel implementation. <br/>
<tt>typedef dlib::linker::kernel_1a linker1;</tt>
</p>
</body>
<!-- ************************************************************************* -->
<menu width="150">
<top>
<section>
<name>Objects</name>
<item>linker</item>
<item>server</item>
<item>sockstreambuf</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component checked="true">
<name>linker</name>
<file>dlib/linker.h</file>
<spec_file>dlib/linker/linker_kernel_abstract.h</spec_file>
<description>
This object represents something that takes two connections and lets
them talk to each other. ie. any incoming data from one connection is
passed unaltered to the other and vice versa.
</description>
<implementations>
<implementation>
<name>linker_kernel_1</name>
<file>dlib/linker/linker_kernel_1.h</file>
<description>
This implementation is done just using the objects defined in the
<a href="api.html#sockets">sockets</a> and <a href="api.html#threads">threads</a> packages.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for linker_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>server</name>
<file>dlib/server.h</file>
<spec_file>dlib/server/server_kernel_abstract.h</spec_file>
<description>
This object represents a server that listens on a port and spawns new
threads to handle each new connection. It also manages the connections
and threads for you.
</description>
<examples>
<example>sockets_ex.cpp.html</example>
<example>sockstreambuf_ex.cpp.html</example>
<example>server_http_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>server_kernel_1</name>
<file>dlib/server/server_kernel_1.h</file>
<description>
This implementation is done using the objects defined in the
<a href="api.html#sockets">sockets</a> and <a href="api.html#threads">threads</a> packages.
It also uses a <a href="containers.html#set">set</a> to keep track of the connections.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for server_kernel_1 that uses set_kernel_1a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>iostream</name>
<spec_file>dlib/server/server_iostream_abstract.h</spec_file>
<description>
This extension redefines the on_connect() function so that
instead of giving you a connection object you get an istream
and ostream object.
</description>
<implementations>
<implementation>
<name>server_iostream_1</name>
<file>dlib/server/server_iostream_1.h</file>
<description>
This is implemented in the obvious way using the <a href="#sockstreambuf">sockstreambuf</a> object.
</description>
<typedefs>
<typedef>
<name>iostream_1a</name>
<description>is a typedef for server_kernel_1a extended by server_iostream_1 that uses
sockstreambuf_kernel_2a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
<extension>
<name>http</name>
<spec_file>dlib/server/server_http_abstract.h</spec_file>
<description>
This extension turns the server object into a simple HTTP server.
</description>
<examples>
<example>server_http_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>server_http_1</name>
<file>dlib/server/server_http_1.h</file>
<description>
This is implemented in the obvious way.
</description>
<typedefs>
<typedef>
<name>http_1a</name>
<description>is a typedef for server_iostream_1a extended by server_http_1 </description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>sockstreambuf</name>
<file>dlib/sockstreambuf.h</file>
<spec_file>dlib/sockstreambuf/sockstreambuf_kernel_abstract.h</spec_file>
<description>
This object represents a stream buffer for connection objects.
</description>
<examples>
<example>sockstreambuf_ex.cpp.html</example>
<example>sockets_ex_2.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>sockstreambuf_kernel_1</name>
<file>dlib/sockstreambuf/sockstreambuf_kernel_1.h</file>
<description>
This implementation is done in the obvious way without any sort of buffering.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for sockstreambuf_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>sockstreambuf_kernel_2</name>
<file>dlib/sockstreambuf/sockstreambuf_kernel_2.h</file>
<description>
This implementation is done in the obvious way but <i>with</i> buffering. Thus, it is
considerably faster than the unbuffered version of this object.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for sockstreambuf_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Networking</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
To use any of these objects all you need to do is #include the file indicated in the
short section about the component you would like to use. Pick which implementation you
would like and typedef it to something nice. Here is an example of creating a typedef for
a linker using the first kernel implementation. <br/>
<tt>typedef dlib::linker::kernel_1a linker1;</tt>
</p>
</body>
<!-- ************************************************************************* -->
<menu width="150">
<top>
<section>
<name>Objects</name>
<item>linker</item>
<item>server</item>
<item>sockstreambuf</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component checked="true">
<name>linker</name>
<file>dlib/linker.h</file>
<spec_file>dlib/linker/linker_kernel_abstract.h</spec_file>
<description>
This object represents something that takes two connections and lets
them talk to each other. ie. any incoming data from one connection is
passed unaltered to the other and vice versa.
</description>
<implementations>
<implementation>
<name>linker_kernel_1</name>
<file>dlib/linker/linker_kernel_1.h</file>
<description>
This implementation is done just using the objects defined in the
<a href="api.html#sockets">sockets</a> and <a href="api.html#threads">threads</a> packages.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for linker_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>server</name>
<file>dlib/server.h</file>
<spec_file>dlib/server/server_kernel_abstract.h</spec_file>
<description>
This object represents a server that listens on a port and spawns new
threads to handle each new connection. It also manages the connections
and threads for you.
</description>
<examples>
<example>sockets_ex.cpp.html</example>
<example>sockstreambuf_ex.cpp.html</example>
<example>server_http_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>server_kernel_1</name>
<file>dlib/server/server_kernel_1.h</file>
<description>
This implementation is done using the objects defined in the
<a href="api.html#sockets">sockets</a> and <a href="api.html#threads">threads</a> packages.
It also uses a <a href="containers.html#set">set</a> to keep track of the connections.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for server_kernel_1 that uses set_kernel_1a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>iostream</name>
<spec_file>dlib/server/server_iostream_abstract.h</spec_file>
<description>
This extension redefines the on_connect() function so that
instead of giving you a connection object you get an istream
and ostream object.
</description>
<implementations>
<implementation>
<name>server_iostream_1</name>
<file>dlib/server/server_iostream_1.h</file>
<description>
This is implemented in the obvious way using the <a href="#sockstreambuf">sockstreambuf</a> object.
</description>
<typedefs>
<typedef>
<name>iostream_1a</name>
<description>is a typedef for server_kernel_1a extended by server_iostream_1 that uses
sockstreambuf_kernel_2a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
<extension>
<name>http</name>
<spec_file>dlib/server/server_http_abstract.h</spec_file>
<description>
This extension turns the server object into a simple HTTP server.
</description>
<examples>
<example>server_http_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>server_http_1</name>
<file>dlib/server/server_http_1.h</file>
<description>
This is implemented in the obvious way.
</description>
<typedefs>
<typedef>
<name>http_1a</name>
<description>is a typedef for server_iostream_1a extended by server_http_1 </description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>sockstreambuf</name>
<file>dlib/sockstreambuf.h</file>
<spec_file>dlib/sockstreambuf/sockstreambuf_kernel_abstract.h</spec_file>
<description>
This object represents a stream buffer for connection objects.
</description>
<examples>
<example>sockstreambuf_ex.cpp.html</example>
<example>sockets_ex_2.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>sockstreambuf_kernel_1</name>
<file>dlib/sockstreambuf/sockstreambuf_kernel_1.h</file>
<description>
This implementation is done in the obvious way without any sort of buffering.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for sockstreambuf_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>sockstreambuf_kernel_2</name>
<file>dlib/sockstreambuf/sockstreambuf_kernel_2.h</file>
<description>
This implementation is done in the obvious way but <i>with</i> buffering. Thus, it is
considerably faster than the unbuffered version of this object.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for sockstreambuf_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Old Change Logs</title>
<body from_file="old_svnlog.txt"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Old Change Logs</title>
<body from_file="old_svnlog.txt"/>
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Miscellaneous</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
This page documents library components that don't really fit in anywhere else.
They all basically follow the same conventions as
the rest of the library. So to get a pipe for example you would need to write something
like <tt>typedef dlib::pipe::kernel_1a pipe_type;</tt> and from then on make your pipes like
<tt>pipe_type my_pipe(pipe_size);</tt>.
</p>
</body>
<!-- ************************************************************************* -->
<menu width="200">
<top>
<section>
<name>Objects</name>
<item>bit_stream</item>
<item>byte_orderer</item>
<item>std_allocator</item>
<item>memory_manager</item>
<item>memory_manager_global</item>
<item>memory_manager_stateless</item>
<item>sync_extension</item>
<item>timer</item>
<item>timeout</item>
<item>member_function_pointer</item>
<item>error</item>
<item>pipe</item>
<item>copy_functor</item>
<item>logger</item>
<item>uint64</item>
<item>uint32</item>
<item>uint16</item>
<item>uint8</item>
</section>
<section>
<name>Global Functions</name>
<item>deserialize</item>
<item>serialize</item>
<item>zero_extend_cast</item>
</section>
<section>
<name>Testing</name>
<item>dlib_testing_suite</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component>
<name>zero_extend_cast</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is a global function that performs a zero extending cast
from one integral type to another integral type.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint32</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for a 32 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint8</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for an 8 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint16</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for a 16 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>std_allocator</name>
<file>dlib/std_allocator.h</file>
<spec_file>dlib/std_allocator.h</spec_file>
<description>
This object is an implementation of an allocator that conforms to the C++ standard
requirements for allocator objects. The M template argument is one of the dlib
memory manager objects and this allocator implementation will do all of its memory allocations
using whatever dlib memory manager you supply.
<p>
Thus, using this allocator object you can use any of the dlib memory manager objects with
the containers in the STL or with any other object that requires an STL style allocator object.
</p>
</description>
<examples>
<example>std_allocator_ex.cpp.html</example>
</examples>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint64</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for a 64 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>copy_functor</name>
<file>dlib/algs.h</file>
<spec_file link="true">dlib/algs.h</spec_file>
<description>
This is a templated function object that makes coppies of something.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>logger</name>
<file>dlib/logger.h</file>
<spec_file>dlib/logger/logger_kernel_abstract.h</spec_file>
<description>
This component is a logging output stream in the style of the log4j
logger available for Java.
Note that unlike most other objects in this library there is only
one implementation. Thus, to create instances
of the logger you would simply write logger my_logger("some_name");.
</description>
<examples>
<example>logger_ex.cpp.html</example>
<example>logger_ex_2.cpp.html</example>
<example>pipe_ex.cpp.html</example>
</examples>
<extensions>
<extension>
<name>extra_logger_headers</name>
<spec_file>dlib/logger/extra_logger_headers.h</spec_file>
<description>This extension contains additional logger headers you may chose to use instead of the
default one. </description>
</extension>
<extension>
<name>config_file</name>
<spec_file>dlib/logger/logger_config_file.h</spec_file>
<description>This extension provides the configure_loggers_from_file() function
which reads a configuration file from disk that sets up all your loggers.</description>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>error</name>
<file>dlib/error.h</file>
<spec_file link="true">dlib/error.h</spec_file>
<description>
This is the base exception class from which all exceptions in this
library inherit.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>pipe</name>
<file>dlib/pipe.h</file>
<spec_file>dlib/pipe/pipe_kernel_abstract.h</spec_file>
<description>
This is a first in first out queue with a fixed maximum size containing items
of type T. It is suitable for passing objects between threads.
</description>
<examples>
<example>pipe_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>pipe_kernel_1</name>
<file>dlib/pipe/pipe_kernel_1.h</file>
<description>
This implementation is done using a circular buffer in the obvious way. See the source for details.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for pipe_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>member_function_pointer</name>
<file>dlib/member_function_pointer.h</file>
<spec_file>dlib/member_function_pointer/member_function_pointer_kernel_abstract.h</spec_file>
<description>
This object represents a member function pointer. It is useful because
instances of this object can be created without needing to know the type
of object whose member function we will be calling.
</description>
<examples>
<example>member_function_pointer_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>member_function_pointer_kernel_1</name>
<file>dlib/member_function_pointer/member_function_pointer_kernel_1.h</file>
<description>
This implementation is done using virtual functions in the obvious way (sorta).
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for member_function_pointer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>bit_stream</name>
<file>dlib/bit_stream.h</file>
<spec_file>dlib/bit_stream/bit_stream_kernel_abstract.h</spec_file>
<description>
This object represents a middle man between a user and the iostream classes that allows single
bits to be read/written easily from/to the iostream classes
</description>
<implementations>
<implementation>
<name>bit_stream_kernel_1</name>
<file>dlib/bit_stream/bit_stream_kernel_1.h</file>
<description>
This implementation is done by buffering single bits in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for bit_stream_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>bit_stream_multi</name>
<spec_file>dlib/bit_stream/bit_stream_multi_abstract.h</spec_file>
<description>This extension gives a bit_stream object the ability to read/write multible bits at a time.</description>
<implementations>
<implementation>
<name>bit_stream_multi_1</name>
<file>dlib/bit_stream/bit_stream_multi_1.h</file>
<description>This implementation is done by calling the read/write functions in the bit_stream kernel.</description>
<typedefs>
<typedef>
<name>multi_1a</name>
<description>is a typedef for bit_stream_kernel_1 extended by bit_stream_multi_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>byte_orderer</name>
<file>dlib/byte_orderer.h</file>
<spec_file>dlib/byte_orderer/byte_orderer_kernel_abstract.h</spec_file>
<description>
This object provides a simple type safe mechanism to convert data
to and from network and host byte orders. I.e. to convert things
between big and little endian byte ordering.
</description>
<implementations>
<implementation>
<name>byte_orderer_kernel_1</name>
<file>dlib/byte_orderer/byte_orderer_kernel_1.h</file>
<description>
This implementation is done in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for byte_orderer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>memory_manager_stateless</name>
<file>dlib/memory_manager_stateless.h</file>
<spec_file>dlib/memory_manager_stateless/memory_manager_stateless_kernel_abstract.h</spec_file>
<description>
This object represents some kind of stateless memory manager or memory pool.
Stateless means that all instances (instances of the same type that is)
of this object are identical and can be used interchangably. Note that
implementations are allowed to have some shared global state such as a
global memory pool. This object is also thread safe.
</description>
<implementations>
<implementation>
<name>memory_manager_stateless_kernel_1</name>
<file>dlib/memory_manager_stateless/memory_manager_stateless_kernel_1.h</file>
<description>
This implementation just calls new and delete. So it doesn't do anything special.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for memory_manager_stateless_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>memory_manager_stateless_kernel_2</name>
<file>dlib/memory_manager_stateless/memory_manager_stateless_kernel_2.h</file>
<description>
This implementation uses a global instance of a <a href="#memory_manager">memory_manager</a> object
guarded by a mutex as its implementation.
</description>
<typedefs>
<typedef>
<name>kernel_2_1a</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1a</description>
</typedef>
<typedef>
<name>kernel_2_1b</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1b</description>
</typedef>
<typedef>
<name>kernel_2_1c</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1c</description>
</typedef>
<typedef>
<name>kernel_2_1d</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1d</description>
</typedef>
<typedef>
<name>kernel_2_1e</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1e</description>
</typedef>
<typedef>
<name>kernel_2_1f</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1f</description>
</typedef>
<typedef>
<name>kernel_2_2a</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2a</description>
</typedef>
<typedef>
<name>kernel_2_2b</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2b</description>
</typedef>
<typedef>
<name>kernel_2_2c</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2c</description>
</typedef>
<typedef>
<name>kernel_2_2d</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2d</description>
</typedef>
<typedef>
<name>kernel_2_2e</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2e</description>
</typedef>
<typedef>
<name>kernel_2_3a</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3a</description>
</typedef>
<typedef>
<name>kernel_2_3b</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3b</description>
</typedef>
<typedef>
<name>kernel_2_3c</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3c</description>
</typedef>
<typedef>
<name>kernel_2_3d</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3d</description>
</typedef>
<typedef>
<name>kernel_2_3e</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3e</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>memory_manager_global</name>
<file>dlib/memory_manager_global.h</file>
<spec_file>dlib/memory_manager_global/memory_manager_global_kernel_abstract.h</spec_file>
<description>
This object represents some kind of global memory manager or memory pool.
</description>
<implementations>
<implementation>
<name>memory_manager_global_kernel_1</name>
<file>dlib/memory_manager_global/memory_manager_global_kernel_1.h</file>
<description>
This is implemented in the obvious way. See the code for details.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for memory_manager_global_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>memory_manager</name>
<file>dlib/memory_manager.h</file>
<spec_file>dlib/memory_manager/memory_manager_kernel_abstract.h</spec_file>
<description>
This object represents a memory pool.
</description>
<implementations>
<implementation>
<name>memory_manager_kernel_1</name>
<file>dlib/memory_manager/memory_manager_kernel_1.h</file>
<description>
This memory manager implementation allocates objects one at a time when there are
allocation requests. Then when there is a deallocate request the returning object
is placed into a list of free blocks if that list has less than max_pool_size
blocks in it. Subsequent allocation requests will be serviced by drawing from the
free list whenever it isn't empty. Array allocations, on the other hand, are not
managed at all but are passed directly on to new and delete.
<p>
When this object's max_pool_size template parameter is set to 0 it simply calls
new and delete directly and doesn't function as a memory pool.
</p>
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 0</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 10</description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 100</description>
</typedef>
<typedef>
<name>kernel_1d</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 1000</description>
</typedef>
<typedef>
<name>kernel_1e</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 10000</description>
</typedef>
<typedef>
<name>kernel_1f</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 100000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>memory_manager_kernel_2</name>
<file>dlib/memory_manager/memory_manager_kernel_2.h</file>
<description>
This memory manager implementation allocates memory in blocks of chunk_size*sizeof(T)
bytes. All the sizeof(T) subblocks are kept in a linked list of free memory blocks
and are given out whenever an allocation request occurs. Also, memory is not freed
until this object is destructed.
Also note that array allocations are not managed at all but are passed directly
on to new and delete.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 10</description>
</typedef>
<typedef>
<name>kernel_2b</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 100</description>
</typedef>
<typedef>
<name>kernel_2c</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 1000</description>
</typedef>
<typedef>
<name>kernel_2d</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 10000</description>
</typedef>
<typedef>
<name>kernel_2e</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 100000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>memory_manager_kernel_3</name>
<file>dlib/memory_manager/memory_manager_kernel_3.h</file>
<description>
This memory manager implementation allocates memory in blocks of chunk_size*sizeof(T)
bytes. All the sizeof(T) subblocks are kept in a linked list of free memory blocks
and are given out whenever an allocation request occurs. Note that array allocations
are managed. So this object is just like kernel_2 but it also pools memory from
array allocations (chunk_size has no effect with respect to array allocations, each array
is allocated one at a time).
Also, memory is not freed until this object is destructed.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 10</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 100</description>
</typedef>
<typedef>
<name>kernel_3c</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 1000</description>
</typedef>
<typedef>
<name>kernel_3d</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 10000</description>
</typedef>
<typedef>
<name>kernel_3e</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 100000</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>sync_extension</name>
<file>dlib/sync_extension.h</file>
<spec_file>dlib/sync_extension/sync_extension_kernel_abstract.h</spec_file>
<description>
This object represents a general extension to any object. This object gives any object which it extends
an integrated rmutex and rsignaler object. The extended object will
then be able to be treated as if it was also a <a href="dlib/threads/rmutex_extension_abstract.h.html#rmutex">rmutex</a> and
<a href="dlib/threads/rsignaler_extension_abstract.h.html#rsignaler">rsignaler</a>.
</description>
<implementations>
<implementation>
<name>sync_extension_kernel_1</name>
<file>dlib/sync_extension/sync_extension_kernel_1.h</file>
<description>
This is implemented using a <a href="dlib/threads/rmutex_extension_abstract.h.html#rmutex">rmutex</a>
and <a href="dlib/threads/rsignaler_extension_abstract.h.html#rsignaler">rsignaler</a> in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for sync_extension_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>timeout</name>
<file>dlib/timeout.h</file>
<spec_file>dlib/timeout/timeout_kernel_abstract.h</spec_file>
<description>
This object provides a simple way to implement a timeout.
</description>
<implementations>
<implementation>
<name>timeout_kernel_1</name>
<file>dlib/timeout/timeout_kernel_1.h</file>
<description>
This is implemented in the obvious way using virtual functions and templates.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for timeout_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>timer</name>
<file>dlib/timer.h</file>
<spec_file>dlib/timer/timer_kernel_abstract.h</spec_file>
<description>
This object represents a timer that will call a given member function
repeatedly at regular intervals.
</description>
<examples>
<example>timer_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>timer_kernel_1</name>
<file>dlib/timer/timer_kernel_1.h</file>
<description>
This is implemented in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for timer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>timer_kernel_2</name>
<file>dlib/timer/timer_kernel_2.h</file>
<description>
This implemenation has a single master thread that does all the waiting.
This master thread creates and dispatches threads to specific timer objects
when they need to run their action functions. When a timer object isn't executing
its action function then it doesn't have any thread allocated to it at all. So
it is much more efficient than timer_kernel_1.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for timer_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>deserialize</name>
<file>dlib/serialize.h</file>
<spec_file>dlib/serialize.h</spec_file>
<description>
This is actually a set of overloaded functions which provide the ability to restore an object's state
from an input stream. Currently all dlib container classes, non pointer C++ intrinsics, std::string,
std::vector, std::map, std::complex, dlib::bigint, dlib::uint64, C style arrays, and dlib::vector objects are serializable.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>serialize</name>
<file>dlib/serialize.h</file>
<spec_file>dlib/serialize.h</spec_file>
<description>
This is actually a set of overloaded functions which provide the ability to save an object's state
to an output stream. Currently all dlib container classes, non pointer C++ intrinsics, std::string,
std::vector, std::map, std::complex, dlib::bigint, dlib::uint64, C style arrays, and dlib::vector objects are serializable.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>dlib_testing_suite</name>
<description>
<p>
This library comes with a command line driven regression test suite. All the testing code
is located in the <chm>dlib/test</chm><web><a href="dlib/test">dlib/test</a></web> folder. If you want to build it and test the library on your
system you can use the makefile at <a href="dlib/test/makefile">dlib/test/makefile</a> (you may
have to edit it to make it work on your system) or use the CMake CMakeLists.txt file at
<a href="dlib/test/CMakeLists.txt.html">dlib/test/CMakeLists.txt</a> to build it.
</p>
<p>
What you may find more useful however is the testing framework itself. It uses a faily simple
and modular design. Each test is contained in its own cpp file and when compiled into the
program it automatically shows up in the list of tests to run. If you want to use the
testing framework all you need to do is add the files <a href="dlib/test/tester.h.html">dlib/test/tester.h</a>,
<a href="dlib/test/tester.cpp.html">dlib/test/tester.cpp</a>, and <a href="dlib/test/main.cpp.html">dlib/test/main.cpp</a>
to your project and then add cpp files that contain your tests (see
<a href="dlib/test/example.cpp.html">dlib/test/example.cpp</a> and
<a href="dlib/test/example_args.cpp.html">dlib/test/example_args.cpp</a>
for some examples).
</p>
<p>
From the command line you can choose to run all the installed tests, enable or disable the loggers,
set various logging levels, specify how many times to run the tests, or pick just one or two tests
to run at a time rather than the entire suite.
</p>
</description>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Miscellaneous</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
This page documents library components that don't really fit in anywhere else.
They all basically follow the same conventions as
the rest of the library. So to get a pipe for example you would need to write something
like <tt>typedef dlib::pipe::kernel_1a pipe_type;</tt> and from then on make your pipes like
<tt>pipe_type my_pipe(pipe_size);</tt>.
</p>
</body>
<!-- ************************************************************************* -->
<menu width="200">
<top>
<section>
<name>Objects</name>
<item>bit_stream</item>
<item>byte_orderer</item>
<item>std_allocator</item>
<item>memory_manager</item>
<item>memory_manager_global</item>
<item>memory_manager_stateless</item>
<item>sync_extension</item>
<item>timer</item>
<item>timeout</item>
<item>member_function_pointer</item>
<item>error</item>
<item>pipe</item>
<item>copy_functor</item>
<item>logger</item>
<item>uint64</item>
<item>uint32</item>
<item>uint16</item>
<item>uint8</item>
</section>
<section>
<name>Global Functions</name>
<item>deserialize</item>
<item>serialize</item>
<item>zero_extend_cast</item>
</section>
<section>
<name>Testing</name>
<item>dlib_testing_suite</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component>
<name>zero_extend_cast</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is a global function that performs a zero extending cast
from one integral type to another integral type.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint32</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for a 32 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint8</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for an 8 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint16</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for a 16 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>std_allocator</name>
<file>dlib/std_allocator.h</file>
<spec_file>dlib/std_allocator.h</spec_file>
<description>
This object is an implementation of an allocator that conforms to the C++ standard
requirements for allocator objects. The M template argument is one of the dlib
memory manager objects and this allocator implementation will do all of its memory allocations
using whatever dlib memory manager you supply.
<p>
Thus, using this allocator object you can use any of the dlib memory manager objects with
the containers in the STL or with any other object that requires an STL style allocator object.
</p>
</description>
<examples>
<example>std_allocator_ex.cpp.html</example>
</examples>
</component>
<!-- ************************************************************************* -->
<component>
<name>uint64</name>
<file>dlib/uintn.h</file>
<spec_file link="true">dlib/uintn.h</spec_file>
<description>
This is just a typedef for a 64 bit unsigned integer.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>copy_functor</name>
<file>dlib/algs.h</file>
<spec_file link="true">dlib/algs.h</spec_file>
<description>
This is a templated function object that makes coppies of something.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>logger</name>
<file>dlib/logger.h</file>
<spec_file>dlib/logger/logger_kernel_abstract.h</spec_file>
<description>
This component is a logging output stream in the style of the log4j
logger available for Java.
Note that unlike most other objects in this library there is only
one implementation. Thus, to create instances
of the logger you would simply write logger my_logger("some_name");.
</description>
<examples>
<example>logger_ex.cpp.html</example>
<example>logger_ex_2.cpp.html</example>
<example>pipe_ex.cpp.html</example>
</examples>
<extensions>
<extension>
<name>extra_logger_headers</name>
<spec_file>dlib/logger/extra_logger_headers.h</spec_file>
<description>This extension contains additional logger headers you may chose to use instead of the
default one. </description>
</extension>
<extension>
<name>config_file</name>
<spec_file>dlib/logger/logger_config_file.h</spec_file>
<description>This extension provides the configure_loggers_from_file() function
which reads a configuration file from disk that sets up all your loggers.</description>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>error</name>
<file>dlib/error.h</file>
<spec_file link="true">dlib/error.h</spec_file>
<description>
This is the base exception class from which all exceptions in this
library inherit.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>pipe</name>
<file>dlib/pipe.h</file>
<spec_file>dlib/pipe/pipe_kernel_abstract.h</spec_file>
<description>
This is a first in first out queue with a fixed maximum size containing items
of type T. It is suitable for passing objects between threads.
</description>
<examples>
<example>pipe_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>pipe_kernel_1</name>
<file>dlib/pipe/pipe_kernel_1.h</file>
<description>
This implementation is done using a circular buffer in the obvious way. See the source for details.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for pipe_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>member_function_pointer</name>
<file>dlib/member_function_pointer.h</file>
<spec_file>dlib/member_function_pointer/member_function_pointer_kernel_abstract.h</spec_file>
<description>
This object represents a member function pointer. It is useful because
instances of this object can be created without needing to know the type
of object whose member function we will be calling.
</description>
<examples>
<example>member_function_pointer_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>member_function_pointer_kernel_1</name>
<file>dlib/member_function_pointer/member_function_pointer_kernel_1.h</file>
<description>
This implementation is done using virtual functions in the obvious way (sorta).
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for member_function_pointer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>bit_stream</name>
<file>dlib/bit_stream.h</file>
<spec_file>dlib/bit_stream/bit_stream_kernel_abstract.h</spec_file>
<description>
This object represents a middle man between a user and the iostream classes that allows single
bits to be read/written easily from/to the iostream classes
</description>
<implementations>
<implementation>
<name>bit_stream_kernel_1</name>
<file>dlib/bit_stream/bit_stream_kernel_1.h</file>
<description>
This implementation is done by buffering single bits in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for bit_stream_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>bit_stream_multi</name>
<spec_file>dlib/bit_stream/bit_stream_multi_abstract.h</spec_file>
<description>This extension gives a bit_stream object the ability to read/write multible bits at a time.</description>
<implementations>
<implementation>
<name>bit_stream_multi_1</name>
<file>dlib/bit_stream/bit_stream_multi_1.h</file>
<description>This implementation is done by calling the read/write functions in the bit_stream kernel.</description>
<typedefs>
<typedef>
<name>multi_1a</name>
<description>is a typedef for bit_stream_kernel_1 extended by bit_stream_multi_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>byte_orderer</name>
<file>dlib/byte_orderer.h</file>
<spec_file>dlib/byte_orderer/byte_orderer_kernel_abstract.h</spec_file>
<description>
This object provides a simple type safe mechanism to convert data
to and from network and host byte orders. I.e. to convert things
between big and little endian byte ordering.
</description>
<implementations>
<implementation>
<name>byte_orderer_kernel_1</name>
<file>dlib/byte_orderer/byte_orderer_kernel_1.h</file>
<description>
This implementation is done in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for byte_orderer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>memory_manager_stateless</name>
<file>dlib/memory_manager_stateless.h</file>
<spec_file>dlib/memory_manager_stateless/memory_manager_stateless_kernel_abstract.h</spec_file>
<description>
This object represents some kind of stateless memory manager or memory pool.
Stateless means that all instances (instances of the same type that is)
of this object are identical and can be used interchangably. Note that
implementations are allowed to have some shared global state such as a
global memory pool. This object is also thread safe.
</description>
<implementations>
<implementation>
<name>memory_manager_stateless_kernel_1</name>
<file>dlib/memory_manager_stateless/memory_manager_stateless_kernel_1.h</file>
<description>
This implementation just calls new and delete. So it doesn't do anything special.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for memory_manager_stateless_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>memory_manager_stateless_kernel_2</name>
<file>dlib/memory_manager_stateless/memory_manager_stateless_kernel_2.h</file>
<description>
This implementation uses a global instance of a <a href="#memory_manager">memory_manager</a> object
guarded by a mutex as its implementation.
</description>
<typedefs>
<typedef>
<name>kernel_2_1a</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1a</description>
</typedef>
<typedef>
<name>kernel_2_1b</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1b</description>
</typedef>
<typedef>
<name>kernel_2_1c</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1c</description>
</typedef>
<typedef>
<name>kernel_2_1d</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1d</description>
</typedef>
<typedef>
<name>kernel_2_1e</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1e</description>
</typedef>
<typedef>
<name>kernel_2_1f</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_1f</description>
</typedef>
<typedef>
<name>kernel_2_2a</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2a</description>
</typedef>
<typedef>
<name>kernel_2_2b</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2b</description>
</typedef>
<typedef>
<name>kernel_2_2c</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2c</description>
</typedef>
<typedef>
<name>kernel_2_2d</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2d</description>
</typedef>
<typedef>
<name>kernel_2_2e</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_2e</description>
</typedef>
<typedef>
<name>kernel_2_3a</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3a</description>
</typedef>
<typedef>
<name>kernel_2_3b</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3b</description>
</typedef>
<typedef>
<name>kernel_2_3c</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3c</description>
</typedef>
<typedef>
<name>kernel_2_3d</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3d</description>
</typedef>
<typedef>
<name>kernel_2_3e</name>
<description>is a typedef for memory_manager_stateless_kernel_2 that uses memory_manager_3e</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>memory_manager_global</name>
<file>dlib/memory_manager_global.h</file>
<spec_file>dlib/memory_manager_global/memory_manager_global_kernel_abstract.h</spec_file>
<description>
This object represents some kind of global memory manager or memory pool.
</description>
<implementations>
<implementation>
<name>memory_manager_global_kernel_1</name>
<file>dlib/memory_manager_global/memory_manager_global_kernel_1.h</file>
<description>
This is implemented in the obvious way. See the code for details.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for memory_manager_global_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>memory_manager</name>
<file>dlib/memory_manager.h</file>
<spec_file>dlib/memory_manager/memory_manager_kernel_abstract.h</spec_file>
<description>
This object represents a memory pool.
</description>
<implementations>
<implementation>
<name>memory_manager_kernel_1</name>
<file>dlib/memory_manager/memory_manager_kernel_1.h</file>
<description>
This memory manager implementation allocates objects one at a time when there are
allocation requests. Then when there is a deallocate request the returning object
is placed into a list of free blocks if that list has less than max_pool_size
blocks in it. Subsequent allocation requests will be serviced by drawing from the
free list whenever it isn't empty. Array allocations, on the other hand, are not
managed at all but are passed directly on to new and delete.
<p>
When this object's max_pool_size template parameter is set to 0 it simply calls
new and delete directly and doesn't function as a memory pool.
</p>
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 0</description>
</typedef>
<typedef>
<name>kernel_1b</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 10</description>
</typedef>
<typedef>
<name>kernel_1c</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 100</description>
</typedef>
<typedef>
<name>kernel_1d</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 1000</description>
</typedef>
<typedef>
<name>kernel_1e</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 10000</description>
</typedef>
<typedef>
<name>kernel_1f</name>
<description>is a typedef for memory_manager_kernel_1 with a max_pool_size of 100000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>memory_manager_kernel_2</name>
<file>dlib/memory_manager/memory_manager_kernel_2.h</file>
<description>
This memory manager implementation allocates memory in blocks of chunk_size*sizeof(T)
bytes. All the sizeof(T) subblocks are kept in a linked list of free memory blocks
and are given out whenever an allocation request occurs. Also, memory is not freed
until this object is destructed.
Also note that array allocations are not managed at all but are passed directly
on to new and delete.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 10</description>
</typedef>
<typedef>
<name>kernel_2b</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 100</description>
</typedef>
<typedef>
<name>kernel_2c</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 1000</description>
</typedef>
<typedef>
<name>kernel_2d</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 10000</description>
</typedef>
<typedef>
<name>kernel_2e</name>
<description>is a typedef for memory_manager_kernel_2 with a chunk_size of 100000</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>memory_manager_kernel_3</name>
<file>dlib/memory_manager/memory_manager_kernel_3.h</file>
<description>
This memory manager implementation allocates memory in blocks of chunk_size*sizeof(T)
bytes. All the sizeof(T) subblocks are kept in a linked list of free memory blocks
and are given out whenever an allocation request occurs. Note that array allocations
are managed. So this object is just like kernel_2 but it also pools memory from
array allocations (chunk_size has no effect with respect to array allocations, each array
is allocated one at a time).
Also, memory is not freed until this object is destructed.
</description>
<typedefs>
<typedef>
<name>kernel_3a</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 10</description>
</typedef>
<typedef>
<name>kernel_3b</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 100</description>
</typedef>
<typedef>
<name>kernel_3c</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 1000</description>
</typedef>
<typedef>
<name>kernel_3d</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 10000</description>
</typedef>
<typedef>
<name>kernel_3e</name>
<description>is a typedef for memory_manager_kernel_3 with a chunk_size of 100000</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>sync_extension</name>
<file>dlib/sync_extension.h</file>
<spec_file>dlib/sync_extension/sync_extension_kernel_abstract.h</spec_file>
<description>
This object represents a general extension to any object. This object gives any object which it extends
an integrated rmutex and rsignaler object. The extended object will
then be able to be treated as if it was also a <a href="dlib/threads/rmutex_extension_abstract.h.html#rmutex">rmutex</a> and
<a href="dlib/threads/rsignaler_extension_abstract.h.html#rsignaler">rsignaler</a>.
</description>
<implementations>
<implementation>
<name>sync_extension_kernel_1</name>
<file>dlib/sync_extension/sync_extension_kernel_1.h</file>
<description>
This is implemented using a <a href="dlib/threads/rmutex_extension_abstract.h.html#rmutex">rmutex</a>
and <a href="dlib/threads/rsignaler_extension_abstract.h.html#rsignaler">rsignaler</a> in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for sync_extension_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>timeout</name>
<file>dlib/timeout.h</file>
<spec_file>dlib/timeout/timeout_kernel_abstract.h</spec_file>
<description>
This object provides a simple way to implement a timeout.
</description>
<implementations>
<implementation>
<name>timeout_kernel_1</name>
<file>dlib/timeout/timeout_kernel_1.h</file>
<description>
This is implemented in the obvious way using virtual functions and templates.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for timeout_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>timer</name>
<file>dlib/timer.h</file>
<spec_file>dlib/timer/timer_kernel_abstract.h</spec_file>
<description>
This object represents a timer that will call a given member function
repeatedly at regular intervals.
</description>
<examples>
<example>timer_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>timer_kernel_1</name>
<file>dlib/timer/timer_kernel_1.h</file>
<description>
This is implemented in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for timer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>timer_kernel_2</name>
<file>dlib/timer/timer_kernel_2.h</file>
<description>
This implemenation has a single master thread that does all the waiting.
This master thread creates and dispatches threads to specific timer objects
when they need to run their action functions. When a timer object isn't executing
its action function then it doesn't have any thread allocated to it at all. So
it is much more efficient than timer_kernel_1.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for timer_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component>
<name>deserialize</name>
<file>dlib/serialize.h</file>
<spec_file>dlib/serialize.h</spec_file>
<description>
This is actually a set of overloaded functions which provide the ability to restore an object's state
from an input stream. Currently all dlib container classes, non pointer C++ intrinsics, std::string,
std::vector, std::map, std::complex, dlib::bigint, dlib::uint64, C style arrays, and dlib::vector objects are serializable.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>serialize</name>
<file>dlib/serialize.h</file>
<spec_file>dlib/serialize.h</spec_file>
<description>
This is actually a set of overloaded functions which provide the ability to save an object's state
to an output stream. Currently all dlib container classes, non pointer C++ intrinsics, std::string,
std::vector, std::map, std::complex, dlib::bigint, dlib::uint64, C style arrays, and dlib::vector objects are serializable.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>dlib_testing_suite</name>
<description>
<p>
This library comes with a command line driven regression test suite. All the testing code
is located in the <chm>dlib/test</chm><web><a href="dlib/test">dlib/test</a></web> folder. If you want to build it and test the library on your
system you can use the makefile at <a href="dlib/test/makefile">dlib/test/makefile</a> (you may
have to edit it to make it work on your system) or use the CMake CMakeLists.txt file at
<a href="dlib/test/CMakeLists.txt.html">dlib/test/CMakeLists.txt</a> to build it.
</p>
<p>
What you may find more useful however is the testing framework itself. It uses a faily simple
and modular design. Each test is contained in its own cpp file and when compiled into the
program it automatically shows up in the list of tests to run. If you want to use the
testing framework all you need to do is add the files <a href="dlib/test/tester.h.html">dlib/test/tester.h</a>,
<a href="dlib/test/tester.cpp.html">dlib/test/tester.cpp</a>, and <a href="dlib/test/main.cpp.html">dlib/test/main.cpp</a>
to your project and then add cpp files that contain your tests (see
<a href="dlib/test/example.cpp.html">dlib/test/example.cpp</a> and
<a href="dlib/test/example_args.cpp.html">dlib/test/example_args.cpp</a>
for some examples).
</p>
<p>
From the command line you can choose to run all the installed tests, enable or disable the loggers,
set various logging levels, specify how many times to run the tests, or pick just one or two tests
to run at a time rather than the entire suite.
</p>
</description>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Parsing</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
This page documents the objects and functions that in some way deal with parsing or otherwise
manipulating text.
Everything here follows the same conventions as the rest of the library.
</p>
</body>
<!-- ************************************************************************* -->
<menu width="150">
<top>
<section>
<name>Objects</name>
<item>cmd_line_parser</item>
<item>config_reader</item>
<item>cpp_pretty_printer</item>
<item>cpp_tokenizer</item>
<item>tokenizer</item>
<item>xml_parser</item>
<item>base64</item>
<item>unichar</item>
<item>ustring</item>
<item>basic_utf8_ifstream</item>
</section>
<section>
<name>Global Functions</name>
<item>string_cast</item>
<item>cast_to_string</item>
<item>cast_to_wstring</item>
<item>wrap_string</item>
<item>narrow</item>
<item>trim</item>
<item>ltrim</item>
<item>rtrim</item>
<item>pad</item>
<item>lpad</item>
<item>rpad</item>
<item>left_substr</item>
<item>right_substr</item>
<item>tolower</item>
<item>toupper</item>
<item>convert_utf8_to_utf32</item>
<item>is_combining_char</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component>
<name>toupper</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to convert a string to all uppercase.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>tolower</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to convert a string to all lowercase.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>right_substr</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to return the part of a string to the right of a user supplied delimiter.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>left_substr</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to return the part of a string to the left of a user supplied delimiter.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>rpad</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to pad whitespace (or user specfied characters) onto the right most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>lpad</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to pad whitespace (or user specfied characters) onto the left most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>pad</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to pad whitespace (or user specfied characters) onto the ends of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>rtrim</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to remove the whitespace (or user specfied characters) from the right most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>ltrim</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to remove the whitespace (or user specfied characters) from the left most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>trim</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to remove the whitespace (or user specfied characters) from the ends of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>narrow</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function for converting a string of type std::string or std::wstring
to a plain std::string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>wrap_string</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
wrap_string is a function that takes a string and breaks it into a number of
lines of a given length. You can use this to make a string
fit nicely into a command prompt window for example.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>cast_to_wstring</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
cast_to_string is a templated function which makes it easy to convert arbitrary objects to
std::wstring strings. The types supported are any types that can be written to std::wostream via
operator&lt;&lt;.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>cast_to_string</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
cast_to_string is a templated function which makes it easy to convert arbitrary objects to
std::string strings. The types supported are any types that can be written to std::ostream via
operator&lt;&lt;.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>string_cast</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
string_cast is a templated function which make it easy to convert strings to
other types. The types supported are any types that can be read by the basic_istream operator>>. It
also supports casting between wstring, string, and ustring objects.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>unichar</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a typedef for an unsigned 32bit integer which we use to store
Unicode values.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>basic_utf8_ifstream</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This object represents an input file stream much like the
normal std::ifstream except that it knows how to read UTF-8
data. So when you read characters out of this stream it will
automatically convert them from the UTF-8 multibyte encoding
into a fixed width wide character encoding.
<p>
There are also two typedefs of this object. The first is utf8_wifstream which is a
typedef for wchar_t as the wide character to read into. The second is utf8_uifstream
which uses unichar instead of wchar_t.
</p>
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>ustring</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a typedef for a std::basic_string&lt;unichar&gt;. That is, it is a typedef
for a string object that stores unichar Unicode characters.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>is_combining_char</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a global function that can tell you if a character is a Unicode
combining character or not.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>convert_utf8_to_utf32</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a global function that can convert UTF-8 strings into strings
of 32bit unichar characters.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>base64</name>
<file>dlib/base64.h</file>
<spec_file>dlib/base64/base64_kernel_abstract.h</spec_file>
<description>
This object allows you to encode and decode data to and from
the Base64 Content-Transfer-Encoding defined in section 6.8 of
rfc2045.
</description>
<examples>
<example>file_to_code_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>base64_kernel_1</name>
<file>dlib/base64/base64_kernel_1.h</file>
<description>
This implementation is done using a lookup table in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for base64_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>cmd_line_parser</name>
<file>dlib/cmd_line_parser.h</file>
<spec_file>dlib/cmd_line_parser/cmd_line_parser_kernel_abstract.h</spec_file>
<description>
This object allows you to easily parse a command line.
</description>
<examples>
<example>compress_stream_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>cmd_line_parser_kernel_1</name>
<file>dlib/cmd_line_parser/cmd_line_parser_kernel_1.h</file>
<description>
This implementation uses the <a href="containers.html#map">map</a> and <a href="containers.html#sequence">sequence</a>
containers to keep track of the command line options and arguments. For further details see the above link.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for cmd_line_parser_kernel_1 that uses map_kernel_1a and sequence_kernel_2a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>cmd_line_parser_check</name>
<spec_file>dlib/cmd_line_parser/cmd_line_parser_check_abstract.h</spec_file>
<description>
This gives a cmd_line_parser object the ability to easily perform various
kinds of validation on the command line input.
</description>
<implementations>
<implementation>
<name>cmd_line_parser_check_1</name>
<file>dlib/cmd_line_parser/cmd_line_parser_check_1.h</file>
<description>This implementation is done in the obvious way. See the source for details</description>
<typedefs>
<typedef>
<name>check_1a</name>
<description>is a typedef for cmd_line_parser_print_1 extended by cmd_line_parser_check_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
<extension>
<name>cmd_line_parser_print</name>
<spec_file>dlib/cmd_line_parser/cmd_line_parser_print_abstract.h</spec_file>
<description>This extension gives a cmd_line_parser object the ability to print its command line options
in a nice format.</description>
<implementations>
<implementation>
<name>cmd_line_parser_print_1</name>
<file>dlib/cmd_line_parser/cmd_line_parser_print_1.h</file>
<description>This implementation is done by enumerating the options of the parser and printing them.</description>
<typedefs>
<typedef>
<name>print_1a</name>
<description>is a typedef for cmd_line_parser_kernel_1 extended by cmd_line_parser_print_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>config_reader</name>
<file>dlib/config_reader.h</file>
<spec_file>dlib/config_reader/config_reader_kernel_abstract.h</spec_file>
<description>
This object represents something which is intended to be used to read
text configuration files.
</description>
<implementations>
<implementation>
<name>config_reader_kernel_1</name>
<file>dlib/config_reader/config_reader_kernel_1.h</file>
<description>
This implementation is done using the <a href="containers.html#map">map</a> object in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for config_reader_kernel_1 that uses map_kernel_1b</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>config_reader_thread_safe</name>
<spec_file>dlib/config_reader/config_reader_thread_safe_abstract.h</spec_file>
<description>
This object extends a normal config_reader by simply wrapping all
its member functions inside mutex locks to make it safe to use
in a threaded program.
</description>
<implementations>
<implementation>
<name>config_reader_thread_safe_1</name>
<file>dlib/config_reader/config_reader_thread_safe_1.h</file>
<description>This implementation is done in the obvious way. See the source for details</description>
<typedefs>
<typedef>
<name>thread_safe_1a</name>
<description>is a typedef for config_reader_kernel_1 extended by config_reader_thread_safe_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>cpp_pretty_printer</name>
<file>dlib/cpp_pretty_printer.h</file>
<spec_file>dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_abstract.h</spec_file>
<description>
This object represents an HTML pretty printer for C++ source code.
</description>
<implementations>
<implementation>
<name>cpp_pretty_printer_kernel_1</name>
<file>dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_1.h</file>
<description>
This is implemented by using the <a href="#cpp_tokenizer">cpp_tokenizer</a> object.
This is the pretty printer I use on all the source in this library. It applies a color scheme, turns
include directives such as #include "file.h" into links to file.h.html and puts HTML anchor points
on function and class declarations. It also looks for comments starting with /*!A and puts an anchor
before the comment using the word following the A as the name of the anchor.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for cpp_pretty_printer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>cpp_pretty_printer_kernel_2</name>
<file>dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_2.h</file>
<description>
This is implemented by using the <a href="#cpp_tokenizer">cpp_tokenizer</a> object.
It applies a black and white color scheme suitable
for printing on a black and white printer. It also places the document title
prominently at the top of the pretty printed source file.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for cpp_pretty_printer_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>cpp_tokenizer</name>
<file>dlib/cpp_tokenizer.h</file>
<spec_file>dlib/cpp_tokenizer/cpp_tokenizer_kernel_abstract.h</spec_file>
<description>
This object represents a simple tokenizer for C++ source code.
</description>
<implementations>
<implementation>
<name>cpp_tokenizer_kernel_1</name>
<file>dlib/cpp_tokenizer/cpp_tokenizer_kernel_1.h</file>
<description>
This is implemented by using the <a href="#tokenizer">tokenizer</a> object in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for cpp_tokenizer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>tokenizer</name>
<file>dlib/tokenizer.h</file>
<spec_file>dlib/tokenizer/tokenizer_kernel_abstract.h</spec_file>
<description>
This object represents a simple tokenizer for textual data.
</description>
<implementations>
<implementation>
<name>tokenizer_kernel_1</name>
<file>dlib/tokenizer/tokenizer_kernel_1.h</file>
<description>
This is implemented in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for tokenizer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>xml_parser</name>
<file>dlib/xml_parser.h</file>
<spec_file>dlib/xml_parser/xml_parser_kernel_abstract.h</spec_file>
<description>
This object represents a simple SAX style event driven XML parser.
It takes its input from an input stream object and sends events to all
registered document_handler and error_handler objects.
<br/><br/>
The xml_parser object also uses the interface classes
<a href="dlib/xml_parser/xml_parser_kernel_interfaces.h.html#document_handler">document_handler</a>
and
<a href="dlib/xml_parser/xml_parser_kernel_interfaces.h.html#error_handler">error_handler</a>.
Subclasses of these classes are passed to the xml_parser which generates events while it's
parsing and sends them to the appropriate handler.
</description>
<examples>
<example>xml_parser_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>xml_parser_kernel_1</name>
<file>dlib/xml_parser/xml_parser_kernel_1.h</file>
<description>
This implementation is done using a <a href="containers.html#stack">stack</a> (as opposed to recursive descent) to parse
xml documents. It also uses a <a href="containers.html#map">map</a> to implement the attribute_list interface and
internally uses the <a href="containers.html#sequence">sequence</a> object to keep track of all registered document and error
handlers.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for xml_parser_kernel_1 that uses map_kernel_1a, stack_kernel_1a, and sequence_kernel_2a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<doc>
<title>Parsing</title>
<!-- ************************************************************************* -->
<body>
<br/><br/>
<p>
This page documents the objects and functions that in some way deal with parsing or otherwise
manipulating text.
Everything here follows the same conventions as the rest of the library.
</p>
</body>
<!-- ************************************************************************* -->
<menu width="150">
<top>
<section>
<name>Objects</name>
<item>cmd_line_parser</item>
<item>config_reader</item>
<item>cpp_pretty_printer</item>
<item>cpp_tokenizer</item>
<item>tokenizer</item>
<item>xml_parser</item>
<item>base64</item>
<item>unichar</item>
<item>ustring</item>
<item>basic_utf8_ifstream</item>
</section>
<section>
<name>Global Functions</name>
<item>string_cast</item>
<item>cast_to_string</item>
<item>cast_to_wstring</item>
<item>wrap_string</item>
<item>narrow</item>
<item>trim</item>
<item>ltrim</item>
<item>rtrim</item>
<item>pad</item>
<item>lpad</item>
<item>rpad</item>
<item>left_substr</item>
<item>right_substr</item>
<item>tolower</item>
<item>toupper</item>
<item>convert_utf8_to_utf32</item>
<item>is_combining_char</item>
</section>
</top>
</menu>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<components>
<!-- ************************************************************************* -->
<component>
<name>toupper</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to convert a string to all uppercase.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>tolower</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to convert a string to all lowercase.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>right_substr</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to return the part of a string to the right of a user supplied delimiter.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>left_substr</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to return the part of a string to the left of a user supplied delimiter.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>rpad</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to pad whitespace (or user specfied characters) onto the right most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>lpad</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to pad whitespace (or user specfied characters) onto the left most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>pad</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to pad whitespace (or user specfied characters) onto the ends of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>rtrim</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to remove the whitespace (or user specfied characters) from the right most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>ltrim</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to remove the whitespace (or user specfied characters) from the left most end of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>trim</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function to remove the whitespace (or user specfied characters) from the ends of a string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>narrow</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
This is a function for converting a string of type std::string or std::wstring
to a plain std::string.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>wrap_string</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
wrap_string is a function that takes a string and breaks it into a number of
lines of a given length. You can use this to make a string
fit nicely into a command prompt window for example.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>cast_to_wstring</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
cast_to_string is a templated function which makes it easy to convert arbitrary objects to
std::wstring strings. The types supported are any types that can be written to std::wostream via
operator&lt;&lt;.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>cast_to_string</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
cast_to_string is a templated function which makes it easy to convert arbitrary objects to
std::string strings. The types supported are any types that can be written to std::ostream via
operator&lt;&lt;.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>string_cast</name>
<file>dlib/string.h</file>
<spec_file link="true">dlib/string/string_abstract.h</spec_file>
<description>
string_cast is a templated function which make it easy to convert strings to
other types. The types supported are any types that can be read by the basic_istream operator>>. It
also supports casting between wstring, string, and ustring objects.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>unichar</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a typedef for an unsigned 32bit integer which we use to store
Unicode values.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>basic_utf8_ifstream</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This object represents an input file stream much like the
normal std::ifstream except that it knows how to read UTF-8
data. So when you read characters out of this stream it will
automatically convert them from the UTF-8 multibyte encoding
into a fixed width wide character encoding.
<p>
There are also two typedefs of this object. The first is utf8_wifstream which is a
typedef for wchar_t as the wide character to read into. The second is utf8_uifstream
which uses unichar instead of wchar_t.
</p>
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>ustring</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a typedef for a std::basic_string&lt;unichar&gt;. That is, it is a typedef
for a string object that stores unichar Unicode characters.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>is_combining_char</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a global function that can tell you if a character is a Unicode
combining character or not.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>convert_utf8_to_utf32</name>
<file>dlib/unicode.h</file>
<spec_file link="true">dlib/unicode/unicode_abstract.h</spec_file>
<description>
This is a global function that can convert UTF-8 strings into strings
of 32bit unichar characters.
</description>
</component>
<!-- ************************************************************************* -->
<component>
<name>base64</name>
<file>dlib/base64.h</file>
<spec_file>dlib/base64/base64_kernel_abstract.h</spec_file>
<description>
This object allows you to encode and decode data to and from
the Base64 Content-Transfer-Encoding defined in section 6.8 of
rfc2045.
</description>
<examples>
<example>file_to_code_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>base64_kernel_1</name>
<file>dlib/base64/base64_kernel_1.h</file>
<description>
This implementation is done using a lookup table in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for base64_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>cmd_line_parser</name>
<file>dlib/cmd_line_parser.h</file>
<spec_file>dlib/cmd_line_parser/cmd_line_parser_kernel_abstract.h</spec_file>
<description>
This object allows you to easily parse a command line.
</description>
<examples>
<example>compress_stream_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>cmd_line_parser_kernel_1</name>
<file>dlib/cmd_line_parser/cmd_line_parser_kernel_1.h</file>
<description>
This implementation uses the <a href="containers.html#map">map</a> and <a href="containers.html#sequence">sequence</a>
containers to keep track of the command line options and arguments. For further details see the above link.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for cmd_line_parser_kernel_1 that uses map_kernel_1a and sequence_kernel_2a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>cmd_line_parser_check</name>
<spec_file>dlib/cmd_line_parser/cmd_line_parser_check_abstract.h</spec_file>
<description>
This gives a cmd_line_parser object the ability to easily perform various
kinds of validation on the command line input.
</description>
<implementations>
<implementation>
<name>cmd_line_parser_check_1</name>
<file>dlib/cmd_line_parser/cmd_line_parser_check_1.h</file>
<description>This implementation is done in the obvious way. See the source for details</description>
<typedefs>
<typedef>
<name>check_1a</name>
<description>is a typedef for cmd_line_parser_print_1 extended by cmd_line_parser_check_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
<extension>
<name>cmd_line_parser_print</name>
<spec_file>dlib/cmd_line_parser/cmd_line_parser_print_abstract.h</spec_file>
<description>This extension gives a cmd_line_parser object the ability to print its command line options
in a nice format.</description>
<implementations>
<implementation>
<name>cmd_line_parser_print_1</name>
<file>dlib/cmd_line_parser/cmd_line_parser_print_1.h</file>
<description>This implementation is done by enumerating the options of the parser and printing them.</description>
<typedefs>
<typedef>
<name>print_1a</name>
<description>is a typedef for cmd_line_parser_kernel_1 extended by cmd_line_parser_print_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>config_reader</name>
<file>dlib/config_reader.h</file>
<spec_file>dlib/config_reader/config_reader_kernel_abstract.h</spec_file>
<description>
This object represents something which is intended to be used to read
text configuration files.
</description>
<implementations>
<implementation>
<name>config_reader_kernel_1</name>
<file>dlib/config_reader/config_reader_kernel_1.h</file>
<description>
This implementation is done using the <a href="containers.html#map">map</a> object in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for config_reader_kernel_1 that uses map_kernel_1b</description>
</typedef>
</typedefs>
</implementation>
</implementations>
<extensions>
<extension>
<name>config_reader_thread_safe</name>
<spec_file>dlib/config_reader/config_reader_thread_safe_abstract.h</spec_file>
<description>
This object extends a normal config_reader by simply wrapping all
its member functions inside mutex locks to make it safe to use
in a threaded program.
</description>
<implementations>
<implementation>
<name>config_reader_thread_safe_1</name>
<file>dlib/config_reader/config_reader_thread_safe_1.h</file>
<description>This implementation is done in the obvious way. See the source for details</description>
<typedefs>
<typedef>
<name>thread_safe_1a</name>
<description>is a typedef for config_reader_kernel_1 extended by config_reader_thread_safe_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</extension>
</extensions>
</component>
<!-- ************************************************************************* -->
<component>
<name>cpp_pretty_printer</name>
<file>dlib/cpp_pretty_printer.h</file>
<spec_file>dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_abstract.h</spec_file>
<description>
This object represents an HTML pretty printer for C++ source code.
</description>
<implementations>
<implementation>
<name>cpp_pretty_printer_kernel_1</name>
<file>dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_1.h</file>
<description>
This is implemented by using the <a href="#cpp_tokenizer">cpp_tokenizer</a> object.
This is the pretty printer I use on all the source in this library. It applies a color scheme, turns
include directives such as #include "file.h" into links to file.h.html and puts HTML anchor points
on function and class declarations. It also looks for comments starting with /*!A and puts an anchor
before the comment using the word following the A as the name of the anchor.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for cpp_pretty_printer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
<implementation>
<name>cpp_pretty_printer_kernel_2</name>
<file>dlib/cpp_pretty_printer/cpp_pretty_printer_kernel_2.h</file>
<description>
This is implemented by using the <a href="#cpp_tokenizer">cpp_tokenizer</a> object.
It applies a black and white color scheme suitable
for printing on a black and white printer. It also places the document title
prominently at the top of the pretty printed source file.
</description>
<typedefs>
<typedef>
<name>kernel_2a</name>
<description>is a typedef for cpp_pretty_printer_kernel_2</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>cpp_tokenizer</name>
<file>dlib/cpp_tokenizer.h</file>
<spec_file>dlib/cpp_tokenizer/cpp_tokenizer_kernel_abstract.h</spec_file>
<description>
This object represents a simple tokenizer for C++ source code.
</description>
<implementations>
<implementation>
<name>cpp_tokenizer_kernel_1</name>
<file>dlib/cpp_tokenizer/cpp_tokenizer_kernel_1.h</file>
<description>
This is implemented by using the <a href="#tokenizer">tokenizer</a> object in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for cpp_tokenizer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>tokenizer</name>
<file>dlib/tokenizer.h</file>
<spec_file>dlib/tokenizer/tokenizer_kernel_abstract.h</spec_file>
<description>
This object represents a simple tokenizer for textual data.
</description>
<implementations>
<implementation>
<name>tokenizer_kernel_1</name>
<file>dlib/tokenizer/tokenizer_kernel_1.h</file>
<description>
This is implemented in the obvious way.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for tokenizer_kernel_1</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
<component checked="true">
<name>xml_parser</name>
<file>dlib/xml_parser.h</file>
<spec_file>dlib/xml_parser/xml_parser_kernel_abstract.h</spec_file>
<description>
This object represents a simple SAX style event driven XML parser.
It takes its input from an input stream object and sends events to all
registered document_handler and error_handler objects.
<br/><br/>
The xml_parser object also uses the interface classes
<a href="dlib/xml_parser/xml_parser_kernel_interfaces.h.html#document_handler">document_handler</a>
and
<a href="dlib/xml_parser/xml_parser_kernel_interfaces.h.html#error_handler">error_handler</a>.
Subclasses of these classes are passed to the xml_parser which generates events while it's
parsing and sends them to the appropriate handler.
</description>
<examples>
<example>xml_parser_ex.cpp.html</example>
</examples>
<implementations>
<implementation>
<name>xml_parser_kernel_1</name>
<file>dlib/xml_parser/xml_parser_kernel_1.h</file>
<description>
This implementation is done using a <a href="containers.html#stack">stack</a> (as opposed to recursive descent) to parse
xml documents. It also uses a <a href="containers.html#map">map</a> to implement the attribute_list interface and
internally uses the <a href="containers.html#sequence">sequence</a> object to keep track of all registered document and error
handlers.
</description>
<typedefs>
<typedef>
<name>kernel_1a</name>
<description>is a typedef for xml_parser_kernel_1 that uses map_kernel_1a, stack_kernel_1a, and sequence_kernel_2a</description>
</typedef>
</typedefs>
</implementation>
</implementations>
</component>
<!-- ************************************************************************* -->
</components>
<!-- ************************************************************************* -->
</doc>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes' />
<!-- ************************************************************************* -->
<xsl:variable name="is_chm">true</xsl:variable>
<xsl:variable name="main_menu">main_menu.xml</xsl:variable>
<xsl:variable name="project_name">dlib C++ Library</xsl:variable>
<!-- ************************************************************************* -->
<!-- This is the ID you get from Google Webmaster Tools -->
<xsl:variable name="google_verify_id">02MiiaFNVzS5/u0eQhsy3/knioFHsia1X3DXRpHkE6I=</xsl:variable>
<!-- ************************************************************************* -->
<xsl:variable name="last_modified_date_var">_LAST_MODIFIED_DATE_</xsl:variable>
<xsl:variable name="current_release_var">_CURRENT_RELEASE_</xsl:variable>
<xsl:template match="last_modified_date"><xsl:value-of select="$last_modified_date_var"/></xsl:template>
<xsl:template match="current_release"><xsl:value-of select="$current_release_var"/></xsl:template>
<!-- ************************************************************************* -->
<xsl:variable name="gray">#E3E3E3</xsl:variable>
<xsl:variable name="background_color">#EDF3EE</xsl:variable>
<xsl:variable name="main_width">62em</xsl:variable>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz </xsl:variable>
<xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ </xsl:variable>
<!-- ************************************************************************* -->
<xsl:template match="/doc">
<html>
<head>
<!-- Verify with Google -->
<meta name="verify-v1" content="{$google_verify_id}" />
<title>
<xsl:value-of select="$project_name"/>
<xsl:if test="title">
- <xsl:value-of select="title" />
</xsl:if>
</title>
<!-- [client side code for collapsing and unfolding branches] -->
<script language="JavaScript">
// ---------------------------------------------
// --- Name: Easy DHTML Treeview --
// --- Author: D.D. de Kerf --
// --- Version: 0.2 Date: 13-6-2001 --
// ---------------------------------------------
function Toggle(node)
{
// Unfold the branch if it isn't visible
var next_node = node.nextSibling;
if (next_node.style.display == 'none')
{
// Change the image (if there is an image)
if (node.childNodes.length > 0)
{
if (node.childNodes.length > 0)
{
if (node.childNodes.item(0).nodeName == "IMG")
{
node.childNodes.item(0).src = "minus.gif";
}
}
}
next_node.style.display = 'block';
}
// Collapse the branch if it IS visible
else
{
// Change the image (if there is an image)
if (node.childNodes.length > 0)
{
if (node.childNodes.length > 0)
{
if (node.childNodes.item(0).nodeName == "IMG")
{
node.childNodes.item(0).src = "plus.gif";
}
}
}
next_node.style.display = 'none';
}
}
</script>
<style type="text/css">
body {margin:0px;}
pre {margin:0px;}
ul.tree li { list-style: none; }
ul.tree { margin:0px; padding:0px; margin-left:13px; cursor: pointer;}
ul.tree li ul { margin-left:16px; padding:0px; }
div#component {
background-color:white;
border: 2px solid rgb(102,102,102);
text-align:left;
margin-top: 1.5em;
padding: 0.7em;
}
div#logb {
text-align:left;
padding: 0.0em;
float: left;
background-color:#c0c0c0;
border: double ;
margin: 0.5em;
}
.bdotted {border-bottom: 1px dotted}
.bdashed {border-bottom: 1px dashed}
.bsolid {border-bottom: 1px solid}
.bdouble {border-bottom: 1px double}
.bgroove {border-bottom: 1px groove}
.bridge {border-bottom: 1px ridge}
.binset {border-bottom: 1px inset}
.boutset {border-bottom: 1px outset}
div#row1 {
background-color:#dfdfdf;
}
div#row2 {
background-color:#f2f2f2;
}
div#typedefs {
margin-left: 1.5em;
margin-top: 0.2em;
border: 1px dotted;
width: 52em;
}
div#tdn {
width: 10em;
}
.fullhr {
clear: both;
}
body {
text-align: center;
}
div#entire_page {
width:<xsl:value-of select="$main_width"/>;
text-align: left;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body bgcolor="{$background_color}">
<a name="top" />
<div id="entire_page">
<table bgcolor="white" height="100%" bordercolor="{$background_color}" CELLSPACING="0" CELLPADDING="10">
<tr height="100%">
<xsl:apply-templates select="document($main_menu)/doc/menu"/>
<!-- ************************************************************************* -->
<td VALIGN="TOP" width="100%">
<xsl:if test="title">
<center><h1> <xsl:value-of select="title" /> </h1></center>
</xsl:if>
<xsl:apply-templates select="body"/>
</td>
<!-- ************************************************************************* -->
<xsl:choose>
<xsl:when test="menu/@from_file">
<xsl:apply-templates select="document(menu/@from_file)/doc/menu">
<xsl:with-param name="file_name" select="concat(substring-before(menu/@from_file,'.'),'.html')" />
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="menu"/>
</xsl:otherwise>
</xsl:choose>
<!-- ************************************************************************* -->
</tr>
</table>
<xsl:apply-templates select="components"/>
</div>
</body>
</html>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="section">
<xsl:param name="file_name" />
<b><xsl:value-of select="name"/></b>
<ul class="tree">
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:for-each>
</ul>
<br/>
</xsl:template>
<xsl:template match="top">
<xsl:param name="file_name" />
<xsl:apply-templates>
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:template>
<xsl:template match="bottom">
<xsl:param name="file_name" />
<xsl:apply-templates>
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:template>
<xsl:template match="menu">
<xsl:param name="file_name" />
<td BGCOLOR="{$gray}" VALIGN="TOP" height="100%">
<br/>
<table WIDTH="{@width}" height="100%">
<tr><td VALIGN="TOP">
<xsl:apply-templates select="top">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</td><td width="1"></td></tr>
<tr><td valign="bottom">
<xsl:apply-templates select="bottom">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</td></tr>
</table>
</td>
</xsl:template>
<xsl:template match="item">
<xsl:param name="file_name" />
<li>
<xsl:choose>
<xsl:when test="@nolink = 'true'">
<xsl:choose>
<xsl:when test="name">
<a onclick="Toggle(this)"><img src="plus.gif"/><font color="green"><u><xsl:value-of select="name"/></u></font></a>
<xsl:apply-templates select="sub">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates>
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="name">
<xsl:choose>
<xsl:when test="sub">
<xsl:choose>
<xsl:when test="link">
<a href="{link}"><img src="right.gif" border="0"/></a>
<a onclick="Toggle(this)"><img src="plus.gif" border="0"/><font color="green"><u><xsl:value-of select="name"/></u></font></a>
<xsl:apply-templates select="sub">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<a href="{$file_name}#{name}"><img src="down.gif" border="0"/></a>
<a onclick="Toggle(this)"><img src="plus.gif" border="0"/><font color="green"><u><xsl:value-of select="name"/></u></font></a>
<xsl:apply-templates select="sub">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="link">
<a href="{link}"><xsl:value-of select="name"/></a>
</xsl:when>
<xsl:otherwise>
<a href="{$file_name}#{name}"><xsl:value-of select="name"/></a>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<a href="{$file_name}#{.}"><xsl:value-of select="."/></a>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:template>
<xsl:template match="sub">
<xsl:param name="file_name" />
<ul style="display:none;">
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:for-each>
</ul>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="components">
<xsl:for-each select="component">
<xsl:sort select="translate(name,$lcletters, $ucletters)"/>
<xsl:variable name="checked" select="@checked"/>
<a name = "{name}">
<div id="component" >
<a href="#top"><font size='2'><center>[top]</center></font></a>
<h1 style="margin:0px;"><xsl:value-of select="name"/></h1>
<BR/>
<BR/>
<xsl:apply-templates select="description"/>
<xsl:if test="spec_file">
<BR/>
<xsl:choose>
<xsl:when test="spec_file/@link = 'true'">
<BR/>
<b>Specification: </b> <a href="{spec_file}.html#{name}"><xsl:value-of select="spec_file"/></a>
</xsl:when>
<xsl:otherwise>
<BR/>
<b>Specification: </b> <a href="{spec_file}.html"><xsl:value-of select="spec_file"/></a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="file">
<BR/><B>File to include: </B> <a href="{file}.html"><xsl:value-of select="file"/></a>
</xsl:if>
<xsl:if test="body_file">
<BR/>
The body for the <xsl:value-of select="name"/> component can be found
here: <a href="{body_file}.html#{name}"><xsl:value-of select="body_file"/></a>
</xsl:if>
<xsl:apply-templates select="examples"/>
<xsl:apply-templates select="implementations">
<xsl:with-param name="checked" select="$checked" />
</xsl:apply-templates>
<xsl:choose>
<xsl:when test="implementations"></xsl:when>
<xsl:otherwise><br/><br/></xsl:otherwise>
</xsl:choose>
<xsl:if test="extensions">
<center>
<HR align='center'/>
<h2>Extensions to <xsl:value-of select="name"/></h2>
</center>
<xsl:for-each select="extensions/extension">
<xsl:sort select="translate(name,$lcletters, $ucletters)"/>
<BR/><a name="{name}"><B><font size='4'><xsl:value-of select="name"/>:</font></B></a><Br/>
<xsl:apply-templates select="description"/>
<BR/>
<BR/>
<b>Specification: </b> <a href="{spec_file}.html"><xsl:value-of select="spec_file"/></a>
<xsl:apply-templates select="examples"/>
<xsl:apply-templates select="implementations">
<xsl:with-param name="checked" select="$checked" />
</xsl:apply-templates>
<xsl:if test="position() != last()">
<HR width='20%' align='left'/>
</xsl:if>
</xsl:for-each>
</xsl:if>
<!-- putting this empty center tag here, for whatever reason, prevents IE from
messing up the space between these div blocks -->
<center></center>
</div>
</a>
</xsl:for-each>
</xsl:template>
<xsl:template match="examples">
<BR/><b>Code Examples: </b>
<xsl:for-each select="example">
<xsl:choose>
<xsl:when test="position() = last()">
<a href="{.}"><xsl:value-of select="position()"/></a>
</xsl:when>
<xsl:otherwise>
<a href="{.}"><xsl:value-of select="position()"/></a>,
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template match="implementations">
<xsl:param name="checked" />
<BR/><BR/><B>Implementations:</B>
<xsl:choose>
<xsl:when test="implementation/typedefs">
<xsl:for-each select="implementation">
<blockquote>
<a href="{file}.html"><xsl:value-of select="name"/></a>:
<xsl:if test="typedefs"><br/></xsl:if>
<xsl:apply-templates select="description"/>
<xsl:apply-templates select="typedefs">
<xsl:with-param name="checked" select="$checked"/>
</xsl:apply-templates>
</blockquote>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<blockquote>
<xsl:for-each select="implementation">
<a href="{file}.html"><xsl:value-of select="name"/></a>:
<xsl:apply-templates select="description"/>
<br/>
</xsl:for-each>
</blockquote>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="typedefs">
<xsl:param name="checked" />
<div id="typedefs"><table CELLSPACING='0' CELLPADDING='0' bgcolor="white" >
<xsl:for-each select="typedef">
<xsl:choose>
<xsl:when test="$checked = 'true'">
<tr><td bgcolor="{$gray}" valign="top">
<div id="tdn"><xsl:value-of select="name"/></div>
</td><td width="100%" bgcolor="{$gray}">
<xsl:apply-templates select="description"/>
</td></tr>
<tr><td valign="top">
<div id="tdn"><xsl:value-of select="name"/>_c</div>
</td><td width="100%">
is a typedef for <xsl:value-of select="name"/> that checks its preconditions.
</td></tr>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="position() mod 2 = 0">
<tr><td valign="top">
<div id="tdn"><xsl:value-of select="name"/></div>
</td><td width="100%">
<xsl:apply-templates select="description"/>
</td></tr>
</xsl:when>
<xsl:otherwise>
<tr><td bgcolor="{$gray}" valign="top">
<div id="tdn"><xsl:value-of select="name"/></div>
</td><td width="100%" bgcolor="{$gray}">
<xsl:apply-templates select="description"/>
</td></tr>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table></div>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="release_notes">
<h1 style="margin:0px;">Release <xsl:value-of select="$current_release_var"/></h1>
<u>Release date</u>: <xsl:value-of select="$last_modified_date_var"/>
<br/>
<u>Major Changes in this Release</u>:
<table cellspacing="5" cellpadding="0" width="100%">
<tr>
<td width="15"></td>
<td><pre><xsl:value-of select="current"/></pre></td>
</tr>
</table>
<xsl:for-each select="old">
<xsl:if test="position() &lt; 10">
<hr/>
<h1 style="margin:0px;">Release <xsl:value-of select="@name"/></h1>
<xsl:if test="@date">
<u>Release date</u>: <xsl:value-of select="@date"/>
</xsl:if>
<br/>
<u>Major Changes in this Release</u>:
<table cellspacing="5" cellpadding="0" width="100%">
<tr>
<td width="15"></td>
<td><pre><xsl:value-of select="."/></pre></td>
</tr>
</table>
</xsl:if>
</xsl:for-each>
<br/>
<br/>
<br/>
<center><a href="old_release_notes.html">Old Release Notes</a></center>
<br/>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="old_release_notes">
<xsl:for-each select="document('release_notes.xml')/doc/body/release_notes/old">
<xsl:if test="position() &gt;= 10">
<h1 style="margin:0px;">Release <xsl:value-of select="@name"/></h1>
<xsl:if test="@date">
<u>Release date</u>: <xsl:value-of select="@date"/>
</xsl:if>
<br/>
<u>Major Changes in this Release</u>:
<table cellspacing="5" cellpadding="0" width="100%">
<tr>
<td width="15"></td>
<td><pre><xsl:value-of select="."/></pre></td>
</tr>
</table>
<xsl:if test="position() != last()">
<hr/>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="description">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="body">
<xsl:choose>
<xsl:when test="@from_file">
<xsl:apply-templates select="document(@from_file)"/>
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text">
<br/>
<pre><xsl:apply-templates/></pre>
</xsl:template>
<xsl:template match="h3">
<a name="{.}"/>
<h3>
<xsl:apply-templates/>
</h3>
</xsl:template>
<xsl:template match="h2">
<a name="{.}"/>
<h2>
<xsl:apply-templates/>
</h2>
</xsl:template>
<xsl:template match="h1">
<a name="{.}"/>
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
<xsl:template match="p">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="center">
<center>
<xsl:apply-templates/>
</center>
</xsl:template>
<xsl:template match="pre">
<pre>
<xsl:apply-templates/>
</pre>
</xsl:template>
<xsl:template match="blockquote">
<blockquote>
<xsl:apply-templates/>
</blockquote>
</xsl:template>
<xsl:template match="anchor">
<a name="{.}"/>
</xsl:template>
<xsl:template match="br">
<br/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="a">
<a href="{@href}">
<xsl:apply-templates/>
</a>
</xsl:template>
<xsl:template match="script">
<script type="{@type}" language="{@language}" src="{@src}">
<xsl:apply-templates/>
</script>
</xsl:template>
<xsl:template match="tt">
<tt>
<xsl:apply-templates/>
</tt>
</xsl:template>
<xsl:template match="chm">
<xsl:if test="$is_chm = 'true'">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="web">
<xsl:if test="$is_chm != 'true'">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="li">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="ul">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="u">
<u>
<xsl:apply-templates/>
</u>
</xsl:template>
<xsl:template match="i">
<i>
<xsl:apply-templates/>
</i>
</xsl:template>
<xsl:template match="b">
<b>
<xsl:apply-templates/>
</b>
</xsl:template>
<xsl:template match="U">
<u>
<xsl:apply-templates/>
</u>
</xsl:template>
<xsl:template match="I">
<i>
<xsl:apply-templates/>
</i>
</xsl:template>
<xsl:template match="B">
<b>
<xsl:apply-templates/>
</b>
</xsl:template>
<xsl:template match="font">
<font color="{@color}">
<xsl:apply-templates/>
</font>
</xsl:template>
<xsl:template match="img">
<img src="{@src}" border="0">
<xsl:apply-templates/>
</img>
</xsl:template>
<xsl:template name="term_list_go">
<xsl:param name="num"/>
<xsl:if test="$num &lt; 27">
<ul>
<xsl:variable name="cur_letter" select="substring($ucletters, $num, 1)"/>
<a name="{$cur_letter}"/>
<h1><xsl:value-of select="$cur_letter"/></h1>
<xsl:for-each select="term">
<xsl:sort order="ascending" select="translate(@name,$lcletters, $ucletters)"/>
<xsl:if test="$cur_letter = substring(translate(@name,$lcletters, $ucletters),1,1)">
<xsl:choose>
<xsl:when test="@link">
<li><a href="{@link}"><xsl:value-of select="@name"/></a></li>
</xsl:when>
<xsl:otherwise>
<li> <xsl:value-of select="@name"/>
<ul>
<xsl:for-each select="term">
<xsl:sort order="ascending" select="translate(@name,$lcletters, $ucletters)"/>
<li><a href="{@link}"><xsl:value-of select="@name"/></a></li>
</xsl:for-each>
</ul>
</li>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</ul>
<xsl:call-template name="term_list_go" >
<xsl:with-param name="num" select="$num + 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="term_list">
<center>
<a href="#A">[A]</a>
<a href="#B">[B]</a>
<a href="#C">[C]</a>
<a href="#D">[D]</a>
<a href="#E">[E]</a>
<a href="#F">[F]</a>
<a href="#G">[G]</a>
<a href="#H">[H]</a>
<a href="#I">[I]</a>
<a href="#J">[J]</a>
<a href="#K">[K]</a>
<a href="#L">[L]</a>
<a href="#M">[M]</a>
<a href="#N">[N]</a>
<a href="#O">[O]</a>
<a href="#P">[P]</a>
<a href="#Q">[Q]</a>
<a href="#R">[R]</a>
<a href="#S">[S]</a>
<a href="#T">[T]</a>
<a href="#U">[U]</a>
<a href="#V">[V]</a>
<a href="#W">[W]</a>
<a href="#X">[X]</a>
<a href="#Y">[Y]</a>
<a href="#Z">[Z]</a>
</center>
<xsl:call-template name="term_list_go" >
<xsl:with-param name="num" select="1"/>
</xsl:call-template>
</xsl:template>
<!-- This function turns a string of the form 2006-03-21T02:35:20.510956Z into a nice
normal looking date -->
<xsl:template name="format-date">
<xsl:param name="xsd-date"/>
<xsl:variable name="date" select="substring-before($xsd-date,'T')"/>
<xsl:variable name="time" select="substring-before(substring-after($xsd-date,'T'),'.')"/>
<xsl:variable name="year" select="substring($date,1,4)"/>
<xsl:variable name="month" select="substring($date,6,2)"/>
<xsl:variable name="day" select="substring($date,9,2)"/>
<xsl:variable name="hour" select="substring($time,1,2)"/>
<xsl:variable name="minute" select="substring($time,4,2)"/>
<xsl:variable name="second" select="substring($time,7,2)"/>
<xsl:choose>
<xsl:when test="$month = 1">Jan </xsl:when>
<xsl:when test="$month = 2">Feb </xsl:when>
<xsl:when test="$month = 3">Mar </xsl:when>
<xsl:when test="$month = 4">Apr </xsl:when>
<xsl:when test="$month = 5">May </xsl:when>
<xsl:when test="$month = 6">Jun </xsl:when>
<xsl:when test="$month = 7">Jul </xsl:when>
<xsl:when test="$month = 8">Aug </xsl:when>
<xsl:when test="$month = 9">Sep </xsl:when>
<xsl:when test="$month = 10">Oct </xsl:when>
<xsl:when test="$month = 11">Nov </xsl:when>
<xsl:when test="$month = 12">Dec </xsl:when>
</xsl:choose>
<xsl:value-of select="$day"/>, <xsl:value-of select="$year"/>
(<xsl:value-of select="$hour"/>:<xsl:value-of select="$minute"/>:<xsl:value-of select="$second"/> UTC)
</xsl:template>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ******* Subversion stylesheet stfuff ******************** -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<xsl:template match="log">
<xsl:for-each select="logentry">
<xsl:sort order="descending" data-type="number" select="./@revision"/>
<u>Revision</u>: <xsl:value-of select="@revision"/> <br/>
<u>Date</u>: <xsl:call-template name="format-date"><xsl:with-param name="xsd-date" select="date"/></xsl:call-template> <br/>
<xsl:apply-templates select="msg"/>
<xsl:apply-templates select="paths"/>
<hr class="fullhr"/>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template name="paths">
<xsl:param name="type"/>
<xsl:param name="name"/>
<xsl:param name="color"/>
<xsl:if test="path[@action=$type]">
<div id="logb">
<div class="bsolid"><b><font color="{$color}"><xsl:value-of select="$name"/></font></b></div>
<xsl:for-each select="path[@action = $type]">
<xsl:sort select="."/>
<xsl:choose>
<xsl:when test="position() mod 2 = 0">
<div id="row1"><xsl:value-of select="."/></div>
</xsl:when>
<xsl:otherwise>
<div id="row2"><xsl:value-of select="."/></div>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</div>
</xsl:if>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="paths">
<xsl:call-template name="paths">
<xsl:with-param name="type">M</xsl:with-param>
<xsl:with-param name="name">Modified</xsl:with-param>
<xsl:with-param name="color">black</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="paths">
<xsl:with-param name="type">A</xsl:with-param>
<xsl:with-param name="name">Added</xsl:with-param>
<xsl:with-param name="color">blue</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="paths">
<xsl:with-param name="type">D</xsl:with-param>
<xsl:with-param name="name">Deleted</xsl:with-param>
<xsl:with-param name="color">red</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="msg">
<pre><xsl:value-of select="."/></pre>
</xsl:template>
<!-- ************************************************************************* -->
</xsl:stylesheet>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes' />
<!-- ************************************************************************* -->
<xsl:variable name="is_chm">true</xsl:variable>
<xsl:variable name="main_menu">main_menu.xml</xsl:variable>
<xsl:variable name="project_name">dlib C++ Library</xsl:variable>
<!-- ************************************************************************* -->
<!-- This is the ID you get from Google Webmaster Tools -->
<xsl:variable name="google_verify_id">02MiiaFNVzS5/u0eQhsy3/knioFHsia1X3DXRpHkE6I=</xsl:variable>
<!-- ************************************************************************* -->
<xsl:variable name="last_modified_date_var">_LAST_MODIFIED_DATE_</xsl:variable>
<xsl:variable name="current_release_var">_CURRENT_RELEASE_</xsl:variable>
<xsl:template match="last_modified_date"><xsl:value-of select="$last_modified_date_var"/></xsl:template>
<xsl:template match="current_release"><xsl:value-of select="$current_release_var"/></xsl:template>
<!-- ************************************************************************* -->
<xsl:variable name="gray">#E3E3E3</xsl:variable>
<xsl:variable name="background_color">#EDF3EE</xsl:variable>
<xsl:variable name="main_width">62em</xsl:variable>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz </xsl:variable>
<xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ </xsl:variable>
<!-- ************************************************************************* -->
<xsl:template match="/doc">
<html>
<head>
<!-- Verify with Google -->
<meta name="verify-v1" content="{$google_verify_id}" />
<title>
<xsl:value-of select="$project_name"/>
<xsl:if test="title">
- <xsl:value-of select="title" />
</xsl:if>
</title>
<!-- [client side code for collapsing and unfolding branches] -->
<script language="JavaScript">
// ---------------------------------------------
// --- Name: Easy DHTML Treeview --
// --- Author: D.D. de Kerf --
// --- Version: 0.2 Date: 13-6-2001 --
// ---------------------------------------------
function Toggle(node)
{
// Unfold the branch if it isn't visible
var next_node = node.nextSibling;
if (next_node.style.display == 'none')
{
// Change the image (if there is an image)
if (node.childNodes.length > 0)
{
if (node.childNodes.length > 0)
{
if (node.childNodes.item(0).nodeName == "IMG")
{
node.childNodes.item(0).src = "minus.gif";
}
}
}
next_node.style.display = 'block';
}
// Collapse the branch if it IS visible
else
{
// Change the image (if there is an image)
if (node.childNodes.length > 0)
{
if (node.childNodes.length > 0)
{
if (node.childNodes.item(0).nodeName == "IMG")
{
node.childNodes.item(0).src = "plus.gif";
}
}
}
next_node.style.display = 'none';
}
}
</script>
<style type="text/css">
body {margin:0px;}
pre {margin:0px;}
ul.tree li { list-style: none; }
ul.tree { margin:0px; padding:0px; margin-left:13px; cursor: pointer;}
ul.tree li ul { margin-left:16px; padding:0px; }
div#component {
background-color:white;
border: 2px solid rgb(102,102,102);
text-align:left;
margin-top: 1.5em;
padding: 0.7em;
}
div#logb {
text-align:left;
padding: 0.0em;
float: left;
background-color:#c0c0c0;
border: double ;
margin: 0.5em;
}
.bdotted {border-bottom: 1px dotted}
.bdashed {border-bottom: 1px dashed}
.bsolid {border-bottom: 1px solid}
.bdouble {border-bottom: 1px double}
.bgroove {border-bottom: 1px groove}
.bridge {border-bottom: 1px ridge}
.binset {border-bottom: 1px inset}
.boutset {border-bottom: 1px outset}
div#row1 {
background-color:#dfdfdf;
}
div#row2 {
background-color:#f2f2f2;
}
div#typedefs {
margin-left: 1.5em;
margin-top: 0.2em;
border: 1px dotted;
width: 52em;
}
div#tdn {
width: 10em;
}
.fullhr {
clear: both;
}
body {
text-align: center;
}
div#entire_page {
width:<xsl:value-of select="$main_width"/>;
text-align: left;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body bgcolor="{$background_color}">
<a name="top" />
<div id="entire_page">
<table bgcolor="white" height="100%" bordercolor="{$background_color}" CELLSPACING="0" CELLPADDING="10">
<tr height="100%">
<xsl:apply-templates select="document($main_menu)/doc/menu"/>
<!-- ************************************************************************* -->
<td VALIGN="TOP" width="100%">
<xsl:if test="title">
<center><h1> <xsl:value-of select="title" /> </h1></center>
</xsl:if>
<xsl:apply-templates select="body"/>
</td>
<!-- ************************************************************************* -->
<xsl:choose>
<xsl:when test="menu/@from_file">
<xsl:apply-templates select="document(menu/@from_file)/doc/menu">
<xsl:with-param name="file_name" select="concat(substring-before(menu/@from_file,'.'),'.html')" />
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="menu"/>
</xsl:otherwise>
</xsl:choose>
<!-- ************************************************************************* -->
</tr>
</table>
<xsl:apply-templates select="components"/>
</div>
</body>
</html>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="section">
<xsl:param name="file_name" />
<b><xsl:value-of select="name"/></b>
<ul class="tree">
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:for-each>
</ul>
<br/>
</xsl:template>
<xsl:template match="top">
<xsl:param name="file_name" />
<xsl:apply-templates>
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:template>
<xsl:template match="bottom">
<xsl:param name="file_name" />
<xsl:apply-templates>
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:template>
<xsl:template match="menu">
<xsl:param name="file_name" />
<td BGCOLOR="{$gray}" VALIGN="TOP" height="100%">
<br/>
<table WIDTH="{@width}" height="100%">
<tr><td VALIGN="TOP">
<xsl:apply-templates select="top">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</td><td width="1"></td></tr>
<tr><td valign="bottom">
<xsl:apply-templates select="bottom">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</td></tr>
</table>
</td>
</xsl:template>
<xsl:template match="item">
<xsl:param name="file_name" />
<li>
<xsl:choose>
<xsl:when test="@nolink = 'true'">
<xsl:choose>
<xsl:when test="name">
<a onclick="Toggle(this)"><img src="plus.gif"/><font color="green"><u><xsl:value-of select="name"/></u></font></a>
<xsl:apply-templates select="sub">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates>
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="name">
<xsl:choose>
<xsl:when test="sub">
<xsl:choose>
<xsl:when test="link">
<a href="{link}"><img src="right.gif" border="0"/></a>
<a onclick="Toggle(this)"><img src="plus.gif" border="0"/><font color="green"><u><xsl:value-of select="name"/></u></font></a>
<xsl:apply-templates select="sub">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<a href="{$file_name}#{name}"><img src="down.gif" border="0"/></a>
<a onclick="Toggle(this)"><img src="plus.gif" border="0"/><font color="green"><u><xsl:value-of select="name"/></u></font></a>
<xsl:apply-templates select="sub">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="link">
<a href="{link}"><xsl:value-of select="name"/></a>
</xsl:when>
<xsl:otherwise>
<a href="{$file_name}#{name}"><xsl:value-of select="name"/></a>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<a href="{$file_name}#{.}"><xsl:value-of select="."/></a>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:template>
<xsl:template match="sub">
<xsl:param name="file_name" />
<ul style="display:none;">
<xsl:for-each select="item">
<xsl:sort select="translate(concat(name,.),$lcletters, $ucletters)"/>
<xsl:apply-templates select=".">
<xsl:with-param name="file_name" select="$file_name" />
</xsl:apply-templates>
</xsl:for-each>
</ul>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="components">
<xsl:for-each select="component">
<xsl:sort select="translate(name,$lcletters, $ucletters)"/>
<xsl:variable name="checked" select="@checked"/>
<a name = "{name}">
<div id="component" >
<a href="#top"><font size='2'><center>[top]</center></font></a>
<h1 style="margin:0px;"><xsl:value-of select="name"/></h1>
<BR/>
<BR/>
<xsl:apply-templates select="description"/>
<xsl:if test="spec_file">
<BR/>
<xsl:choose>
<xsl:when test="spec_file/@link = 'true'">
<BR/>
<b>Specification: </b> <a href="{spec_file}.html#{name}"><xsl:value-of select="spec_file"/></a>
</xsl:when>
<xsl:otherwise>
<BR/>
<b>Specification: </b> <a href="{spec_file}.html"><xsl:value-of select="spec_file"/></a>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:if test="file">
<BR/><B>File to include: </B> <a href="{file}.html"><xsl:value-of select="file"/></a>
</xsl:if>
<xsl:if test="body_file">
<BR/>
The body for the <xsl:value-of select="name"/> component can be found
here: <a href="{body_file}.html#{name}"><xsl:value-of select="body_file"/></a>
</xsl:if>
<xsl:apply-templates select="examples"/>
<xsl:apply-templates select="implementations">
<xsl:with-param name="checked" select="$checked" />
</xsl:apply-templates>
<xsl:choose>
<xsl:when test="implementations"></xsl:when>
<xsl:otherwise><br/><br/></xsl:otherwise>
</xsl:choose>
<xsl:if test="extensions">
<center>
<HR align='center'/>
<h2>Extensions to <xsl:value-of select="name"/></h2>
</center>
<xsl:for-each select="extensions/extension">
<xsl:sort select="translate(name,$lcletters, $ucletters)"/>
<BR/><a name="{name}"><B><font size='4'><xsl:value-of select="name"/>:</font></B></a><Br/>
<xsl:apply-templates select="description"/>
<BR/>
<BR/>
<b>Specification: </b> <a href="{spec_file}.html"><xsl:value-of select="spec_file"/></a>
<xsl:apply-templates select="examples"/>
<xsl:apply-templates select="implementations">
<xsl:with-param name="checked" select="$checked" />
</xsl:apply-templates>
<xsl:if test="position() != last()">
<HR width='20%' align='left'/>
</xsl:if>
</xsl:for-each>
</xsl:if>
<!-- putting this empty center tag here, for whatever reason, prevents IE from
messing up the space between these div blocks -->
<center></center>
</div>
</a>
</xsl:for-each>
</xsl:template>
<xsl:template match="examples">
<BR/><b>Code Examples: </b>
<xsl:for-each select="example">
<xsl:choose>
<xsl:when test="position() = last()">
<a href="{.}"><xsl:value-of select="position()"/></a>
</xsl:when>
<xsl:otherwise>
<a href="{.}"><xsl:value-of select="position()"/></a>,
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template match="implementations">
<xsl:param name="checked" />
<BR/><BR/><B>Implementations:</B>
<xsl:choose>
<xsl:when test="implementation/typedefs">
<xsl:for-each select="implementation">
<blockquote>
<a href="{file}.html"><xsl:value-of select="name"/></a>:
<xsl:if test="typedefs"><br/></xsl:if>
<xsl:apply-templates select="description"/>
<xsl:apply-templates select="typedefs">
<xsl:with-param name="checked" select="$checked"/>
</xsl:apply-templates>
</blockquote>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<blockquote>
<xsl:for-each select="implementation">
<a href="{file}.html"><xsl:value-of select="name"/></a>:
<xsl:apply-templates select="description"/>
<br/>
</xsl:for-each>
</blockquote>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="typedefs">
<xsl:param name="checked" />
<div id="typedefs"><table CELLSPACING='0' CELLPADDING='0' bgcolor="white" >
<xsl:for-each select="typedef">
<xsl:choose>
<xsl:when test="$checked = 'true'">
<tr><td bgcolor="{$gray}" valign="top">
<div id="tdn"><xsl:value-of select="name"/></div>
</td><td width="100%" bgcolor="{$gray}">
<xsl:apply-templates select="description"/>
</td></tr>
<tr><td valign="top">
<div id="tdn"><xsl:value-of select="name"/>_c</div>
</td><td width="100%">
is a typedef for <xsl:value-of select="name"/> that checks its preconditions.
</td></tr>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="position() mod 2 = 0">
<tr><td valign="top">
<div id="tdn"><xsl:value-of select="name"/></div>
</td><td width="100%">
<xsl:apply-templates select="description"/>
</td></tr>
</xsl:when>
<xsl:otherwise>
<tr><td bgcolor="{$gray}" valign="top">
<div id="tdn"><xsl:value-of select="name"/></div>
</td><td width="100%" bgcolor="{$gray}">
<xsl:apply-templates select="description"/>
</td></tr>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</table></div>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="release_notes">
<h1 style="margin:0px;">Release <xsl:value-of select="$current_release_var"/></h1>
<u>Release date</u>: <xsl:value-of select="$last_modified_date_var"/>
<br/>
<u>Major Changes in this Release</u>:
<table cellspacing="5" cellpadding="0" width="100%">
<tr>
<td width="15"></td>
<td><pre><xsl:value-of select="current"/></pre></td>
</tr>
</table>
<xsl:for-each select="old">
<xsl:if test="position() &lt; 10">
<hr/>
<h1 style="margin:0px;">Release <xsl:value-of select="@name"/></h1>
<xsl:if test="@date">
<u>Release date</u>: <xsl:value-of select="@date"/>
</xsl:if>
<br/>
<u>Major Changes in this Release</u>:
<table cellspacing="5" cellpadding="0" width="100%">
<tr>
<td width="15"></td>
<td><pre><xsl:value-of select="."/></pre></td>
</tr>
</table>
</xsl:if>
</xsl:for-each>
<br/>
<br/>
<br/>
<center><a href="old_release_notes.html">Old Release Notes</a></center>
<br/>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="old_release_notes">
<xsl:for-each select="document('release_notes.xml')/doc/body/release_notes/old">
<xsl:if test="position() &gt;= 10">
<h1 style="margin:0px;">Release <xsl:value-of select="@name"/></h1>
<xsl:if test="@date">
<u>Release date</u>: <xsl:value-of select="@date"/>
</xsl:if>
<br/>
<u>Major Changes in this Release</u>:
<table cellspacing="5" cellpadding="0" width="100%">
<tr>
<td width="15"></td>
<td><pre><xsl:value-of select="."/></pre></td>
</tr>
</table>
<xsl:if test="position() != last()">
<hr/>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="description">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="body">
<xsl:choose>
<xsl:when test="@from_file">
<xsl:apply-templates select="document(@from_file)"/>
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text">
<br/>
<pre><xsl:apply-templates/></pre>
</xsl:template>
<xsl:template match="h3">
<a name="{.}"/>
<h3>
<xsl:apply-templates/>
</h3>
</xsl:template>
<xsl:template match="h2">
<a name="{.}"/>
<h2>
<xsl:apply-templates/>
</h2>
</xsl:template>
<xsl:template match="h1">
<a name="{.}"/>
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
<xsl:template match="p">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="center">
<center>
<xsl:apply-templates/>
</center>
</xsl:template>
<xsl:template match="pre">
<pre>
<xsl:apply-templates/>
</pre>
</xsl:template>
<xsl:template match="blockquote">
<blockquote>
<xsl:apply-templates/>
</blockquote>
</xsl:template>
<xsl:template match="anchor">
<a name="{.}"/>
</xsl:template>
<xsl:template match="br">
<br/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="a">
<a href="{@href}">
<xsl:apply-templates/>
</a>
</xsl:template>
<xsl:template match="script">
<script type="{@type}" language="{@language}" src="{@src}">
<xsl:apply-templates/>
</script>
</xsl:template>
<xsl:template match="tt">
<tt>
<xsl:apply-templates/>
</tt>
</xsl:template>
<xsl:template match="chm">
<xsl:if test="$is_chm = 'true'">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="web">
<xsl:if test="$is_chm != 'true'">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="li">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="ul">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="u">
<u>
<xsl:apply-templates/>
</u>
</xsl:template>
<xsl:template match="i">
<i>
<xsl:apply-templates/>
</i>
</xsl:template>
<xsl:template match="b">
<b>
<xsl:apply-templates/>
</b>
</xsl:template>
<xsl:template match="U">
<u>
<xsl:apply-templates/>
</u>
</xsl:template>
<xsl:template match="I">
<i>
<xsl:apply-templates/>
</i>
</xsl:template>
<xsl:template match="B">
<b>
<xsl:apply-templates/>
</b>
</xsl:template>
<xsl:template match="font">
<font color="{@color}">
<xsl:apply-templates/>
</font>
</xsl:template>
<xsl:template match="img">
<img src="{@src}" border="0">
<xsl:apply-templates/>
</img>
</xsl:template>
<xsl:template name="term_list_go">
<xsl:param name="num"/>
<xsl:if test="$num &lt; 27">
<ul>
<xsl:variable name="cur_letter" select="substring($ucletters, $num, 1)"/>
<a name="{$cur_letter}"/>
<h1><xsl:value-of select="$cur_letter"/></h1>
<xsl:for-each select="term">
<xsl:sort order="ascending" select="translate(@name,$lcletters, $ucletters)"/>
<xsl:if test="$cur_letter = substring(translate(@name,$lcletters, $ucletters),1,1)">
<xsl:choose>
<xsl:when test="@link">
<li><a href="{@link}"><xsl:value-of select="@name"/></a></li>
</xsl:when>
<xsl:otherwise>
<li> <xsl:value-of select="@name"/>
<ul>
<xsl:for-each select="term">
<xsl:sort order="ascending" select="translate(@name,$lcletters, $ucletters)"/>
<li><a href="{@link}"><xsl:value-of select="@name"/></a></li>
</xsl:for-each>
</ul>
</li>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</ul>
<xsl:call-template name="term_list_go" >
<xsl:with-param name="num" select="$num + 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="term_list">
<center>
<a href="#A">[A]</a>
<a href="#B">[B]</a>
<a href="#C">[C]</a>
<a href="#D">[D]</a>
<a href="#E">[E]</a>
<a href="#F">[F]</a>
<a href="#G">[G]</a>
<a href="#H">[H]</a>
<a href="#I">[I]</a>
<a href="#J">[J]</a>
<a href="#K">[K]</a>
<a href="#L">[L]</a>
<a href="#M">[M]</a>
<a href="#N">[N]</a>
<a href="#O">[O]</a>
<a href="#P">[P]</a>
<a href="#Q">[Q]</a>
<a href="#R">[R]</a>
<a href="#S">[S]</a>
<a href="#T">[T]</a>
<a href="#U">[U]</a>
<a href="#V">[V]</a>
<a href="#W">[W]</a>
<a href="#X">[X]</a>
<a href="#Y">[Y]</a>
<a href="#Z">[Z]</a>
</center>
<xsl:call-template name="term_list_go" >
<xsl:with-param name="num" select="1"/>
</xsl:call-template>
</xsl:template>
<!-- This function turns a string of the form 2006-03-21T02:35:20.510956Z into a nice
normal looking date -->
<xsl:template name="format-date">
<xsl:param name="xsd-date"/>
<xsl:variable name="date" select="substring-before($xsd-date,'T')"/>
<xsl:variable name="time" select="substring-before(substring-after($xsd-date,'T'),'.')"/>
<xsl:variable name="year" select="substring($date,1,4)"/>
<xsl:variable name="month" select="substring($date,6,2)"/>
<xsl:variable name="day" select="substring($date,9,2)"/>
<xsl:variable name="hour" select="substring($time,1,2)"/>
<xsl:variable name="minute" select="substring($time,4,2)"/>
<xsl:variable name="second" select="substring($time,7,2)"/>
<xsl:choose>
<xsl:when test="$month = 1">Jan </xsl:when>
<xsl:when test="$month = 2">Feb </xsl:when>
<xsl:when test="$month = 3">Mar </xsl:when>
<xsl:when test="$month = 4">Apr </xsl:when>
<xsl:when test="$month = 5">May </xsl:when>
<xsl:when test="$month = 6">Jun </xsl:when>
<xsl:when test="$month = 7">Jul </xsl:when>
<xsl:when test="$month = 8">Aug </xsl:when>
<xsl:when test="$month = 9">Sep </xsl:when>
<xsl:when test="$month = 10">Oct </xsl:when>
<xsl:when test="$month = 11">Nov </xsl:when>
<xsl:when test="$month = 12">Dec </xsl:when>
</xsl:choose>
<xsl:value-of select="$day"/>, <xsl:value-of select="$year"/>
(<xsl:value-of select="$hour"/>:<xsl:value-of select="$minute"/>:<xsl:value-of select="$second"/> UTC)
</xsl:template>
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ******* Subversion stylesheet stfuff ******************** -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<!-- ************************************************************************* -->
<xsl:template match="log">
<xsl:for-each select="logentry">
<xsl:sort order="descending" data-type="number" select="./@revision"/>
<u>Revision</u>: <xsl:value-of select="@revision"/> <br/>
<u>Date</u>: <xsl:call-template name="format-date"><xsl:with-param name="xsd-date" select="date"/></xsl:call-template> <br/>
<xsl:apply-templates select="msg"/>
<xsl:apply-templates select="paths"/>
<hr class="fullhr"/>
</xsl:for-each>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template name="paths">
<xsl:param name="type"/>
<xsl:param name="name"/>
<xsl:param name="color"/>
<xsl:if test="path[@action=$type]">
<div id="logb">
<div class="bsolid"><b><font color="{$color}"><xsl:value-of select="$name"/></font></b></div>
<xsl:for-each select="path[@action = $type]">
<xsl:sort select="."/>
<xsl:choose>
<xsl:when test="position() mod 2 = 0">
<div id="row1"><xsl:value-of select="."/></div>
</xsl:when>
<xsl:otherwise>
<div id="row2"><xsl:value-of select="."/></div>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</div>
</xsl:if>
</xsl:template>
<!-- ************************************************************************* -->
<xsl:template match="paths">
<xsl:call-template name="paths">
<xsl:with-param name="type">M</xsl:with-param>
<xsl:with-param name="name">Modified</xsl:with-param>
<xsl:with-param name="color">black</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="paths">
<xsl:with-param name="type">A</xsl:with-param>
<xsl:with-param name="name">Added</xsl:with-param>
<xsl:with-param name="color">blue</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="paths">
<xsl:with-param name="type">D</xsl:with-param>
<xsl:with-param name="name">Deleted</xsl:with-param>
<xsl:with-param name="color">red</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="msg">
<pre><xsl:value-of select="."/></pre>
</xsl:template>
<!-- ************************************************************************* -->
</xsl:stylesheet>
move all the function bodies in widgets.h to cpp.
Hide all windows header files in a cpp file.
smart pointer that uses a memory manager. think memory pool with pool pointers
make a function to make a vector of vectors look like a matrix
add something to unroll a matrix into a vector
add row_cat and col_cat matrix functions
add a quadratic classifier
make a multiline text field
make htmlify work right on tempalte function calls
mutual information based feature selection
make the popup menus from the menu_bar always put themselves on the screen
add toggle menu item styles
improve unicode support in on_keydown()
make widgets take ustring as well as std::string
add a popup menu region sort of like the tooltip widget
make other widgets have a user settable style
find all uses of std::rand() and replace them with rand_kernel_1
add a function to display an image in a window.
make the binary search tree's add function return a
pointer to the thing it just added
add an object that represents an atomic counter so I can make some thread
safe reference counting stuff. Probably use the one from boost.
add an option to the logger to send log messages
to a thread instead of writing them directly
to the ostream. Or maybe make a threaded streambuf
that sits on top of a normal stream buffer but
adds a thread for the io...
make the matrix have a template argument that determined if the data is stored
in row_major or column_major order.
maybe add an enable_events() function to base_window
add a toolbar_button that has a picture and text in it.
make an ostream_fork object that lets you make an ostream that writes to two
other ostream objects.
make something that parses strings of the form "key ='value' key2='value'"
add some sha-256 stuff
uulib-threadsafe implementation
http://www.fpx.de/fp/Software/UUDeview/
add an example that uses the new checking extension for the cmd_line_parser. maybe make a
program that adds numbers and whatnot as an example and have it validate the numbers or something.
add some extensions to the dir_nav stuff that know how to pull out various parts of a path.
like the parent directory of a file and such.
make a widget that lets you use the mouse to define geometric shapes on the screen
modify the if in the reference_counter::modify() function so that it works
better with the branch predictor
Add a progress bar and password field to the gui_widgets
make sure constructors that take parameters that need to be checked
get checked *before* they are passed on to the base class constructors.
make the hashing objects take a normal size rather than expnum
make a linear hashing object on top of the array and use a binary search tree
for pathological buckets.
*********************************************
make conditioning_class_kernel_3 have a pointer into its array that tells it how many
elements are used. this way it doesn't need to zero everything on construction.
a command line "percent complete bar". something that uses \r and looks like
|========== | 25%
or something like that. that would be nice.
some object that abstracts configuration managment. like windows has the registry and
linux and posix stuff has basically nothing except for /etc and ~/.yourprogram sort of crap.
I should make an object that lets you "save" information to disk and then get it later. but
you shouldn't need to know if you are using windows or a posix OS or any of that crap
the parsing end event in the xml parser should tell you the line number that parsing eneded on
an object which can fill an array of unsigned longs with primes
look for places to remove the use of references to arguments. use a
temporary where appropriate
make an implementation of sequence that is just an array with slack on each end
something that mesures cpu clock ticks
something that helps you make pdf files. Just read the PDF standard and think
up cool stuff. :)
english word set with perfect hashing
something that helps you find perfect hash functions for a given data set
make something like the linker object but that has some events that tell you
when data is being sent so you can see what each side is sending.
modify sequence_kernel_1 so that when you access the same element more than once at a time
it takes O(1) time
make some bayesian text categorizer
implement the hash table described on comp.programming. the one
that uses an "infinite" array of buckets of sizes that are powers
of two with the watermark.
also change the specs for hash table to say that the num_of_buckets is
an initial suggestion as to the size of the hash table. not an absolute
rule for the implementation. say that it is a guaranteed lower bound or something
an object that makes it easy to save data to the end of an executable file.
email objects
new sockets stuff, UDP sockets, non-blocking sockets, IO multiplexing, negal alg on/off
make a priority queue
an echo object for networking shit. holds connections and echos any data from one connection
to all the others
a broadcast object. holds connections and allows you to send data to all of them easily
file sender function
an object which represents a file containing many text lines
like an array of strings which represents a file.
make an object that facilitates the creation of a gnutelli like broadcast network.
could be useful for making someting like a distributed server. and that only requires a
few computers so its something actually doable without the support of 100,000 people
a few ideas about this. when you connect to the first person on the network you then send
out a ping message and the pong messages you get back are from people who want more
connections, the message tells you how many hops away they are and how many connections
they currently have. you pick the one that is the farthest away and then to break any
ties you pick the one with the least number of connections.
an object which allows you to replace strings in a file with something else. possibly event driven.
you give it a set of strings to look for and when it finds them you get an event and can write
whatever you want and then it continues on looking for more strings.
an object which will pick out all the links in an html file and any other convenient information from
the file.
make numerical stuff like, a big integer, big real, integration stuff, differentiation stuff,
matrix stuff, etc...
make a framework for creating web page interfaces to a program. have stuff like buttons,
listboxes, dropdown boxes, checkboxes, etc...
a kind of pop3 proxy that can perform mail filtering. like picking out and taging spam
so that crappy email clients like netscape can put the spam into a folder
the filter could also buffer stuff it thought as spam for a while. like hold it for a few hours and then let it be passed on. this way all the spam comes wrapped together. and so most of the time you get a flag saying you have mail it won't be spam. only somtimes will it be the packet of spam.
for the bigint object:
also consider adding a function which returns an unsigned short which contains the two least significant bytes from the bigint
an object which knows all about the different time zones and what not. it could convert time from GMT to whatever local timezone you are in. and any other useful conversions
move all the function bodies in widgets.h to cpp.
Hide all windows header files in a cpp file.
smart pointer that uses a memory manager. think memory pool with pool pointers
make a function to make a vector of vectors look like a matrix
add something to unroll a matrix into a vector
add row_cat and col_cat matrix functions
add a quadratic classifier
make a multiline text field
make htmlify work right on tempalte function calls
mutual information based feature selection
make the popup menus from the menu_bar always put themselves on the screen
add toggle menu item styles
improve unicode support in on_keydown()
make widgets take ustring as well as std::string
add a popup menu region sort of like the tooltip widget
make other widgets have a user settable style
find all uses of std::rand() and replace them with rand_kernel_1
add a function to display an image in a window.
make the binary search tree's add function return a
pointer to the thing it just added
add an object that represents an atomic counter so I can make some thread
safe reference counting stuff. Probably use the one from boost.
add an option to the logger to send log messages
to a thread instead of writing them directly
to the ostream. Or maybe make a threaded streambuf
that sits on top of a normal stream buffer but
adds a thread for the io...
make the matrix have a template argument that determined if the data is stored
in row_major or column_major order.
maybe add an enable_events() function to base_window
add a toolbar_button that has a picture and text in it.
make an ostream_fork object that lets you make an ostream that writes to two
other ostream objects.
make something that parses strings of the form "key ='value' key2='value'"
add some sha-256 stuff
uulib-threadsafe implementation
http://www.fpx.de/fp/Software/UUDeview/
add an example that uses the new checking extension for the cmd_line_parser. maybe make a
program that adds numbers and whatnot as an example and have it validate the numbers or something.
add some extensions to the dir_nav stuff that know how to pull out various parts of a path.
like the parent directory of a file and such.
make a widget that lets you use the mouse to define geometric shapes on the screen
modify the if in the reference_counter::modify() function so that it works
better with the branch predictor
Add a progress bar and password field to the gui_widgets
make sure constructors that take parameters that need to be checked
get checked *before* they are passed on to the base class constructors.
make the hashing objects take a normal size rather than expnum
make a linear hashing object on top of the array and use a binary search tree
for pathological buckets.
*********************************************
make conditioning_class_kernel_3 have a pointer into its array that tells it how many
elements are used. this way it doesn't need to zero everything on construction.
a command line "percent complete bar". something that uses \r and looks like
|========== | 25%
or something like that. that would be nice.
some object that abstracts configuration managment. like windows has the registry and
linux and posix stuff has basically nothing except for /etc and ~/.yourprogram sort of crap.
I should make an object that lets you "save" information to disk and then get it later. but
you shouldn't need to know if you are using windows or a posix OS or any of that crap
the parsing end event in the xml parser should tell you the line number that parsing eneded on
an object which can fill an array of unsigned longs with primes
look for places to remove the use of references to arguments. use a
temporary where appropriate
make an implementation of sequence that is just an array with slack on each end
something that mesures cpu clock ticks
something that helps you make pdf files. Just read the PDF standard and think
up cool stuff. :)
english word set with perfect hashing
something that helps you find perfect hash functions for a given data set
make something like the linker object but that has some events that tell you
when data is being sent so you can see what each side is sending.
modify sequence_kernel_1 so that when you access the same element more than once at a time
it takes O(1) time
make some bayesian text categorizer
implement the hash table described on comp.programming. the one
that uses an "infinite" array of buckets of sizes that are powers
of two with the watermark.
also change the specs for hash table to say that the num_of_buckets is
an initial suggestion as to the size of the hash table. not an absolute
rule for the implementation. say that it is a guaranteed lower bound or something
an object that makes it easy to save data to the end of an executable file.
email objects
new sockets stuff, UDP sockets, non-blocking sockets, IO multiplexing, negal alg on/off
make a priority queue
an echo object for networking shit. holds connections and echos any data from one connection
to all the others
a broadcast object. holds connections and allows you to send data to all of them easily
file sender function
an object which represents a file containing many text lines
like an array of strings which represents a file.
make an object that facilitates the creation of a gnutelli like broadcast network.
could be useful for making someting like a distributed server. and that only requires a
few computers so its something actually doable without the support of 100,000 people
a few ideas about this. when you connect to the first person on the network you then send
out a ping message and the pong messages you get back are from people who want more
connections, the message tells you how many hops away they are and how many connections
they currently have. you pick the one that is the farthest away and then to break any
ties you pick the one with the least number of connections.
an object which allows you to replace strings in a file with something else. possibly event driven.
you give it a set of strings to look for and when it finds them you get an event and can write
whatever you want and then it continues on looking for more strings.
an object which will pick out all the links in an html file and any other convenient information from
the file.
make numerical stuff like, a big integer, big real, integration stuff, differentiation stuff,
matrix stuff, etc...
make a framework for creating web page interfaces to a program. have stuff like buttons,
listboxes, dropdown boxes, checkboxes, etc...
a kind of pop3 proxy that can perform mail filtering. like picking out and taging spam
so that crappy email clients like netscape can put the spam into a folder
the filter could also buffer stuff it thought as spam for a while. like hold it for a few hours and then let it be passed on. this way all the spam comes wrapped together. and so most of the time you get a flag saying you have mail it won't be spam. only somtimes will it be the packet of spam.
for the bigint object:
also consider adding a function which returns an unsigned short which contains the two least significant bytes from the bigint
an object which knows all about the different time zones and what not. it could convert time from GMT to whatever local timezone you are in. and any other useful conversions
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment