summaryrefslogtreecommitdiff
path: root/doc/lispref
diff options
context:
space:
mode:
authorXue Fuqiao <xfq.free@gmail.com>2013-12-22 15:11:05 +0800
committerXue Fuqiao <xfq.free@gmail.com>2013-12-22 15:11:05 +0800
commit8fc36a68035c3145d90460de481aa78eda3c8d86 (patch)
tree20ddb10969f63796e0d5803455e34ab8e623f66e /doc/lispref
parent05e8f1ae2e6c55b59da6dd508d3e48cc7807dfc9 (diff)
downloademacs-8fc36a68035c3145d90460de481aa78eda3c8d86.tar.gz
Document new bool-vector set operation functions.
* doc/lispref/sequences.texi (Bool-Vectors): Document new bool-vector set operation functions.
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog2
-rw-r--r--doc/lispref/sequences.texi48
2 files changed, 50 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index a92ae299250..d03f6ae39da 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -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'.
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 00384de7ec8..acf8cb38ade 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -713,6 +713,54 @@ 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
bool-vector. Note that the printed form represents up to 8 boolean
values as a single character.