| query.h | | query.h | |
| | | | |
| skipping to change at line 177 | | skipping to change at line 177 | |
| | | | |
| /** A query consisting of two termnames opp-ed together. */ | | /** A query consisting of two termnames opp-ed together. */ | |
| Query(Query::op op_, | | Query(Query::op op_, | |
| const std::string & left, const std::string & right); | | const std::string & left, const std::string & right); | |
| | | | |
| /** Combine a number of Xapian::Query-s with the specified operator. | | /** Combine a number of Xapian::Query-s with the specified operator. | |
| * | | * | |
| * The Xapian::Query objects are specified with begin and end | | * The Xapian::Query objects are specified with begin and end | |
| * iterators. | | * iterators. | |
| * | | * | |
|
| * AND, OR, NEAR and PHRASE can take any number of subqueries. | | * AND, OR, SYNONYM, NEAR and PHRASE can take any number of subquer
ies. | |
| * Other operators take exactly two subqueries. | | * Other operators take exactly two subqueries. | |
| * | | * | |
| * The iterators may be to Xapian::Query objects, pointers to | | * The iterators may be to Xapian::Query objects, pointers to | |
| * Xapian::Query objects, or termnames (std::string-s). | | * Xapian::Query objects, or termnames (std::string-s). | |
| * | | * | |
| * For NEAR and PHRASE, a window size can be specified in parameter
. | | * For NEAR and PHRASE, a window size can be specified in parameter
. | |
| * | | * | |
| * For ELITE_SET, the elite set size can be specified in parameter. | | * For ELITE_SET, the elite set size can be specified in parameter. | |
| */ | | */ | |
| template <class Iterator> | | template <class Iterator> | |
| | | | |
| skipping to change at line 363 | | skipping to change at line 363 | |
| | | | |
| /// Sub queries on which to perform operation | | /// Sub queries on which to perform operation | |
| subquery_list subqs; | | subquery_list subqs; | |
| | | | |
| /** For NEAR or PHRASE, how close terms must be to match: all terms | | /** For NEAR or PHRASE, how close terms must be to match: all terms | |
| * within the operation must occur in a window of this size. | | * within the operation must occur in a window of this size. | |
| * | | * | |
| * For ELITE_SET, the number of terms to select from those specified
. | | * For ELITE_SET, the number of terms to select from those specified
. | |
| * | | * | |
| * For RANGE, the value number to apply the range test to. | | * For RANGE, the value number to apply the range test to. | |
|
| | | * | |
| | | * For a leaf node, this is the within query frequency of the term. | |
| */ | | */ | |
| Xapian::termcount parameter; | | Xapian::termcount parameter; | |
| | | | |
| /** Term that this node represents, or start of a range query. | | /** Term that this node represents, or start of a range query. | |
| * | | * | |
| * For a leaf node, this holds the term name. For an OP_VALUE_RANG
E | | * For a leaf node, this holds the term name. For an OP_VALUE_RANG
E | |
| * query this holds the start of the range. For an OP_VALUE_GE or | | * query this holds the start of the range. For an OP_VALUE_GE or | |
| * OP_VALUE_LE query this holds the value to compare against. | | * OP_VALUE_LE query this holds the value to compare against. | |
| */ | | */ | |
| std::string tname; | | std::string tname; | |
| | | | |
| /** Used to store the end of a range query. */ | | /** Used to store the end of a range query. */ | |
| std::string str_parameter; | | std::string str_parameter; | |
| | | | |
| /// Position in query of this term - leaf node only | | /// Position in query of this term - leaf node only | |
| Xapian::termpos term_pos; | | Xapian::termpos term_pos; | |
| | | | |
|
| /// Within query frequency of this term - leaf node only | | | |
| Xapian::termcount wqf; | | | |
| | | | |
| /// External posting source. | | /// External posting source. | |
| Xapian::PostingSource * external_source; | | Xapian::PostingSource * external_source; | |
| | | | |
| /// Flag, indicating whether the external source is owned by the que
ry. | | /// Flag, indicating whether the external source is owned by the que
ry. | |
| bool external_source_owned; | | bool external_source_owned; | |
| | | | |
|
| /** swap the contents of this with another Xapian::Query::Internal, | | | |
| * in a way which is guaranteed not to throw. This is | | | |
| * used with the assignment operator to make it exception | | | |
| * safe. | | | |
| * It's important to adjust swap with any addition of | | | |
| * member variables! | | | |
| */ | | | |
| void swap(Query::Internal &other); | | | |
| | | | |
| /// Copy another Xapian::Query::Internal into self. | | /// Copy another Xapian::Query::Internal into self. | |
| void initialise_from_copy(const Query::Internal & copyme); | | void initialise_from_copy(const Query::Internal & copyme); | |
| | | | |
| void accumulate_terms( | | void accumulate_terms( | |
| std::vector<std::pair<std::string, Xapian::termpos> > &terms) co
nst; | | std::vector<std::pair<std::string, Xapian::termpos> > &terms) co
nst; | |
| | | | |
| /** Simplify the query. | | /** Simplify the query. | |
| * For example, an AND query with only one subquery would become th
e | | * For example, an AND query with only one subquery would become th
e | |
| * subquery itself. | | * subquery itself. | |
| */ | | */ | |
| Internal * simplify_query(); | | Internal * simplify_query(); | |
| | | | |
|
| /** Perform checks that query is valid. (eg, has correct number of | | /** Perform checks that query is valid. (e.g., has correct number of | |
| * sub queries.) Throw an exception if not. This is initially cal
led | | * sub queries.) Throw an exception if not. This is initially cal
led | |
| * on the query before any simplifications have been made, and afte
r | | * on the query before any simplifications have been made, and afte
r | |
|
| * simplications. | | * simplifications. | |
| */ | | */ | |
| void validate_query() const; | | void validate_query() const; | |
| | | | |
| /** Simplify any matchnothing subqueries, either eliminating them, | | /** Simplify any matchnothing subqueries, either eliminating them, | |
| * or setting this query to matchnothing, depending on the query | | * or setting this query to matchnothing, depending on the query | |
| * operator. Returns true if simplification resulted in a | | * operator. Returns true if simplification resulted in a | |
| * matchnothing query. | | * matchnothing query. | |
| */ | | */ | |
| bool simplify_matchnothing(); | | bool simplify_matchnothing(); | |
| | | | |
| | | | |
| skipping to change at line 509 | | skipping to change at line 499 | |
| | | | |
| /** Get the numeric parameter used in this query. | | /** Get the numeric parameter used in this query. | |
| * | | * | |
| * This is used by the QueryParser to get the value number for | | * This is used by the QueryParser to get the value number for | |
| * VALUE_RANGE queries. It should be replaced by a public method o
n | | * VALUE_RANGE queries. It should be replaced by a public method o
n | |
| * the Query class at some point, but the API which should be used
for | | * the Query class at some point, but the API which should be used
for | |
| * that is unclear, so this is a temporary workaround. | | * that is unclear, so this is a temporary workaround. | |
| */ | | */ | |
| Xapian::termcount get_parameter() const { return parameter; } | | Xapian::termcount get_parameter() const { return parameter; } | |
| | | | |
|
| | | Xapian::termcount get_wqf() const { return parameter; } | |
| | | | |
| /** Get the length of the query, used by some ranking formulae. | | /** Get the length of the query, used by some ranking formulae. | |
| * This value is calculated automatically - if you want to override | | * This value is calculated automatically - if you want to override | |
| * it you can pass a different value to Enquire::set_query(). | | * it you can pass a different value to Enquire::set_query(). | |
| */ | | */ | |
| Xapian::termcount get_length() const; | | Xapian::termcount get_length() const; | |
| | | | |
| /** Return an iterator over all the terms in the query, | | /** Return an iterator over all the terms in the query, | |
| * in order of termpos. If multiple terms have the same term | | * in order of termpos. If multiple terms have the same term | |
| * position, their order is unspecified. Duplicates (same term and | | * position, their order is unspecified. Duplicates (same term and | |
| * termpos) will be removed. | | * termpos) will be removed. | |
| | | | |
End of changes. 7 change blocks. |
| 15 lines changed or deleted | | 7 lines changed or added | |
|
| queryparser.h | | queryparser.h | |
| | | | |
| skipping to change at line 101 | | skipping to change at line 101 | |
| * Xapian::BAD_VALUENO. | | * Xapian::BAD_VALUENO. | |
| */ | | */ | |
| virtual Xapian::valueno operator()(std::string &begin, std::string &end
) = 0; | | virtual Xapian::valueno operator()(std::string &begin, std::string &end
) = 0; | |
| }; | | }; | |
| | | | |
| /** Handle a string range. | | /** Handle a string range. | |
| * | | * | |
| * The end points can be any strings. | | * The end points can be any strings. | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT StringValueRangeProcessor : public ValueRan
geProcessor { | | class XAPIAN_VISIBILITY_DEFAULT StringValueRangeProcessor : public ValueRan
geProcessor { | |
|
| | | protected: | |
| Xapian::valueno valno; | | Xapian::valueno valno; | |
| | | | |
|
| | | private: | |
| | | bool prefix; | |
| | | std::string str; | |
| | | | |
| public: | | public: | |
| /** Constructor. | | /** Constructor. | |
| * | | * | |
| * @param valno_ The value number to return from operator(). | | * @param valno_ The value number to return from operator(). | |
| */ | | */ | |
| StringValueRangeProcessor(Xapian::valueno valno_) | | StringValueRangeProcessor(Xapian::valueno valno_) | |
|
| : valno(valno_) { } | | : valno(valno_), str() { } | |
| | | | |
|
| /// Any strings are valid as begin and end. | | /** Constructor. | |
| Xapian::valueno operator()(std::string &, std::string &) { | | * | |
| return valno; | | * @param valno_ The value number to return from operator(). | |
| } | | * @param str_ A string to look for to recognise values as belongi | |
| | | ng | |
| | | * to this range. | |
| | | * @param prefix_ Flag specifying whether to check for str_ as a prefi | |
| | | x | |
| | | * or a suffix. | |
| | | */ | |
| | | StringValueRangeProcessor(Xapian::valueno valno_, const std::string &st | |
| | | r_, | |
| | | bool prefix_ = true) | |
| | | : valno(valno_), prefix(prefix_), str(str_) { } | |
| | | | |
| | | /** See if <begin>..<end> is a valid string value range. | |
| | | * | |
| | | * If no prefix or suffix is specified, then this always returns the | |
| | | * value slot specified at construction time. | |
| | | * | |
| | | * If a prefix or suffix is specified, this is checked for first, and | |
| | | * it it doesn't match, this method returns Xapian::BAD_VALUENO. | |
| | | */ | |
| | | Xapian::valueno operator()(std::string &, std::string &); | |
| }; | | }; | |
| | | | |
| /** Handle a date range. | | /** Handle a date range. | |
| * | | * | |
| * Begin and end must be dates in a recognised format. | | * Begin and end must be dates in a recognised format. | |
| */ | | */ | |
|
| class XAPIAN_VISIBILITY_DEFAULT DateValueRangeProcessor : public ValueRange | | class XAPIAN_VISIBILITY_DEFAULT DateValueRangeProcessor : public StringValu | |
| Processor { | | eRangeProcessor { | |
| Xapian::valueno valno; | | | |
| bool prefer_mdy; | | bool prefer_mdy; | |
| int epoch_year; | | int epoch_year; | |
| | | | |
| public: | | public: | |
| /** Constructor. | | /** Constructor. | |
| * | | * | |
| * @param valno_ The value number to return from operator(). | | * @param valno_ The value number to return from operator(). | |
| * @param prefer_mdy_ Should ambiguous dates be interpreted as | | * @param prefer_mdy_ Should ambiguous dates be interpreted as | |
| * month/day/year rather than day/month/year? | | * month/day/year rather than day/month/year? | |
| * (default: false) | | * (default: false) | |
| * @param epoch_year_ Year to use as the epoch for dates with 2 digit | | * @param epoch_year_ Year to use as the epoch for dates with 2 digit | |
| * years (default: 1970, so 1/1/69 is 2069 while | | * years (default: 1970, so 1/1/69 is 2069 while | |
| * 1/1/70 is 1970). | | * 1/1/70 is 1970). | |
| */ | | */ | |
| DateValueRangeProcessor(Xapian::valueno valno_, bool prefer_mdy_ = fals
e, | | DateValueRangeProcessor(Xapian::valueno valno_, bool prefer_mdy_ = fals
e, | |
| int epoch_year_ = 1970) | | int epoch_year_ = 1970) | |
|
| : valno(valno_), prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { | | : StringValueRangeProcessor(valno_), | |
| } | | prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } | |
| | | | |
| | | /** Constructor. | |
| | | * | |
| | | * @param valno_ The value number to return from operator(). | |
| | | * | |
| | | * @param str_ A string to look for to recognise values as belongi | |
| | | ng | |
| | | * to this date range. | |
| | | * | |
| | | * @param prefix_ Whether to look for the string at the start or end | |
| | | of | |
| | | * the values. If true, the string is a prefix; if | |
| | | * false, the string is a suffix (default: true). | |
| | | * | |
| | | * @param prefer_mdy_ Should ambiguous dates be interpreted as | |
| | | * month/day/year rather than day/month/year? | |
| | | * (default: false) | |
| | | * | |
| | | * @param epoch_year_ Year to use as the epoch for dates with 2 digit | |
| | | * years (default: 1970, so 1/1/69 is 2069 while | |
| | | * 1/1/70 is 1970). | |
| | | * | |
| | | * The string supplied in str_ is used by @a operator() to decide whet | |
| | | her | |
| | | * the pair of strings supplied to it constitute a valid range. If | |
| | | * prefix_ is true, the first value in a range must begin with str_ (a | |
| | | nd | |
| | | * the second value may optionally begin with str_); | |
| | | * if prefix_ is false, the second value in a range must end with str_ | |
| | | * (and the first value may optionally end with str_). | |
| | | * | |
| | | * If str_ is empty, the setting of prefix_ is irrelevant, and no spec | |
| | | ial | |
| | | * strings are required at the start or end of the strings defining th | |
| | | e | |
| | | * range. | |
| | | * | |
| | | * The remainder of both strings defining the endpoints must be valid | |
| | | * dates. | |
| | | * | |
| | | * For example, if str_ is "created:" and prefix_ is true, and the ran | |
| | | ge | |
| | | * processor has been added to the queryparser, the queryparser will | |
| | | * accept "created:1/1/2000..31/12/2001". | |
| | | */ | |
| | | DateValueRangeProcessor(Xapian::valueno valno_, const std::string &str_ | |
| | | , | |
| | | bool prefix_ = true, | |
| | | bool prefer_mdy_ = false, int epoch_year_ = 1970 | |
| | | ) | |
| | | : StringValueRangeProcessor(valno_, str_, prefix_), | |
| | | prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } | |
| | | | |
| /** See if <begin>..<end> is a valid date value range. | | /** See if <begin>..<end> is a valid date value range. | |
| * | | * | |
| * If <begin>..<end> is a sensible date range, this method returns the | | * If <begin>..<end> is a sensible date range, this method returns the | |
| * value number of range filter on. Otherwise it returns | | * value number of range filter on. Otherwise it returns | |
| * Xapian::BAD_VALUENO. | | * Xapian::BAD_VALUENO. | |
| */ | | */ | |
| Xapian::valueno operator()(std::string &begin, std::string &end); | | Xapian::valueno operator()(std::string &begin, std::string &end); | |
| }; | | }; | |
| | | | |
| /** Handle a number range. | | /** Handle a number range. | |
| * | | * | |
| * This class must be used on values which have been encoded using | | * This class must be used on values which have been encoded using | |
| * Xapian::sortable_serialise() which turns numbers into strings which | | * Xapian::sortable_serialise() which turns numbers into strings which | |
| * will sort in the same order as the numbers (the same values can be | | * will sort in the same order as the numbers (the same values can be | |
| * used to implement a numeric sort). | | * used to implement a numeric sort). | |
| */ | | */ | |
|
| class XAPIAN_VISIBILITY_DEFAULT NumberValueRangeProcessor : public ValueRan | | class XAPIAN_VISIBILITY_DEFAULT NumberValueRangeProcessor : public StringVa | |
| geProcessor { | | lueRangeProcessor { | |
| Xapian::valueno valno; | | | |
| bool prefix; | | | |
| std::string str; | | | |
| | | | |
| public: | | public: | |
| /** Constructor. | | /** Constructor. | |
| * | | * | |
| * @param valno_ The value number to return from operator(). | | * @param valno_ The value number to return from operator(). | |
| */ | | */ | |
| NumberValueRangeProcessor(Xapian::valueno valno_) | | NumberValueRangeProcessor(Xapian::valueno valno_) | |
|
| : valno(valno_), prefix(false) { } | | : StringValueRangeProcessor(valno_) { } | |
| | | | |
| /** Constructor. | | /** Constructor. | |
| * | | * | |
| * @param valno_ The value number to return from operator(). | | * @param valno_ The value number to return from operator(). | |
| * | | * | |
| * @param str_ A string to look for to recognise values as belongi
ng | | * @param str_ A string to look for to recognise values as belongi
ng | |
| * to this numeric range. | | * to this numeric range. | |
| * | | * | |
| * @param prefix_ Whether to look for the string at the start or end
of | | * @param prefix_ Whether to look for the string at the start or end
of | |
| * the values. If true, the string is a prefix; if | | * the values. If true, the string is a prefix; if | |
| | | | |
| skipping to change at line 204 | | skipping to change at line 265 | |
| * | | * | |
| * For example, if str_ is "$" and prefix_ is true, and the range | | * For example, if str_ is "$" and prefix_ is true, and the range | |
| * processor has been added to the queryparser, the queryparser will | | * processor has been added to the queryparser, the queryparser will | |
| * accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as va
lid | | * accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as va
lid | |
| * ranges. If str_ is "kg" and prefix_ is false, the queryparser will | | * ranges. If str_ is "kg" and prefix_ is false, the queryparser will | |
| * accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" a
s | | * accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" a
s | |
| * valid ranges. | | * valid ranges. | |
| */ | | */ | |
| NumberValueRangeProcessor(Xapian::valueno valno_, const std::string &st
r_, | | NumberValueRangeProcessor(Xapian::valueno valno_, const std::string &st
r_, | |
| bool prefix_ = true) | | bool prefix_ = true) | |
|
| : valno(valno_), prefix(prefix_), str(str_) { } | | : StringValueRangeProcessor(valno_, str_, prefix_) { } | |
| | | | |
| /** See if <begin>..<end> is a valid numeric value range. | | /** See if <begin>..<end> is a valid numeric value range. | |
| * | | * | |
| * If <begin>..<end> is a valid numeric value range, and has the | | * If <begin>..<end> is a valid numeric value range, and has the | |
| * appropriate prefix or suffix (if specified) required for this | | * appropriate prefix or suffix (if specified) required for this | |
| * NumberValueRangeProcessor, this method returns the value number of | | * NumberValueRangeProcessor, this method returns the value number of | |
| * range filter on, and sets begin and end to the appropriate serialis
ed | | * range filter on, and sets begin and end to the appropriate serialis
ed | |
| * values needed to delimit the range. Otherwise it returns | | * values needed to delimit the range. Otherwise it returns | |
| * Xapian::BAD_VALUENO. | | * Xapian::BAD_VALUENO. | |
| */ | | */ | |
| | | | |
End of changes. 9 change blocks. |
| 18 lines changed or deleted | | 90 lines changed or added | |
|
| sorter.h | | sorter.h | |
| /** @file sorter.h | | /** @file sorter.h | |
| * @brief Build sort keys for MSet ordering | | * @brief Build sort keys for MSet ordering | |
| */ | | */ | |
|
| /* Copyright (C) 2007 Olly Betts | | /* Copyright (C) 2007,2009 Olly Betts | |
| * | | * | |
| * This program is free software; you can redistribute it and/or | | * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License as | | * modify it under the terms of the GNU General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| | | | |
| skipping to change at line 67 | | skipping to change at line 67 | |
| template <class Iterator> | | template <class Iterator> | |
| MultiValueSorter(Iterator begin, Iterator end) { | | MultiValueSorter(Iterator begin, Iterator end) { | |
| while (begin != end) add(*begin++); | | while (begin != end) add(*begin++); | |
| } | | } | |
| | | | |
| virtual std::string operator()(const Xapian::Document & doc) const; | | virtual std::string operator()(const Xapian::Document & doc) const; | |
| | | | |
| void add(Xapian::valueno valno, bool forward = true) { | | void add(Xapian::valueno valno, bool forward = true) { | |
| valnos.push_back(std::make_pair(valno, forward)); | | valnos.push_back(std::make_pair(valno, forward)); | |
| } | | } | |
|
| | | | |
| virtual ~MultiValueSorter(); | | | |
| }; | | }; | |
| | | | |
| } | | } | |
| | | | |
| #endif // XAPIAN_INCLUDED_SORTER_H | | #endif // XAPIAN_INCLUDED_SORTER_H | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 1 lines changed or added | |
|
| weight.h | | weight.h | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 82 | |
| void operator=(const Weight &); | | void operator=(const Weight &); | |
| | | | |
| /** Clone this object. | | /** Clone this object. | |
| * | | * | |
| * This method allocates and returns a copy of the object it is called
on. | | * This method allocates and returns a copy of the object it is called
on. | |
| * | | * | |
| * If your subclass is called FooWeight and has parameters a and b, th
en | | * If your subclass is called FooWeight and has parameters a and b, th
en | |
| * you would implement FooWeight::clone() like so: | | * you would implement FooWeight::clone() like so: | |
| * | | * | |
| * FooWeight * FooWeight::clone() const { return new FooWeight(a, b);
} | | * FooWeight * FooWeight::clone() const { return new FooWeight(a, b);
} | |
|
| | | * | |
| | | * Note that the returned object will be deallocated by Xapian after u | |
| | | se | |
| | | * with "delete". It must therefore have been allocated with "new". | |
| */ | | */ | |
| virtual Weight * clone() const = 0; | | virtual Weight * clone() const = 0; | |
| | | | |
| /// A bitmask of the statistics this weighting scheme needs. | | /// A bitmask of the statistics this weighting scheme needs. | |
| stat_flags stats_needed; | | stat_flags stats_needed; | |
| | | | |
| /// The number of documents in the collection. | | /// The number of documents in the collection. | |
| Xapian::doccount collection_size_; | | Xapian::doccount collection_size_; | |
| | | | |
| /// The number of documents marked as relevant. | | /// The number of documents marked as relevant. | |
| | | | |
| skipping to change at line 156 | | skipping to change at line 159 | |
| virtual std::string serialise() const = 0; | | virtual std::string serialise() const = 0; | |
| | | | |
| /** Unserialise parameters. | | /** Unserialise parameters. | |
| * | | * | |
| * This method unserialises parameters serialised by the @a serialise(
) | | * This method unserialises parameters serialised by the @a serialise(
) | |
| * method and allocates and returns a new object initialised with them
. | | * method and allocates and returns a new object initialised with them
. | |
| * | | * | |
| * If you don't want to support the remote backend in your weighting | | * If you don't want to support the remote backend in your weighting | |
| * scheme, you can just implement this to throw | | * scheme, you can just implement this to throw | |
| * Xapian::UnimplementedError. | | * Xapian::UnimplementedError. | |
|
| | | * | |
| | | * Note that the returned object will be deallocated by Xapian after u | |
| | | se | |
| | | * with "delete". It must therefore have been allocated with "new". | |
| */ | | */ | |
| virtual Weight * unserialise(const std::string & s) const = 0; | | virtual Weight * unserialise(const std::string & s) const = 0; | |
| | | | |
| /** Calculate the weight contribution for this object's term to a docum
ent. | | /** Calculate the weight contribution for this object's term to a docum
ent. | |
| * | | * | |
| * The parameters give information about the document which may be use
d | | * The parameters give information about the document which may be use
d | |
| * in the calculations: | | * in the calculations: | |
| * | | * | |
| * @param wdf The within document frequency of the term in the docu
ment. | | * @param wdf The within document frequency of the term in the docu
ment. | |
| * @param doclen The document's length (unnormalised). | | * @param doclen The document's length (unnormalised). | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 8 lines changed or added | |
|