<?php $isip_window_title = "ISIP Homepage"; ?>
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="ContextPool" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>

name:
<a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h">ContextPool</a>

</b>
<br><br>

<a name="synopsis">
<b>synopsis:</b>
<br><br>

<blockquote>
<pre>

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_search.a

#include &lt;ContextPool.h&gt;

long length() const;
Context* get(const Context& obj);
Context* foldAndAllocate(const Context* obj);
Context* extendAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);
Context* initAndAllocate();
Context* shiftAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);
Context* setCentralAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);
Context* setLastAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);
</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>
<br><br>

<blockquote>
<pre>

Context some_context;
ContextPool context_pool;
GraphVertex&lt;SearchNode&gt; v;

Context* c1 = context_pool.get(some_context);
Context* c2 = context_pool.assignAndAdvance(c1, &v);

</pre>
</blockquote>

<a name="description">
<b>description:</b>
<br><br>

This class caches all context variants generated during the search process
and returns a unique reference to the context, which is used for quick
constant-time comparisons.

<br><br>

<a name="dependencies">
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h">Context.h</a>
  <li> <a href="/perl/ifc_document.pl?file=$isip/class/search/ContextMap/ContextMap.h">ContextMap.h</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define public constants:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_00.cc&constant=CLASS_NAME">static const String CLASS_NAME;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_00.cc&constant=DEF_PARAM">static const String DEF_PARAM;</a></pre>

       <pre>static const long DEF_CAPACITY = 20000;</pre>

</ul>

<a name="error">
<b>error codes:</b>
<br><br>

<ul>
  <li> error codes indicating general errors:

</ul>

<a name="protected">
<b>protected data:</b>
<br><br>

<ul>
  <li> define the context pool:

       <pre>HashTable&lt;Context, Context&gt; pool_d;</pre>

  <li> declare the debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_00.cc&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

  <li> declare the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>

</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=name&instance=0">static const String& name();</a></pre>

  <li> debug methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_02.cc&method=diagnose&instance=0">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_01.cc&method=debug&instance=0">boolean debug(const unichar* message) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=setDebug&instance=0">static boolean setDebug(Integral::DEBUG debug_level);</a></pre>

  <li> destructor/constructor(s):

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=destructor&instance=0">~ContextPool();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_00.cc&method=default+constructor&instance=0">ContextPool();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_00.cc&method=copy+constructor&instance=0">ContextPool(const ContextPool& copy_node);</a></pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=assign&instance=0">boolean assign(const ContextPool& copy_node);</a></pre>

  <li> operator= method:

       <pre>not present.</pre>

  <li> i/o methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=sofSize&instance=0">long sofSize() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=read&instance=0">boolean read(Sof& sof, long tag, const String& cname = CLASS_NAME);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=write&instance=0">boolean write(Sof& sof, long tag, const String& cname = CLASS_NAME) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=readData&instance=0">boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=writeData&instance=0">boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;</a></pre>

  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=eq&instance=0">boolean eq(const ContextPool& compare_node) const;</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=new&instance=0">static void* operator new(size_t size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=new\[\]&instance=0">static void* operator new[](size_t size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=delete&instance=0">static void operator delete(void* ptr);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=delete\[\]&instance=0">static void operator delete[](void* ptr);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=setGrowSize&instance=0">static boolean setGrowSize(long grow_size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=clear&instance=0">boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);</a></pre>

</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>
  <li> declare class specific methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/ContextPool.h&method=length&instance=0">long length() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=get&instance=0">Context* get(const Context& obj);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=foldAndAllocate&instance=0">Context* foldAndAllocate(const Context* obj);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=extendAndAllocate&instance=0">Context* extendAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=initAndAllocate&instance=0">Context* initAndAllocate();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=shiftAndAllocate&instance=0">Context* shiftAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=setCentralAndAllocate&instance=0">Context* setCentralAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/ContextPool/cpol_05.cc&method=setLastAndAllocate&instance=0">Context* setLastAndAllocate(const Context* obj, GraphVertex&lt;SearchNode&gt;* ver);</a></pre>

</ul>

<a name="private">
<b>private methods:</b>
<br><br>

<ul>
  <li> none.

</ul>

<a name="examples">
<b>examples:</b>
<br><br>

<ul>
  <li> none.

<pre>
</pre>
</ul>

<a name="notes">
<b>notes:</b>
<br><br>

<ul>
  <li> none.
</ul>

<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
