Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 7598b8f4e8b56b9708b68012e6aa9940 > files > 52

lib64xapian-devel-1.2.12-4.mga4.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xapian: API Documentation: xapian-core: Xapian::BoolWeight Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.5.9 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1BoolWeight.html">BoolWeight</a>
  </div>
</div>
<div class="contents">
<h1>Xapian::BoolWeight Class Reference</h1><!-- doxytag: class="Xapian::BoolWeight" --><!-- doxytag: inherits="Xapian::Weight" -->Class implementing a "boolean" weighting scheme.  
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for Xapian::BoolWeight:</div>
<div class="dynsection">
<p><center><img src="classXapian_1_1BoolWeight__inherit__graph.png" border="0" usemap="#Xapian_1_1BoolWeight__inherit__map" alt="Inheritance graph"></center>
<map name="Xapian_1_1BoolWeight__inherit__map">
<area shape="rect" href="classXapian_1_1Weight.html" title="Abstract base class for weighting schemes." alt="" coords="19,7,133,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classXapian_1_1BoolWeight-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#9b6aa83a43515dc68dc726fcd40913ef">BoolWeight</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a <a class="el" href="classXapian_1_1BoolWeight.html" title="Class implementing a &quot;boolean&quot; weighting scheme.">BoolWeight</a>.  <a href="#9b6aa83a43515dc68dc726fcd40913ef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#c91b3673317ee9574dff4321482f579d">name</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of this weighting scheme.  <a href="#c91b3673317ee9574dff4321482f579d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#06e88787161cc2146511259d5742dd10">serialise</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return this object's parameters serialised as a single string.  <a href="#06e88787161cc2146511259d5742dd10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classXapian_1_1BoolWeight.html">BoolWeight</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#729a7656e41663f612d0ae871d02c518">unserialise</a> (const std::string &amp;s) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unserialise parameters.  <a href="#729a7656e41663f612d0ae871d02c518"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#9e9cac485fad3353044f4a5aa5813f6c">get_sumpart</a> (<a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a> wdf, <a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a> doclen) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the weight contribution for this object's term to a document.  <a href="#9e9cac485fad3353044f4a5aa5813f6c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#9edd11c7c0c6d3fc72c347f1bd65bb3c">get_maxpart</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an upper bound on what <a class="el" href="classXapian_1_1BoolWeight.html#9e9cac485fad3353044f4a5aa5813f6c" title="Calculate the weight contribution for this object&#39;s term to a document.">get_sumpart()</a> can return for any document.  <a href="#9edd11c7c0c6d3fc72c347f1bd65bb3c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#44d22ac1bafc6290d2877fb972e4f5f3">get_sumextra</a> (<a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a> doclen) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calculate the term-independent weight component for a document.  <a href="#44d22ac1bafc6290d2877fb972e4f5f3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1BoolWeight.html#8332b9fa9cb900d273f8077f76c94fcc">get_maxextra</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return an upper bound on what <a class="el" href="classXapian_1_1BoolWeight.html#44d22ac1bafc6290d2877fb972e4f5f3" title="Calculate the term-independent weight component for a document.">get_sumextra()</a> can return for any document.  <a href="#8332b9fa9cb900d273f8077f76c94fcc"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Class implementing a "boolean" weighting scheme. 
<p>
This weighting scheme gives all documents zero weight. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="9b6aa83a43515dc68dc726fcd40913ef"></a><!-- doxytag: member="Xapian::BoolWeight::BoolWeight" ref="9b6aa83a43515dc68dc726fcd40913ef" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::BoolWeight::BoolWeight           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct a <a class="el" href="classXapian_1_1BoolWeight.html" title="Class implementing a &quot;boolean&quot; weighting scheme.">BoolWeight</a>. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="8332b9fa9cb900d273f8077f76c94fcc"></a><!-- doxytag: member="Xapian::BoolWeight::get_maxextra" ref="8332b9fa9cb900d273f8077f76c94fcc" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> Xapian::BoolWeight::get_maxextra           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return an upper bound on what <a class="el" href="classXapian_1_1BoolWeight.html#44d22ac1bafc6290d2877fb972e4f5f3" title="Calculate the term-independent weight component for a document.">get_sumextra()</a> can return for any document. 
<p>
This information is used by the matcher to perform various optimisations, so strive to make the bound as tight as possible. 
<p>Implements <a class="el" href="classXapian_1_1Weight.html#ca641ecc2f5645666820f864d243f46d">Xapian::Weight</a>.</p>

</div>
</div><p>
<a class="anchor" name="9edd11c7c0c6d3fc72c347f1bd65bb3c"></a><!-- doxytag: member="Xapian::BoolWeight::get_maxpart" ref="9edd11c7c0c6d3fc72c347f1bd65bb3c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> Xapian::BoolWeight::get_maxpart           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return an upper bound on what <a class="el" href="classXapian_1_1BoolWeight.html#9e9cac485fad3353044f4a5aa5813f6c" title="Calculate the weight contribution for this object&#39;s term to a document.">get_sumpart()</a> can return for any document. 
<p>
This information is used by the matcher to perform various optimisations, so strive to make the bound as tight as possible. 
<p>Implements <a class="el" href="classXapian_1_1Weight.html#f37e797fa12bb915f73b20b953a132b7">Xapian::Weight</a>.</p>

</div>
</div><p>
<a class="anchor" name="44d22ac1bafc6290d2877fb972e4f5f3"></a><!-- doxytag: member="Xapian::BoolWeight::get_sumextra" ref="44d22ac1bafc6290d2877fb972e4f5f3" args="(Xapian::termcount doclen) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> Xapian::BoolWeight::get_sumextra           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td>
          <td class="paramname"> <em>doclen</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calculate the term-independent weight component for a document. 
<p>
The parameter gives information about the document which may be used in the calculations:<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>doclen</em>&nbsp;</td><td>The document's length (unnormalised). </td></tr>
  </table>
</dl>

<p>Implements <a class="el" href="classXapian_1_1Weight.html#8c29b15b875e5666ac8b94c9a39e962f">Xapian::Weight</a>.</p>

</div>
</div><p>
<a class="anchor" name="9e9cac485fad3353044f4a5aa5813f6c"></a><!-- doxytag: member="Xapian::BoolWeight::get_sumpart" ref="9e9cac485fad3353044f4a5aa5813f6c" args="(Xapian::termcount wdf, Xapian::termcount doclen) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#cac12803afc9e24ee5141c119acb8884">Xapian::weight</a> Xapian::BoolWeight::get_sumpart           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td>
          <td class="paramname"> <em>wdf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td>
          <td class="paramname"> <em>doclen</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calculate the weight contribution for this object's term to a document. 
<p>
The parameters give information about the document which may be used in the calculations:<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>wdf</em>&nbsp;</td><td>The within document frequency of the term in the document. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>doclen</em>&nbsp;</td><td>The document's length (unnormalised). </td></tr>
  </table>
</dl>

<p>Implements <a class="el" href="classXapian_1_1Weight.html#8c6beb18e2c08cbc2ae61ec9d808ed9e">Xapian::Weight</a>.</p>

</div>
</div><p>
<a class="anchor" name="c91b3673317ee9574dff4321482f579d"></a><!-- doxytag: member="Xapian::BoolWeight::name" ref="c91b3673317ee9574dff4321482f579d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Xapian::BoolWeight::name           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the name of this weighting scheme. 
<p>
This name is used by the remote backend. It is passed along with the serialised parameters to the remote server so that it knows which class to create.<p>
Return the full namespace-qualified name of your class here - if your class is called FooWeight, return "FooWeight" from this method (<a class="el" href="classXapian_1_1BM25Weight.html" title="Xapian::Weight subclass implementing the BM25 probabilistic formula.">Xapian::BM25Weight</a> returns "Xapian::BM25Weight" here).<p>
If you don't want to support the remote backend, you can use the default implementation which simply returns an empty string. 
<p>Reimplemented from <a class="el" href="classXapian_1_1Weight.html#afd3b445fb1955aae3d7c32aae3ba7b4">Xapian::Weight</a>.</p>

</div>
</div><p>
<a class="anchor" name="06e88787161cc2146511259d5742dd10"></a><!-- doxytag: member="Xapian::BoolWeight::serialise" ref="06e88787161cc2146511259d5742dd10" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Xapian::BoolWeight::serialise           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return this object's parameters serialised as a single string. 
<p>
If you don't want to support the remote backend, you can use the default implementation which simply throws <a class="el" href="classXapian_1_1UnimplementedError.html" title="UnimplementedError indicates an attempt to use an unimplemented feature.">Xapian::UnimplementedError</a>. 
<p>Reimplemented from <a class="el" href="classXapian_1_1Weight.html#cf568da52a87e6a6786400dbd0a79edf">Xapian::Weight</a>.</p>

</div>
</div><p>
<a class="anchor" name="729a7656e41663f612d0ae871d02c518"></a><!-- doxytag: member="Xapian::BoolWeight::unserialise" ref="729a7656e41663f612d0ae871d02c518" args="(const std::string &amp;s) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classXapian_1_1BoolWeight.html">BoolWeight</a>* Xapian::BoolWeight::unserialise           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Unserialise parameters. 
<p>
This method unserialises parameters serialised by the <em><a class="el" href="classXapian_1_1BoolWeight.html#06e88787161cc2146511259d5742dd10" title="Return this object&#39;s parameters serialised as a single string.">serialise()</a></em> method and allocates and returns a new object initialised with them.<p>
If you don't want to support the remote backend, you can use the default implementation which simply throws <a class="el" href="classXapian_1_1UnimplementedError.html" title="UnimplementedError indicates an attempt to use an unimplemented feature.">Xapian::UnimplementedError</a>.<p>
Note that the returned object will be deallocated by <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> after use with "delete". If you want to handle the deletion in a special way (for example when wrapping the <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> API for use from another language) then you can define a static <code>operator delete</code> method in your subclass as shown here: <a href="http://trac.xapian.org/ticket/554#comment:1">http://trac.xapian.org/ticket/554#comment:1</a><p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>A string containing the serialised parameters. </td></tr>
  </table>
</dl>

<p>Reimplemented from <a class="el" href="classXapian_1_1Weight.html#031c3e0db3ae50e801b324e71a44c140">Xapian::Weight</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>xapian/<a class="el" href="weight_8h.html">weight.h</a></ul>
</div>
<hr>
<address><small>
Documentation for Xapian (version 1.2.12).<br>
Generated on 27 Jun 2012 by
<a href="http://www.doxygen.org/">Doxygen 1.5.9</a>.
</small></address>
</body>
</html>