]> code.delx.au - gnu-emacs/commitdiff
Document new bool-vector set operation functions.
authorXue Fuqiao <xfq.free@gmail.com>
Sun, 22 Dec 2013 07:11:05 +0000 (15:11 +0800)
committerXue Fuqiao <xfq.free@gmail.com>
Sun, 22 Dec 2013 07:11:05 +0000 (15:11 +0800)
* doc/lispref/sequences.texi (Bool-Vectors): Document new bool-vector
set operation functions.

doc/lispref/ChangeLog
doc/lispref/sequences.texi
etc/NEWS

index a92ae2992507867a839a4d54952d81e6e2e27c91..d03f6ae39da91fed4123e3df50cc384b6a2c2624 100644 (file)
@@ -1,5 +1,7 @@
 2013-12-22  Xue Fuqiao  <xfq.free@gmail.com>
 
+       * sequences.texi (Bool-Vectors): Document new bool-vector set operation functions.
+
        * text.texi (Examining Properties): Document `get-pos-property'.
 
        * variables.texi (Directory Local Variables): Document `enable-dir-local-variables'.
index 00384de7ec8637664ecaafc07a92cc4ecb0f286c..acf8cb38adeee6fbdb85b8cadc03cb03c15552c7 100644 (file)
@@ -711,6 +711,54 @@ each one initialized to @var{initial}.
 @defun bool-vector-p object
 This returns @code{t} if @var{object} is a bool-vector,
 and @code{nil} otherwise.
+@end defun
+
+There are also some bool-vector set operation functions, described below:
+
+@defun bool-vector-exclusive-or a b &optional c
+Return @dfn{bitwise exclusive or} of bool vectors @var{a} and @var{b}.
+If optional argument @var{c} is given, the result of this operation is
+stored into @var{c}.  All arguments should be bool vectors of the same length.
+@end defun
+
+@defun bool-vector-union a b &optional c
+Return @dfn{bitwise or} of bool vectors @var{a} and @var{b}.  If
+optional argument @var{c} is given, the result of this operation is
+stored into @var{c}.  All arguments should be bool vectors of the same length.
+@end defun
+
+@defun bool-vector-intersection a b &optional c
+Return @dfn{bitwise and} of bool vectors @var{a} and @var{b}.  If
+optional argument @var{c} is given, the result of this operation is
+stored into @var{c}.  All arguments should be bool vectors of the same length.
+@end defun
+
+@defun bool-vector-set-difference a b &optional c
+Return @dfn{set difference} of bool vectors @var{a} and @var{b}.  If
+optional argument @var{c} is given, the result of this operation is
+stored into @var{c}.  All arguments should be bool vectors of the same length.
+@end defun
+
+@defun bool-vector-not a &optional b
+Return @dfn{set complement} of bool vector @var{a}.  If optional
+argument @var{b} is given, the result of this operation is stored into
+@var{b}.  All arguments should be bool vectors of the same length.
+@end defun
+
+@defun bool-vector-subsetp a b
+Return @code{t} if every @code{t} value in @var{a} is also t in
+@var{b}, nil otherwise.  All arguments should be bool vectors of the
+same length.
+@end defun
+
+@defun bool-vector-count-consecutive a b i
+Return the number of consecutive elements in @var{a} equal @var{b}
+starting at @var{i}.  @code{a} is a bool vector, @var{b} is @code{t}
+or @code{nil}, and @var{i} is an index into @code{a}.
+@end defun
+
+@defun bool-vector-count-population a
+Return the number of elements that are @code{t} in bool vector @var{a}.
 @end defun
 
   Here is an example of creating, examining, and updating a
index e3c902e66d87fc4e4941de4c29a9439163294d21..374f313733da24db1d905eace266b3cc6bcc9220 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -923,6 +923,7 @@ The function `display-popup-menus-p' will now return non-nil for a
 display or frame whenever a mouse is supported on that display or
 frame.
 
++++
 ** New bool-vector set operation functions:
 *** `bool-vector-exclusive-or'
 *** `bool-vector-union'