diff --git a/include/lib/bitset/bitset.h b/include/lib/bitset/bitset.h index 3b705d14ca917fcc60042dc25b602ff7ebf7b708..3278143c02710aeac82942e33060360c45eaa2ba 100644 --- a/include/lib/bitset/bitset.h +++ b/include/lib/bitset/bitset.h @@ -34,10 +34,11 @@ * @file * @brief Module to work with arrays of bits (bitsets) * - * Bitset is an array of bits where each bit can be set or unset independently. - * The bits of a @link bitset @endlink are indexed by \a size_t position number. - * Initialy all bits set to false. You can use any values in range [0,SIZE_MAX). - * The container grows automatically. + * Bitset is an array of bits where each bit can be set or unset + * independently. The bits of a @link bitset @endlink are indexed + * by \a size_t position number. Initially all bits are set to + * false. You can use any values in range [0,SIZE_MAX). The + * container grows automatically. */ #include "config.h" diff --git a/include/lib/bitset/expr.h b/include/lib/bitset/expr.h index 8cc2b863e2e5167cab844ab6824826233769192c..ea6cb0b980798158e3d1fef5b44f5752e03bc183 100644 --- a/include/lib/bitset/expr.h +++ b/include/lib/bitset/expr.h @@ -34,24 +34,24 @@ * @file * @brief Expressions on bitsets. * - * The library have full featured support for evaluating logical expressions - * on @link bitset bitsets @endlink. You can prepare an arbitrary logical + * This library provides full support for evaluation of logical expressions + * on @link bitset bitsets @endlink. One can prepare an arbitrary logical * expression in Disjunctive normal form (DNF) using @link bitset_expr @endlink * methods and then evaluate the expression on the set of @link bitset @endlink * objects. Currently only @link bitset_iterator @endlink supports expressions. - * It can be used for perfoming iteration over the expression result on the fly, + * It can be used for performing iteration over the expression result on the fly, * without producing temporary bitsets. * * @link bitset_expr @endlink holds any expression that can be represented * in DNF form. Since every propositional formula can be represented using DNF, - * you can construct any such logical expression using methods from this module. + * one can construct any such logical expression using methods from this module. * * A DNF example: (~b0 & b1 & ~b2) | (b2 & ~b3 & b4) | (b3 & b6) * where b[0-9] is an arbitrary bitset. * * @link bitset_expr @endlink does not operate directly on @link bitset @endlink - * objects. Instead of this, you should use placeholders (identificators) - * which will be bound to the actual objects by the selected evaluator + * objects. Instead of this, one should use placeholders (identifiers) + * which will be bound to the actual bitsets by the selected evaluator * (e.g. bitset_iterator). * * @link http://en.wikipedia.org/wiki/Disjunctive_normal_form @endlink @@ -104,11 +104,11 @@ void bitset_expr_destroy(struct bitset_expr *expr); /** - * @brief Clear @a expr (remove all conjuctions from it) + * @brief Clear @a expr (remove all conjunctions from it) * @param expr bitset expression - * @note An allocated memory is not freed. You can conitnue use the object + * @note Allocated memory is not freed. One can continue using the object * after this operation. Use @link bitset_expr_destroy @endlink to destroy - * object completely. + * the object completely. */ void bitset_expr_clear(struct bitset_expr *expr); @@ -125,9 +125,9 @@ bitset_expr_add_conj(struct bitset_expr *expr); /** * @brief Add a new placeholder for a bitset to the current conjunction. * @param expr bitset expression - * @param bitset_id identificator of bitset (placeholder) - * @param pre_not if set to true then logical NOT will be performed to - * bitset during evaluation process. + * @param bitset_id identifier of a bitset (placeholder) + * @param pre_not if set to true, then logical NOT will be performed on + * the bitset during evaluation process. * @retval 0 on success * @retval -1 on memory error */ diff --git a/include/lib/bitset/iterator.h b/include/lib/bitset/iterator.h index b47ea2acface7c8ae6f516a6fa0df6a6dbaf5dab..92c143e557996abfe0ca72cf580cc69598b88fa8 100644 --- a/include/lib/bitset/iterator.h +++ b/include/lib/bitset/iterator.h @@ -32,14 +32,16 @@ /** * @file - * @brief Iterator for @link bitset @endlink objects with expressions support. + * @brief Iterator for @link bitset @endlink objects with + * expression support. * - * @link bitset_iterator @endlink is used to iterate over a result of the - * evaluation a @link bitset_expr logical expression @endlink on the set - * of bitsets. The iterator evaluates expressions on the fly, without producing - * temporary bitsets. Each iteration (@link bitset_iterator_next @endlink) - * returns the next position where a given expression evaluates to true on a - * given set of bitsets. + * @link bitset_iterator @endlink is used to iterate over a result + * of the evaluation a @link bitset_expr logical expression + * @endlink on a set of bitsets. The iterator evaluates its + * expression on the fly, without producing temporary bitsets. + * Each iteration (@link bitset_iterator_next @endlink) returns + * the next position where a given expression evaluates to true on + * a given set of bitsets. * * @see expr.h */ @@ -111,7 +113,7 @@ bitset_iterator_init(struct bitset_iterator *it, struct bitset_expr *expr, /** * @brief Rewind the \a it to the start position. - * @param expr bitset expression + * @param it bitset iterator * @see @link bitset_iterator_init @endlink */ void @@ -119,9 +121,9 @@ bitset_iterator_rewind(struct bitset_iterator *it); /** * @brief Move \a it to a next position - * @param expr bitset expression - * @return a next offset where the expression evaluates to true or SIZE_MAX - * if there is no more bits in the result set. + * @param it bitset iterator + * @return the next offset where the expression evaluates to true + * or SIZE_MAX if there is no more bits in the result set. * @see @link bitset_iterator_init @endlink */ size_t